diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-07-03 00:52:43 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-07-03 00:53:15 -0500 |
| commit | 397444675d7156acd6495223a3b15175d6853589 (patch) | |
| tree | 74779f470fc78cbf89bf263966b950658f29ed0f /static/js | |
| parent | cf6302904d61ead65e6294e7f1be406eb68ef5f9 (diff) | |
🐛✨📝 Add quick access, favicons and fix publish cmd
Squashed commit of the following:
commit 294b1de9d8d64f8356227b634091c3fd7982346b
Author: Ben Beltran <ben@nsovocal.com>
Date: Mon Jul 3 00:52:16 2017 -0500
✨ Add quick access in frontend
commit 70acd1f292c6bbfb6596a21bf0106837c85bf2f0
Author: Ben Beltran <ben@nsovocal.com>
Date: Mon Jul 3 00:46:51 2017 -0500
Add pizza favicons
commit b72471650a7632a1cead64ca9dab2210add13699
Author: Ben Beltran <ben@nsovocal.com>
Date: Mon Jul 3 00:39:45 2017 -0500
📝 Correct missing entries in changelog
commit 03b9fa8f7ae47a318dbde8bd245988b64cefe66f
Author: Ben Beltran <ben@nsovocal.com>
Date: Mon Jul 3 00:39:20 2017 -0500
📝 Add docs about publishing with surge
commit 710cd3b3bf4a4f913d99addad69efc751a74611f
Author: Ben Beltran <ben@nsovocal.com>
Date: Mon Jul 3 00:38:06 2017 -0500
🐛 Fix publish command
Diffstat (limited to 'static/js')
| -rw-r--r-- | static/js/blog.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/static/js/blog.js b/static/js/blog.js new file mode 100644 index 0000000..a49a72f --- /dev/null +++ b/static/js/blog.js @@ -0,0 +1,28 @@ +'use strict'; + +/* globals window */ + +((window) => { + + const internals = { + kEntryPoint: '.event-details', + + // Application entry point, for now just band to keyboard + + main() { + + window.document.addEventListener('keydown', internals._onKeyDown); + }, + + // Handles key events to point to the correct blog post. + + _onKeyDown(event) { + + if (['1','2','3'].indexOf(event.key) > -1) { + window.location.hash = event.key; + } + } + }; + + window.addEventListener('load', internals.main); +})(window); |