Primary navigation overridden by secondary
authorNeil Smith <neil.git@njae.me.uk>
Sun, 5 Apr 2020 12:30:18 +0000 (13:30 +0100)
committerNeil Smith <neil.git@njae.me.uk>
Sun, 5 Apr 2020 12:30:18 +0000 (13:30 +0100)
default.hbs
package.json
partials/navigation.hbs

index 1ea4e2f2fee8ed893489267816bb13289c56e4d3..7bd9528213a362e18f76ca76afcd8d077a52e25f 100644 (file)
 </head>
 <body class="is-preload {{body_class}}">
 
+<svg width="0" height="0" class="hidden">
+  <symbol viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" id="twitter">
+    <title>Twitter icon</title>
+    <path d="M23.954 4.569a10 10 0 0 1-2.825.775 4.958 4.958 0 0 0 2.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 0 0-8.384 4.482C7.691 8.094 4.066 6.13 1.64 3.161a4.822 4.822 0 0 0-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 0 1-2.228-.616v.061a4.923 4.923 0 0 0 3.946 4.827 4.996 4.996 0 0 1-2.212.085 4.937 4.937 0 0 0 4.604 3.417 9.868 9.868 0 0 1-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 0 0 7.557 2.209c9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63a9.936 9.936 0 0 0 2.46-2.548l-.047-.02z"></path>
+  </symbol>
+  <symbol viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" id="facebook">
+    <title>Facebook icon</title>
+    <path d="M23.998 12c0-6.628-5.372-12-11.999-12C5.372 0 0 5.372 0 12c0 5.988 4.388 10.952 10.124 11.852v-8.384H7.078v-3.469h3.046V9.356c0-3.008 1.792-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.384c5.736-.9 10.124-5.864 10.124-11.853z"></path>
+  </symbol>
+  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 53 66.25" id="email">
+    <path d="M49.412 19.505c-.01-.007-.02-.016-.03-.022l-.01-.009-6.896-4.727V8.35a3.622 3.622 0 0 0-3.618-3.617H14.144a3.622 3.622 0 0 0-3.618 3.617v6.391l-6.855 4.704c-.085.1-2.171 1.313-2.171 4.11v19.71c0 2.807 2.301 5 5 5h40c2.703 0 5-2.197 5-5v-19.71c0-2.773-2.178-4.152-2.088-4.051zM35.244 31.62L48.8 21.633c.45.527.7 1.2.7 1.923v19.71c0 .497-.133.96-.348 1.372L35.244 31.621zm11.897-11.25l-4.665 3.432v-6.63l4.665 3.198zM14.144 6.734h24.714a1.62 1.62 0 0 1 1.618 1.617v16.93l-12.189 8.978c-1.026.747-2.508.773-3.564.002l-12.197-8.973V8.351a1.62 1.62 0 0 1 1.618-1.617zM3.848 44.638a2.961 2.961 0 0 1-.348-1.372v-19.71c0-.723.25-1.396.7-1.924l13.555 9.99L3.848 44.638zm6.678-27.47v6.638L5.86 20.37l4.667-3.202zM6.5 46.266c-.426 0-.83-.091-1.196-.252l14.09-13.186 4.145 3.049a5.042 5.042 0 0 0 5.934-.005l4.134-3.045 14.09 13.187a2.99 2.99 0 0 1-1.197.252h-40z"></path>
+    <path d="M25.414 25.934c1.347 0 2.474-.22 3.58-.804l-.322-.865c-.825.463-1.89.704-3.037.704-2.976 0-5.168-2.071-5.168-5.43 0-4.082 2.754-6.676 6.033-6.676 3.117 0 4.867 2.09 4.867 5.007 0 2.333-1.146 3.7-2.172 3.68-.664-.02-.905-.724-.603-2.252l.683-3.64c-.523-.242-1.287-.422-2.152-.422-2.795 0-4.766 2.272-4.766 4.766 0 1.589 1.006 2.534 2.172 2.534 1.207 0 2.132-.584 2.836-1.77h.08c-.06 1.227.684 1.77 1.488 1.77 1.89 0 3.58-1.77 3.58-4.787 0-3.358-2.353-5.812-5.852-5.812-4.465 0-7.34 3.58-7.34 7.723 0 3.861 2.795 6.274 6.093 6.274zm2.051-7.22c-.221 1.248-1.287 2.736-2.453 2.736-.885 0-1.328-.644-1.328-1.529 0-1.95 1.428-3.62 3.198-3.62.463 0 .804.08 1.006.141l-.423 2.273z"></path>
+    <text y="68" font-size="5" font-weight="bold" font-family="&#x27;Helvetica Neue&#x27;, Helvetica, Arial-Unicode, Arial, Sans-serif">Created by Vectors Point</text>
+    <text y="73" font-size="5" font-weight="bold" font-family="&#x27;Helvetica Neue&#x27;, Helvetica, Arial-Unicode, Arial, Sans-serif">from the Noun Project</text>
+  </symbol>
+  <symbol viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" id="linkedin">
+    <title>LinkedIn icon</title>
+    <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"></path>
+  </symbol>
+  <symbol viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" id="github">
+    <title>GitHub icon</title>
+    <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"></path>
+  </symbol>
+</svg>
+
     <div id="wrapper">
         <main id="main">
             <div class="inner">
                         <a href="{{@site.url}}" class="logo">{{@site.title}}</a>
                     {{/if}}
                     <ul class="icons">
-                        {{#if @site.twitter}}
-                            <li><a href="{{twitter_url @site.twitter}}" class="icon fa-twitter" title="Twitter"><span class="label">Twitter</span></a></li>
-                        {{/if}}
-                        {{#if @site.facebook}}
-                            <li><a href="{{facebook_url @site.facebook}}" class="icon fa-facebook" title="Facebook"><span class="label">Facebook</span></a></li>
-                        {{/if}}
+                        {{ 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 1db70e3db37a4cacd2193e3d3dc4698e48629c0b..8e9e0fdbd83aaadad4d96e004cba4663d2040736 100644 (file)
@@ -1,8 +1,8 @@
 {
-    "name": "editorial",
+    "name": "editorial-neil",
     "description": "This is Editorial, a news-oriented theme for Ghost.",
     "demo": "https://editorial.ghost.io",
-    "version": "2.0.0",
+    "version": "2.0.1",
     "engines": {
         "ghost": ">=3.0.0",
         "ghost-api": "v3"
index 37d187720e53d64ddfa6bcce3702f95b81ac8db1..a1ea16aea694ba71727fb610b83f5cce24aec7de 100644 (file)
@@ -1,10 +1,30 @@
-<nav id="menu">
-    <header class="major">
-        <h2>Menu</h2>
-    </header>
-    <ul class="links">
-        {{#foreach navigation}}
-        <li class="nav-{{slug}} {{#if current}}active{{/if}}"><a href="{{url absolute="true"}}">{{label}}</a></li>
-        {{/foreach}}
-    </ul>
-</nav>
\ No newline at end of file
+<!-- start nav -->
+{{#if isSecondary}}
+    <!-- start secondary -->
+    {{#foreach navigation}}
+        <li class="nav-{{slug}}" role="menuitem">
+            <a href="{{url}}"><span class="icon">
+                <svg class="icon" width="16" height="16" role="img" aria-label="{{slug}} icon">
+                    <title>{{slug}}</title>
+                    <use xlink:href="#{{slug}}"></use>
+                </svg>
+                </span>
+            </a>
+        </li>
+    {{/foreach}}
+    <!-- end secondary -->
+{{else}}
+    <!-- start primary -->
+    <nav id="menu">
+        <header class="major">
+            <h2>Menu</h2>
+        </header>
+        <ul class="links">
+            {{#foreach navigation}}
+            <li class="nav-{{slug}} {{#if current}}active{{/if}}"><a href="{{url absolute="true"}}"><span class="word">{{label}}</span></a></li>
+            {{/foreach}}
+        </ul>
+    </nav>
+    <!-- end primary -->
+{{/if}}
+<!-- end nav -->