|
33 | 33 | <meta name="twitter:description" content="{{ page.description | default: site.description }}"> |
34 | 34 | <meta name="twitter:image" content="{{ site.url }}/assets/images/og-image.png"> |
35 | 35 |
|
36 | | - <!-- Favicons --> |
| 36 | + <!-- Favicon --> |
37 | 37 | <link rel="icon" type="image/svg+xml" href="{{ '/assets/images/favicon.svg' | relative_url }}"> |
38 | | - <link rel="icon" type="image/png" sizes="32x32" href="{{ '/assets/images/favicon-32.png' | relative_url }}"> |
39 | | - <link rel="apple-touch-icon" href="{{ '/assets/images/apple-touch-icon.png' | relative_url }}"> |
40 | 38 |
|
41 | 39 | <!-- Theme Color --> |
42 | 40 | <meta name="theme-color" content="#785D8F"> |
43 | 41 | <meta name="msapplication-TileColor" content="#785D8F"> |
44 | 42 |
|
| 43 | + <!-- Fonts --> |
| 44 | + <link rel="preconnect" href="https://fonts.googleapis.com"> |
| 45 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 46 | + <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet"> |
| 47 | + |
45 | 48 | <!-- Stylesheet --> |
46 | 49 | <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}"> |
47 | 50 |
|
|
62 | 65 | </script> |
63 | 66 | </head> |
64 | 67 | <body> |
65 | | - <!-- Reading progress bar --> |
66 | | - <div class="reading-progress" id="reading-progress"></div> |
67 | | - |
68 | 68 | <nav class="nav"> |
69 | 69 | <a href="{{ '/' | relative_url }}" class="nav-logo">{{ site.title }}</a> |
70 | 70 | <div class="nav-links"> |
|
88 | 88 | </div> |
89 | 89 | </footer> |
90 | 90 |
|
91 | | - <!-- Back to top button --> |
92 | | - <button class="back-to-top" id="back-to-top" aria-label="Back to top"> |
93 | | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> |
94 | | - <polyline points="18 15 12 9 6 15"></polyline> |
95 | | - </svg> |
96 | | - </button> |
97 | | - |
98 | | - <script> |
99 | | - // Reading progress bar |
100 | | - function updateReadingProgress() { |
101 | | - const article = document.querySelector('.content'); |
102 | | - const progressBar = document.getElementById('reading-progress'); |
103 | | - const scrollTop = window.scrollY; |
104 | | - const docHeight = article.offsetHeight - window.innerHeight; |
105 | | - const progress = Math.min((scrollTop / docHeight) * 100, 100); |
106 | | - progressBar.style.width = progress + '%'; |
107 | | - } |
108 | | - |
109 | | - // Back to top button |
110 | | - const backToTop = document.getElementById('back-to-top'); |
111 | | - |
112 | | - function toggleBackToTop() { |
113 | | - if (window.scrollY > 400) { |
114 | | - backToTop.classList.add('visible'); |
115 | | - } else { |
116 | | - backToTop.classList.remove('visible'); |
117 | | - } |
118 | | - } |
119 | | - |
120 | | - backToTop.addEventListener('click', () => { |
121 | | - window.scrollTo({ top: 0, behavior: 'smooth' }); |
122 | | - }); |
123 | | - |
124 | | - // Add anchor links to headings |
125 | | - document.querySelectorAll('h2, h3, h4').forEach(heading => { |
126 | | - if (heading.id) { |
127 | | - const anchor = document.createElement('a'); |
128 | | - anchor.className = 'anchor-link'; |
129 | | - anchor.href = '#' + heading.id; |
130 | | - anchor.textContent = '#'; |
131 | | - anchor.setAttribute('aria-label', 'Link to this section'); |
132 | | - heading.insertBefore(anchor, heading.firstChild); |
133 | | - } |
134 | | - }); |
135 | | - |
136 | | - // Smooth scroll for anchor links |
137 | | - document.querySelectorAll('a[href^="#"]').forEach(anchor => { |
138 | | - anchor.addEventListener('click', function(e) { |
139 | | - e.preventDefault(); |
140 | | - const target = document.querySelector(this.getAttribute('href')); |
141 | | - if (target) { |
142 | | - target.scrollIntoView({ behavior: 'smooth', block: 'start' }); |
143 | | - history.pushState(null, null, this.getAttribute('href')); |
144 | | - } |
145 | | - }); |
146 | | - }); |
147 | | - |
148 | | - // Event listeners |
149 | | - window.addEventListener('scroll', () => { |
150 | | - updateReadingProgress(); |
151 | | - toggleBackToTop(); |
152 | | - }); |
153 | | - |
154 | | - // Initial call |
155 | | - updateReadingProgress(); |
156 | | - toggleBackToTop(); |
157 | | - </script> |
158 | 91 | </body> |
159 | 92 | </html> |
0 commit comments