|
| 1 | +<script lang="ts"> |
| 2 | + import { BookOpen } from 'lucide-svelte'; |
| 3 | +
|
| 4 | + interface Resource { |
| 5 | + title: string; |
| 6 | + description: string; |
| 7 | + date: string; |
| 8 | + keyword: string; |
| 9 | + slug: string; |
| 10 | + } |
| 11 | +
|
| 12 | + interface PageData { |
| 13 | + resources: Resource[]; |
| 14 | + } |
| 15 | +
|
| 16 | + let { data }: { data: PageData } = $props(); |
| 17 | +
|
| 18 | + function formatDate(dateStr: string): string { |
| 19 | + if (!dateStr) return ''; |
| 20 | + const date = new Date(dateStr + 'T12:00:00'); |
| 21 | + return date.toLocaleDateString('en-US', { |
| 22 | + year: 'numeric', |
| 23 | + month: 'long', |
| 24 | + day: 'numeric' |
| 25 | + }); |
| 26 | + } |
| 27 | +</script> |
| 28 | + |
| 29 | +<svelte:head> |
| 30 | + <title>Guides - Scanopy</title> |
| 31 | + <meta |
| 32 | + name="description" |
| 33 | + content="In-depth guides and reference on network documentation: automated discovery, topology mapping, integrations, and compliance." |
| 34 | + /> |
| 35 | + <link rel="canonical" href="https://scanopy.net/guides" /> |
| 36 | + |
| 37 | + <meta property="og:title" content="Guides - Scanopy" /> |
| 38 | + <meta |
| 39 | + property="og:description" |
| 40 | + content="In-depth guides and reference on network documentation: automated discovery, topology mapping, integrations, and compliance." |
| 41 | + /> |
| 42 | + <meta property="og:type" content="website" /> |
| 43 | + <meta property="og:url" content="https://scanopy.net/guides" /> |
| 44 | + |
| 45 | + <meta property="og:image" content="https://scanopy.net/social.webp" /> |
| 46 | + |
| 47 | + <meta name="twitter:card" content="summary_large_image" /> |
| 48 | + <meta name="twitter:title" content="Guides - Scanopy" /> |
| 49 | + <meta |
| 50 | + name="twitter:description" |
| 51 | + content="In-depth guides and reference on network documentation: automated discovery, topology mapping, integrations, and compliance." |
| 52 | + /> |
| 53 | + <meta name="twitter:image" content="https://scanopy.net/social.webp" /> |
| 54 | + |
| 55 | + {@html `<script type="application/ld+json">${JSON.stringify({ |
| 56 | + '@context': 'https://schema.org', |
| 57 | + '@type': 'CollectionPage', |
| 58 | + name: 'Guides - Scanopy', |
| 59 | + description: |
| 60 | + 'In-depth guides and reference on network documentation: automated discovery, topology mapping, integrations, and compliance.', |
| 61 | + url: 'https://scanopy.net/guides', |
| 62 | + isPartOf: { |
| 63 | + '@type': 'WebSite', |
| 64 | + name: 'Scanopy', |
| 65 | + url: 'https://scanopy.net' |
| 66 | + }, |
| 67 | + mainEntity: { |
| 68 | + '@type': 'ItemList', |
| 69 | + itemListElement: data.resources.map((resource, i) => ({ |
| 70 | + '@type': 'ListItem', |
| 71 | + position: i + 1, |
| 72 | + url: `https://scanopy.net/guides/${resource.slug}`, |
| 73 | + name: resource.title |
| 74 | + })) |
| 75 | + } |
| 76 | + })}</script>`} |
| 77 | +</svelte:head> |
| 78 | + |
| 79 | +<section class="py-20"> |
| 80 | + <div class="container mx-auto max-w-3xl px-4"> |
| 81 | + <div class="mb-12 text-center"> |
| 82 | + <div class="mb-4 flex justify-center"> |
| 83 | + <BookOpen class="h-12 w-12 text-blue-400" /> |
| 84 | + </div> |
| 85 | + <h1 class="mb-4 text-4xl font-bold text-white lg:text-5xl">Guides</h1> |
| 86 | + <p class="text-xl text-gray-400"> |
| 87 | + In-depth, evergreen guides on documenting, mapping, and understanding your network. |
| 88 | + </p> |
| 89 | + </div> |
| 90 | + |
| 91 | + {#if data.resources.length === 0} |
| 92 | + <div class="text-center"> |
| 93 | + <p class="text-gray-400">No guides yet. Check back soon!</p> |
| 94 | + </div> |
| 95 | + {:else} |
| 96 | + <div class="space-y-8"> |
| 97 | + {#each data.resources as resource (resource.slug)} |
| 98 | + <article |
| 99 | + class="rounded-lg border border-gray-800 p-6 transition-colors hover:border-gray-700" |
| 100 | + > |
| 101 | + <a href="/guides/{resource.slug}" class="block"> |
| 102 | + {#if resource.date} |
| 103 | + <time class="text-sm text-gray-500" datetime={resource.date}> |
| 104 | + {formatDate(resource.date)} |
| 105 | + </time> |
| 106 | + {/if} |
| 107 | + <h2 class="mt-1 text-2xl font-bold text-white hover:text-blue-400"> |
| 108 | + {resource.title} |
| 109 | + </h2> |
| 110 | + {#if resource.description} |
| 111 | + <p class="mt-2 text-gray-400">{resource.description}</p> |
| 112 | + {/if} |
| 113 | + </a> |
| 114 | + </article> |
| 115 | + {/each} |
| 116 | + </div> |
| 117 | + {/if} |
| 118 | + </div> |
| 119 | +</section> |
0 commit comments