Skip to content

Commit

Permalink
style: remove icon in docs menu (#340)
Browse files Browse the repository at this point in the history
Replace repetitive icon with letters in doc menu.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
peterpeterparker and github-actions[bot] authored Dec 21, 2023
1 parent 3ff796d commit 5c7a4f4
Show file tree
Hide file tree
Showing 53 changed files with 33 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/docs/components/DocsIconMenu.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script lang="ts">
import { DEFAULT_ICON_SIZE } from "$lib/constants/constants";
import { menuCollapsed } from "$lib";
import { fade } from "svelte/transition";
export let text: string;
</script>

{#if $menuCollapsed}
<svg
xmlns="http://www.w3.org/2000/svg"
height={DEFAULT_ICON_SIZE}
viewBox="0 0 24 24"
width={DEFAULT_ICON_SIZE}
fill="currentColor"
in:fade><text x="4" y="20">{text}</text></svg
>
{/if}

<style lang="scss">
text {
font-size: var(--font-size-h3);
font-weight: bold;
}
</style>
16 changes: 8 additions & 8 deletions src/docs/components/DocsMenu.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from "$app/stores";
import MenuItem from "$lib/components/MenuItem.svelte";
import IconLaunchpad from "$lib/icons/IconLaunchpad.svelte";
import DocsIconMenu from "$docs/components/DocsIconMenu.svelte";
let pathname: string;
$: ({
Expand All @@ -10,38 +10,38 @@
</script>

<MenuItem href="/" selected={pathname === "/"} on:click>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="H" slot="icon" />
Home</MenuItem
>
<MenuItem href="/start" selected={pathname === "/start"} on:click>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="G" slot="icon" />
Getting Started
</MenuItem>
<MenuItem
href="/components"
selected={pathname.startsWith("/components")}
on:click
>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="C" slot="icon" />
Components
</MenuItem>
<MenuItem
href="/utility-classes"
selected={pathname.startsWith("/utility-classes")}
on:click
>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="U" slot="icon" />
Utility Classes
</MenuItem>
<MenuItem href="/styling" selected={pathname.startsWith("/styling")} on:click>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="S" slot="icon" />
Styling
</MenuItem>
<MenuItem href="/icons" selected={pathname.startsWith("/icons")} on:click>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="I" slot="icon" />
Icons
</MenuItem>
<MenuItem href="/resources" selected={pathname === "/resources"} on:click>
<IconLaunchpad slot="icon" />
<DocsIconMenu text="R" slot="icon" />
Resources
</MenuItem>

0 comments on commit 5c7a4f4

Please sign in to comment.