]> git.r.bdr.sh - rbdr/blog/commitdiff
🐛✨📝 Add quick access, favicons and fix publish cmd
authorBen Beltran <redacted>
Mon, 3 Jul 2017 05:52:43 +0000 (00:52 -0500)
committerBen Beltran <redacted>
Mon, 3 Jul 2017 05:53:15 +0000 (00:53 -0500)
Squashed commit of the following:

commit 294b1de9d8d64f8356227b634091c3fd7982346b
Author: Ben Beltran <redacted>
Date:   Mon Jul 3 00:52:16 2017 -0500

    ✨ Add quick access in frontend

commit 70acd1f292c6bbfb6596a21bf0106837c85bf2f0
Author: Ben Beltran <redacted>
Date:   Mon Jul 3 00:46:51 2017 -0500

    Add pizza favicons

commit b72471650a7632a1cead64ca9dab2210add13699
Author: Ben Beltran <redacted>
Date:   Mon Jul 3 00:39:45 2017 -0500

    📝 Correct missing entries in changelog

commit 03b9fa8f7ae47a318dbde8bd245988b64cefe66f
Author: Ben Beltran <redacted>
Date:   Mon Jul 3 00:39:20 2017 -0500

    📝 Add docs about publishing with surge

commit 710cd3b3bf4a4f913d99addad69efc751a74611f
Author: Ben Beltran <redacted>
Date:   Mon Jul 3 00:38:06 2017 -0500

    🐛 Fix publish command

CHANGELOG.md
README.md
bin/blog.js
static/favicon.ico [new file with mode: 0644]
static/favicon.png [new file with mode: 0644]
static/js/blog.js [new file with mode: 0644]
templates/index.html

index 728047b5a502c4d40c01482a223dc6137478cb0e..f5d320dacb4375fe24c6005fcdf2b9973226e852 100644 (file)
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ## [Unreleased]
 ### Added
 
 ## [Unreleased]
 ### Added
+- JSDoc config
+- Eslint config
 - Binary to add and update blog posts
 - Template for index
 - Static Files
 - Binary to add and update blog posts
 - Template for index
 - Static Files
index 7f7903ab8c57a2a02288312db37cfe9db0334a44..47137302da81ce2f8dc010920da3dd8d56336b32 100644 (file)
--- a/README.md
+++ b/README.md
@@ -38,3 +38,11 @@ shifting the existing entries.
 `blog --publish`
 
 Will publish the blog.
 `blog --publish`
 
 Will publish the blog.
+
+## How to publish
+
+At the moment, the app does not include any publishers. [surge][surge] is an easy
+way to do it, just point it to your static directory.
+
+
+[surge]: https://surge.sh
index c88a8aae14739dfdb618f92eda2cde33d710284a..5d27d4a3b84713a2f1dc8f0fcbaac6b22aa18eba 100755 (executable)
@@ -33,7 +33,7 @@ const internals = {
           }
 
           if (argument === 'publish') {
           }
 
           if (argument === 'publish') {
-            await internals.blog.update(value);
+            await internals.blog.publish(value);
             return;
           }
         }
             return;
           }
         }
diff --git a/static/favicon.ico b/static/favicon.ico
new file mode 100644 (file)
index 0000000..81582e2
Binary files /dev/null and b/static/favicon.ico differ
diff --git a/static/favicon.png b/static/favicon.png
new file mode 100644 (file)
index 0000000..b77a959
Binary files /dev/null and b/static/favicon.png differ
diff --git a/static/js/blog.js b/static/js/blog.js
new file mode 100644 (file)
index 0000000..a49a72f
--- /dev/null
@@ -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);
index 858396b3545f7fe46ea59971f9d055bbdd69d716..e741c68832702ff287069f1889fea434fd61ea87 100644 (file)
@@ -6,6 +6,8 @@
 
     <title>blog 🍕</title>
 
 
     <title>blog 🍕</title>
 
+    <script src="/js/blog.js"></script>
+
     <link href="css/style.css" rel="stylesheet">
 
   </head>
     <link href="css/style.css" rel="stylesheet">
 
   </head>