|
2 | 2 |
|
3 | 3 | <html>
|
4 | 4 | <head>
|
5 |
| - <!-- Google Tag Manager --> |
6 |
| - <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': |
7 |
| - new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], |
8 |
| - j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
9 |
| - 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
10 |
| - })(window,document,'script','dataLayer','GTM-NC2Q2HQ');</script> |
11 |
| - <!-- End Google Tag Manager --> |
12 |
| - |
13 | 5 | <title>Sewing Perfect 3D Corners</title>
|
14 |
| - <link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png"> |
15 |
| - <link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png"> |
16 |
| - <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png"> |
17 |
| - <link rel="manifest" href="images/site.webmanifest"> |
| 6 | + <link rel="apple-touch-icon" sizes="180x180" href="../images/apple-touch-icon.png"> |
| 7 | + <link rel="icon" type="image/png" sizes="32x32" href="../images/favicon-32x32.png"> |
| 8 | + <link rel="icon" type="image/png" sizes="16x16" href="../images/favicon-16x16.png"> |
| 9 | + <link rel="manifest" href="../images/site.webmanifest"> |
18 | 10 | <meta charset="utf-8" />
|
19 | 11 | <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
20 | 12 | <meta name="description" content="Learn to Make Your Own Gear (MYOG). Sewing patterns and tutorials for outdoor adventurers."></head>
|
21 | 13 | <link rel="stylesheet" href="../assets/css/main.css" />
|
22 | 14 | <noscript><link rel="stylesheet" href="../assets/css/noscript.css" /></noscript>
|
23 |
| - <script src="assets/js/colorswitcher.js" defer></script> |
24 |
| - <script src="assets/js/header.js" type="text/javascript" defer></script> |
25 |
| - <script src="assets/js/footer.js" type="text/javascript" defer></script> |
| 15 | + <script src="../assets/js/colorswitcher.js" defer></script> |
| 16 | + <script src="../assets/js/header.js" type="text/javascript" defer></script> |
| 17 | + <script defer src="../assets/js/nav.js" type="text/javascript"></script> |
| 18 | + <script src="../assets/js/footer.js" type="text/javascript" defer></script> |
| 19 | + <!-- Global site tag (gtag.js) - Google Analytics GA4 --> |
| 20 | + <script async src="https://www.googletagmanager.com/gtag/js?id=G-WP4C42S5VW"></script> |
| 21 | + <script> |
| 22 | + window.dataLayer = window.dataLayer || []; |
| 23 | + function gtag(){dataLayer.push(arguments);} |
| 24 | + gtag('js', new Date()); |
| 25 | + |
| 26 | + gtag('config', 'G-WP4C42S5VW'); |
| 27 | + </script> |
| 28 | + <!-- Global site tag (gtag.js) - Google Analytics GA4 --> |
26 | 29 | </head>
|
27 | 30 | <body class="is-preload">
|
28 | 31 |
|
29 |
| - <!-- Google Tag Manager (noscript) --> |
30 |
| - <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NC2Q2HQ" |
31 |
| - height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> |
32 |
| - <!-- End Google Tag Manager (noscript) --> |
33 |
| - |
34 | 32 | <!-- Wrapper -->
|
35 | 33 | <div id="wrapper" class="divided">
|
36 | 34 |
|
37 | 35 | <!-- Banner -->
|
38 | 36 | <header-template></header-template>
|
| 37 | + |
| 38 | + <!-- Nav --> |
| 39 | + <div class="spotlight-color invert align-center"> |
| 40 | + <nav-template></nav-template> |
| 41 | + </div> |
39 | 42 |
|
40 | 43 | <div id="main"> <!-- Main -->
|
41 | 44 |
|
@@ -137,7 +140,17 @@ <h3>Turns & Tight Curves</h3>
|
137 | 140 | <script src="../assets/js/util.js"></script>
|
138 | 141 | <script src="../assets/js/main.js"></script>
|
139 | 142 | <!-- MYOG Pattern Scripts -->
|
140 |
| - |
| 143 | + <script defer> |
| 144 | + window.addEventListener('load', function () { |
| 145 | + const pgtitle = document.location.href.match(/[^\/]+$/)[0] //get page name e.g. map.html |
| 146 | + try { |
| 147 | + document.querySelector(`#nav .links a[href*="${pgtitle}"`).parentElement.classList.add("active"); |
| 148 | + console.log(pgtitle,"is a nav element. Set active.") |
| 149 | + } catch (TypeError) { |
| 150 | + console.log(pgtitle,"not a nav element.") |
| 151 | + } |
| 152 | + }, false); |
| 153 | + </script> |
141 | 154 | </body>
|
142 | 155 |
|
143 | 156 | <!--
|
|
0 commit comments