|
27 | 27 | <!-- Canonical URL --> |
28 | 28 | <link rel="canonical" href="https://sandikodev.github.io/snapcode/"> |
29 | 29 |
|
| 30 | + <!-- Structured Data (JSON-LD) --> |
| 31 | + <script type="application/ld+json"> |
| 32 | + { |
| 33 | + "@context": "https://schema.org", |
| 34 | + "@type": "WebApplication", |
| 35 | + "name": "SnapCode", |
| 36 | + "description": "Create beautiful images of your markdown with OS window simulations, Fira Code ligatures, Mermaid diagrams, and KaTeX math formulas", |
| 37 | + "url": "https://sandikodev.github.io/snapcode", |
| 38 | + "applicationCategory": "DeveloperApplication", |
| 39 | + "operatingSystem": "Any", |
| 40 | + "offers": { |
| 41 | + "@type": "Offer", |
| 42 | + "price": "0", |
| 43 | + "priceCurrency": "USD" |
| 44 | + }, |
| 45 | + "author": { |
| 46 | + "@type": "Person", |
| 47 | + "name": "sandikodev", |
| 48 | + "url": "https://github.com/sandikodev" |
| 49 | + }, |
| 50 | + "datePublished": "2025-12-10", |
| 51 | + "softwareVersion": "1.0.0" |
| 52 | + } |
| 53 | + </script> |
| 54 | + |
30 | 55 | <!-- Favicon & Icons --> |
31 | 56 | <link rel="icon" type="image/x-icon" href="static/favicon.ico"> |
32 | 57 | <link rel="icon" type="image/png" sizes="16x16" href="static/favicon-16x16.png"> |
|
204 | 229 | } |
205 | 230 | </style> |
206 | 231 |
|
| 232 | + <!-- Tailwind CSS - MUST load first (blocking) --> |
| 233 | + <script src="https://cdn.tailwindcss.com"></script> |
| 234 | + |
207 | 235 | <!-- Preload critical scripts --> |
208 | 236 | <link rel="preload" href="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js" as="script"> |
209 | 237 | <link rel="preload" href="https://cdn.jsdelivr.net/npm/marked@11.1.1/marked.min.js" as="script"> |
210 | 238 |
|
211 | | - <!-- Critical scripts (defer for non-blocking) --> |
212 | | - <script defer src="https://cdn.tailwindcss.com"></script> |
| 239 | + <!-- Non-critical scripts (defer for non-blocking) --> |
213 | 240 | <script defer src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script> |
214 | 241 | <script defer src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js"></script> |
215 | 242 | <script defer src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-python.min.js"></script> |
|
226 | 253 | <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js"></script> |
227 | 254 |
|
228 | 255 | <style> |
| 256 | + /* Critical CSS - prevent FOUC */ |
| 257 | + body { |
| 258 | + opacity: 0; |
| 259 | + transition: opacity 0.3s ease; |
| 260 | + } |
| 261 | + body.loaded { |
| 262 | + opacity: 1; |
| 263 | + } |
| 264 | + |
229 | 265 | @keyframes gradient { |
230 | 266 | 0% { background-position: 0% 50%; } |
231 | 267 | 50% { background-position: 100% 50%; } |
|
237 | 273 | background-size: 400% 400%; |
238 | 274 | animation: gradient 15s ease infinite; |
239 | 275 | } |
| 276 | + |
| 277 | + /* Markdown bullet points fix */ |
| 278 | + .preview-content ul { |
| 279 | + list-style-type: disc !important; |
| 280 | + padding-left: 1.5em !important; |
| 281 | + margin: 0.5em 0 !important; |
| 282 | + } |
| 283 | + .preview-content ol { |
| 284 | + list-style-type: decimal !important; |
| 285 | + padding-left: 1.5em !important; |
| 286 | + margin: 0.5em 0 !important; |
| 287 | + } |
| 288 | + .preview-content li { |
| 289 | + display: list-item !important; |
| 290 | + margin: 0.25em 0 !important; |
| 291 | + } |
| 292 | + .preview-content ul ul { |
| 293 | + list-style-type: circle !important; |
| 294 | + } |
| 295 | + .preview-content ul ul ul { |
| 296 | + list-style-type: square !important; |
| 297 | + } |
| 298 | + |
| 299 | + /* Focus indicators for accessibility */ |
| 300 | + button:focus-visible, |
| 301 | + select:focus-visible, |
| 302 | + input:focus-visible, |
| 303 | + textarea:focus-visible { |
| 304 | + outline: 2px solid #8b5cf6 !important; |
| 305 | + outline-offset: 2px !important; |
| 306 | + } |
| 307 | + |
| 308 | + /* Skip to content link */ |
| 309 | + .skip-link { |
| 310 | + position: absolute; |
| 311 | + top: -40px; |
| 312 | + left: 0; |
| 313 | + background: #8b5cf6; |
| 314 | + color: white; |
| 315 | + padding: 8px 16px; |
| 316 | + z-index: 100; |
| 317 | + transition: top 0.3s; |
| 318 | + } |
| 319 | + .skip-link:focus { |
| 320 | + top: 0; |
| 321 | + } |
240 | 322 | </style> |
241 | 323 | </head> |
242 | 324 | <body> |
243 | | - <div x-data="app()" x-init="init()"> |
| 325 | + <!-- Skip to main content for accessibility --> |
| 326 | + <a href="#main-content" class="skip-link">Skip to main content</a> |
| 327 | + |
| 328 | + <div x-data="app()" x-init="init(); $nextTick(() => document.body.classList.add('loaded'))"> |
244 | 329 | <style x-html="styles"></style> |
245 | 330 |
|
246 | | - <div class="min-h-screen animated-bg p-8"> |
| 331 | + <main id="main-content" class="min-h-screen animated-bg p-8" role="main"> |
247 | 332 | <div class="max-w-7xl mx-auto"> |
248 | 333 | <div class="text-center mb-8"> |
249 | 334 | <h1 class="text-4xl font-bold text-white mb-2">SnapCode</h1> |
@@ -766,7 +851,7 @@ <h2 class="text-xl font-semibold text-white">Preview</h2> |
766 | 851 | </div> |
767 | 852 | </div> |
768 | 853 | </div> |
769 | | - </div> |
| 854 | + </main> |
770 | 855 | </div> |
771 | 856 |
|
772 | 857 | <script> |
|
0 commit comments