|
1 | | -<script> |
| 1 | +<script lang="ts"> |
2 | 2 | import '@svelteness/kit-docs/client/polyfills/index.js'; |
3 | 3 | import '@svelteness/kit-docs/client/styles/normalize.css'; |
4 | 4 | import '@svelteness/kit-docs/client/styles/fonts.css'; |
5 | 5 | import '@svelteness/kit-docs/client/styles/theme.css'; |
6 | 6 | import '$lib/styles/kit-docs.css'; |
7 | 7 |
|
8 | 8 | import { page } from '$app/stores'; |
9 | | - import AnimatedJavaBanner from '$img/Animated Java 2024 Banner.svg?raw'; |
| 9 | +
|
| 10 | + import DiscordIcon from '~icons/ri/discord-fill'; |
| 11 | + import GithubIcon from '~icons/ri/github-fill'; |
10 | 12 |
|
11 | 13 | import { |
12 | 14 | Button, |
13 | 15 | KitDocs, |
14 | 16 | KitDocsLayout, |
15 | 17 | SocialLink, |
16 | | - createSidebarContext |
| 18 | + createSidebarContext, |
| 19 | + type NavbarConfig |
17 | 20 | } from '@svelteness/kit-docs'; |
| 21 | + import type { LayoutData } from './$types'; |
18 | 22 |
|
19 | | - /** @type {import('./$types').LayoutData} */ |
20 | | - export let data; |
| 23 | + export let data: LayoutData; |
21 | 24 |
|
22 | 25 | $: ({ meta, sidebar } = data); |
23 | 26 |
|
24 | | - /** @type {import('@svelteness/kit-docs').NavbarConfig} */ |
25 | | - const navbar = { |
26 | | - links: [{ title: 'Documentation', slug: '/docs', match: /\/docs/ }] |
| 27 | + const navbar: NavbarConfig = { |
| 28 | + links: [ |
| 29 | + { title: 'Home', slug: '/home', match: /\/home/ }, |
| 30 | + { title: 'Documentation', slug: '/docs', match: /\/docs/ } |
| 31 | + ] |
27 | 32 | }; |
28 | 33 |
|
29 | 34 | const { activeCategory } = createSidebarContext(sidebar); |
30 | 35 |
|
31 | 36 | $: category = $activeCategory ? `${$activeCategory}: ` : ''; |
32 | | - $: title = meta ? `${category}${meta.title} | KitDocs` : null; |
| 37 | + $: title = meta ? `${category}${meta.title} | Animated Java` : 'Animated Java'; |
33 | 38 | $: description = meta?.description; |
34 | 39 | </script> |
35 | 40 |
|
|
48 | 53 | <KitDocsLayout {navbar} {sidebar}> |
49 | 54 | <div class="logo" slot="navbar-left"> |
50 | 55 | <Button href="/"> |
51 | | - {@html AnimatedJavaBanner} |
| 56 | + <div class="header-container"> |
| 57 | + <!-- svelte-ignore a11y-missing-attribute --> |
| 58 | + <img src="/img/animated_java_icon.svg" /> |
| 59 | + <div> |
| 60 | + <h1>Animated Java</h1> |
| 61 | + </div> |
| 62 | + </div> |
52 | 63 | </Button> |
53 | 64 | </div> |
54 | 65 |
|
55 | 66 | <slot /> |
56 | | - <div class="header" slot="main-top"> |
57 | | - <div class="header-wip-warning"> |
| 67 | + |
| 68 | + <div class="footer" slot="main-bottom"> |
| 69 | + <div class="header-wip-warning" style="margin-top: 16px;"> |
58 | 70 | ⚠️ This website is a work in progress. Some pages may be incomplete or missing. ⚠️ |
59 | 71 | </div> |
60 | | - </div> |
61 | | - <div class="footer" slot="main-bottom"> |
62 | 72 | <div class="footer-social"> |
63 | | - <SocialLink type="discord" href="https://discord.com/invite/jFgY4PXZfp" /> |
64 | | - <SocialLink type="gitHub" href="https://github.com/Animated-Java/animated-java" /> |
| 73 | + <div class="social-container"> |
| 74 | + <Button title="Join our Discord Server!"> |
| 75 | + <svelte:component this={DiscordIcon} class="social-icon" /> |
| 76 | + </Button> |
| 77 | + <Button title="Check out our Source Code!"> |
| 78 | + <svelte:component this={GithubIcon} class="social-icon" /> |
| 79 | + </Button> |
| 80 | + </div> |
65 | 81 | </div> |
66 | 82 | </div> |
67 | 83 | </KitDocsLayout> |
|
103 | 119 | justify-content: center; |
104 | 120 | margin-bottom: 2rem; |
105 | 121 | } |
| 122 | +
|
| 123 | + .header-container { |
| 124 | + display: flex; |
| 125 | + align-items: center; |
| 126 | + margin-bottom: 2rem; |
| 127 | + position: relative; |
| 128 | + top: 16px; |
| 129 | + } |
| 130 | + .header-container div { |
| 131 | + display: flex; |
| 132 | + flex-direction: column; |
| 133 | + justify-content: center; |
| 134 | + margin-left: 1rem; |
| 135 | + } |
| 136 | + .header-container img { |
| 137 | + width: 48px; |
| 138 | + border-radius: 8px; |
| 139 | + box-shadow: 2px 2px 4px -2px black; |
| 140 | + } |
| 141 | + .header-container h1 { |
| 142 | + font-size: 1.5rem; |
| 143 | + } |
| 144 | +
|
| 145 | + .social-container { |
| 146 | + display: flex; |
| 147 | + flex-direction: row; |
| 148 | + justify-content: center; |
| 149 | + } |
| 150 | +
|
| 151 | + .social-container > :global(button) { |
| 152 | + font-size: 2rem; |
| 153 | + } |
106 | 154 | </style> |
0 commit comments