Added tag page master
authorNeil Smith <neil.git@njae.me.uk>
Sun, 23 Aug 2020 15:59:23 +0000 (16:59 +0100)
committerNeil Smith <neil.git@njae.me.uk>
Sun, 23 Aug 2020 15:59:23 +0000 (16:59 +0100)
default.hbs
page-tag.hbs [new file with mode: 0644]
partials/header.hbs [new file with mode: 0644]
partials/sidebar.hbs
partials/tag-card.hbs [new file with mode: 0644]
post.hbs

index 7bd9528213a362e18f76ca76afcd8d077a52e25f..1330823b70e4764417da6dac5eb07e9372e5e4bb 100644 (file)
             <div class="inner">
 
                 {{!-- Header --}}
-                <header id="header">
-                    {{#if @site.logo}}
-                        <a href="{{@site.url}}" class="logo image"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
-                    {{else}}
-                        <a href="{{@site.url}}" class="logo">{{@site.title}}</a>
-                    {{/if}}
-                    <ul class="icons">
-                        {{ navigation type="secondary" }}
-                        <li><a href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" class="icon fa-rss" target="_blank" rel="noopener"><span class="label" title="RSS">RSS</span></a></li>
-                    </ul>
-                </header>
+                {{> "header"}}
+
 
                 {{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
                 {{{body}}}
diff --git a/page-tag.hbs b/page-tag.hbs
new file mode 100644 (file)
index 0000000..fcd415e
--- /dev/null
@@ -0,0 +1,56 @@
+{{!< default}}
+{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
+
+{{!-- The big featured header, it uses blog cover image as a BG if available --}}
+{{#post}}
+
+<section>
+
+
+    <header class="main content">
+        <h1>{{title}}</h1>
+    </header>
+
+    {{#if feature_image}}
+    <div class="image main"><img src="{{img_url feature_image}}" alt="{{title}}" /></div>
+    {{/if}}
+
+    <div class="content">
+        {{#get 'tags' limit='all' include='count.posts' order='count.posts desc'}}
+        {{#foreach tags}}
+            {{!-- The tag below includes the markup for each tag - partials/tag-card.hbs --}}
+            {{> "tag-card"}}
+        {{/foreach}}
+        {{/get}}
+    </div>
+
+</section>
+
+
+
+{{!-- The main content area --}}
+{{!--
+<main id="site-main" class="site-main outer">
+    <style scoped>
+    .inner-page-tags {
+        margin-top: inherit;
+    }
+
+    @media (min-width: 900px) {
+      .inner-page-tags {
+        margin-top: -8vw;
+      }
+    }
+    </style>
+    <div class="inner inner-page-tags">
+        <div class="post-feed">
+            {{#get 'tags' limit='all' include='count.posts' order='count.posts desc'}}
+            {{#foreach tags}}
+                {{> "tag-card"}}
+            {{/foreach}}
+            {{/get}}
+        </div>
+    </div>
+</main>
+--}}
+{{/post}}
diff --git a/partials/header.hbs b/partials/header.hbs
new file mode 100644 (file)
index 0000000..42b950e
--- /dev/null
@@ -0,0 +1,11 @@
+<header id="header">
+{{#if @site.logo}}
+    <a href="{{@site.url}}" class="logo image"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
+{{else}}
+    <a href="{{@site.url}}" class="logo">{{@site.title}}</a>
+{{/if}}
+<ul class="icons">
+    {{navigation type="secondary"}}
+    <li><a href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" class="icon fa-rss" target="_blank" rel="noopener"><span class="label" title="RSS">RSS</span></a></li>
+</ul>
+</header>
index b975148cb62c3f7eed6898026830a0942af91f0a..11ad20865fcdb6ac87bc9076690d368f2ca91995 100644 (file)
@@ -3,7 +3,7 @@
 
         {{!-- Nav - partials/navigation.hbs --}}
         {{#if @site.navigation}}
-            {{navigation}}
+            {{navigation type="primary"}}
         {{/if}}
 
         {{!-- Recent posts --}}
diff --git a/partials/tag-card.hbs b/partials/tag-card.hbs
new file mode 100644 (file)
index 0000000..5ccfca8
--- /dev/null
@@ -0,0 +1,18 @@
+<article class="post-card {{post_class}}{{#unless feature_image}} no-image{{/unless}}">
+    {{#if feature_image}}
+        <a class="post-card-image-link" href="{{url}}">
+            <div class="post-card-image" style="background-image: url({{feature_image}})"></div>
+        </a>
+    {{/if}}
+    <div class="post-card-content">
+        <a class="post-card-content-link" href="{{url}}">
+            <header class="post-card-header">
+                <h2 class="post-card-title">{{name}}</h2>
+            </header>
+            <section class="post-card-excerpt">
+                <p>{{description}}</p>
+                <p>A collection of {{plural count.posts empty='posts' singular='% post' plural='% posts'}}</p>
+            </section>
+        </a>
+    </div>
+</article>
index a0452715a1191eedb97f1c03e1c9c38ac6ff30c4..7ab3c1847aa52fea6842aa5c5ae70985f58f4000 100644 (file)
--- a/post.hbs
+++ b/post.hbs
@@ -7,8 +7,9 @@ into the {body} of the default.hbs template --}}
 <section>
 
     <header class="main content">
-        <span class="date">{{date format="MMMM D, YYYY"}}</span>
+        <span class="date">{{date format="D MMMM YYYY"}} {{tags separator=" , " prefix=" ; tagged in: "}}</span>
         <h1>{{title}}</h1>
+
         {{#if custom_excerpt}}
             <p class="content">{{custom_excerpt}}</p>
         {{/if}}
@@ -54,11 +55,29 @@ into the {body} of the default.hbs template --}}
 
     </footer>
 
-    {{!--
     <section class="post-full-comments">
-        If you want to embed comments, this is a good place to do it!
+        {{!-- If you want to embed comments, this is a good place to do it! --}}
+        <div id="disqus_thread"></div>
+        <script>
+
+            /**
+            *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
+            *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
+            
+            var disqus_config = function () {
+            this.page.url = '{{url absolute="true"}}';     // PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
+            this.page.identifier = 'ghost-{{comment_id}}'; // PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
+            };
+            
+            (function() { // DON'T EDIT BELOW THIS LINE
+            var d = document, s = d.createElement('script');
+            s.src = 'https://worknjae.disqus.com/embed.js';
+            s.setAttribute('data-timestamp', +new Date());
+            (d.head || d.body).appendChild(s);
+            })();
+        </script>
+        <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
     </section>
-    --}}
 
 </section>
 {{/post}}