Skip to content

Commit

Permalink
chore: simplify (#7)
Browse files Browse the repository at this point in the history
Co-authored-by: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com>
  • Loading branch information
shyakadavis and shyakadavis authored Jul 17, 2024
1 parent 61950a5 commit 1922341
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/shared/demo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
</script>

<div class="grid p-12 [&:not(:nth-last-child(2))]:border-b">
<div class="grid p-12 [&:not(:last-child)]:border-b">
<a
class="group relative -ml-5 inline-block w-fit scroll-mt-20 pl-5 no-underline outline-none focus-visible:shadow-focus-ring"
href="#{id}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { Icons } from '$lib/assets/icons';
import { aside_items, type Link } from './sitemap';
import { aside_items, type Link } from '$lib/config/sitemap';
function generate_prev_next_links(current_href: string): {
prev: Link | undefined;
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/shared/page-wrapper.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { cn } from '$lib/utils';
import Footer from './footer.svelte';
let class_name: string | undefined = undefined;
export { class_name as class };
Expand All @@ -26,5 +27,5 @@
</section>
<slot></slot>
</div>
<slot name="footer"></slot>
<Footer />
</section>
File renamed without changes.
4 changes: 0 additions & 4 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import { Icons } from '$lib/assets/icons';
import PageWrapper from '$lib/components/shared/page-wrapper.svelte';
import Footer from './footer.svelte';
import IntroductionLink from './introduction-link.svelte';
const preview_icons = [
Expand Down Expand Up @@ -120,7 +119,4 @@
</div>
</IntroductionLink>
</section>
<slot name="footer">
<Footer />
</slot>
</PageWrapper>
2 changes: 1 addition & 1 deletion src/routes/aside-item.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { Badge } from '$lib/components/ui/badge';
import type { Link } from '$lib/config/sitemap';
import { cn } from '$lib/utils';
import type { Link } from './sitemap';
export let link: Link;
export let active: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/aside.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { page } from '$app/stores';
import { Badge } from '$lib/components/ui/badge';
import { aside_items } from '$lib/config/sitemap';
import AsideItem from './aside-item.svelte';
import { aside_items } from './sitemap';
$: is_active = (href: string) => {
if (href.includes('#')) {
Expand Down
4 changes: 0 additions & 4 deletions src/routes/avatar/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import Demo from '$lib/components/shared/demo.svelte';
import PageWrapper from '$lib/components/shared/page-wrapper.svelte';
import Footer from '../footer.svelte';
import Group from './group.svelte';
import group_code from './group.svelte?raw';
import Placeholder from './placeholder.svelte';
Expand All @@ -23,7 +22,4 @@
<Demo id="placeholder" class="space-y-4" code={placeholder_code}>
<Placeholder />
</Demo>
<slot name="footer">
<Footer />
</slot>
</PageWrapper>
5 changes: 0 additions & 5 deletions src/routes/badge/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import Demo from '$lib/components/shared/demo.svelte';
import PageWrapper from '$lib/components/shared/page-wrapper.svelte';
import Footer from '../footer.svelte';
import Sizes from './sizes.svelte';
import sizes_code from './sizes.svelte?raw';
import Variants from './variants.svelte';
Expand All @@ -24,8 +23,4 @@
<Demo id="with-icons" class="space-y-2" code={with_icons_code}>
<WithIcons />
</Demo>

<slot name="footer">
<Footer />
</slot>
</PageWrapper>
22 changes: 22 additions & 0 deletions src/routes/button/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { MetaTagsProps } from 'svelte-meta-tags';

export function load() {
const title = 'Button';
const description =
'Trigger an action or event, such as submitting a form or displaying a dialog.';

const pageMetaTags = Object.freeze({
title,
description,
openGraph: {
title,
description
}
}) satisfies MetaTagsProps;

return {
pageMetaTags,
title,
description
};
}
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added src/routes/button/shapes.svelte
Empty file.
Empty file added src/routes/button/sizes.svelte
Empty file.
Empty file added src/routes/button/types.svelte
Empty file.

0 comments on commit 1922341

Please sign in to comment.