Skip to content

Commit

Permalink
Merge pull request #9 from Friends-of-Monika/layouts
Browse files Browse the repository at this point in the history
Add ToolLayout and migrate tool pages to it
  • Loading branch information
dreamscached committed Aug 5, 2024
2 parents c91253f + 420a489 commit ef16e10
Show file tree
Hide file tree
Showing 10 changed files with 5,473 additions and 2,787 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.netlify
.netlify
.yarn/install-state.gz
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ package-lock.json
yarn.lock

# Ignore third-party libs
src/highlight/*.js
src/highlight/*.js

# Yarn releases
.yarn/releases/**
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarnPath: .yarn/releases/yarn-4.4.0.cjs
nodeLinker: node-modules
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"packageManager": "[email protected]",
"name": "mas-web-utils",
"version": "1.0.0",
"private": true,
Expand Down
9 changes: 9 additions & 0 deletions src/components/SideLink.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script lang="ts">
export let href: string;
</script>

<li class="mt-1 font-medium text-blue-500 first:mt-0">
<a {href} target="_blank">
<slot />
</a>
</li>
3 changes: 3 additions & 0 deletions src/components/SideParagraph.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p class="mt-2 text-gray-700 first:mt-0">
<slot />
</p>
52 changes: 52 additions & 0 deletions src/layouts/ToolLayout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<script lang="ts">
import { Icon, ChevronDoubleDown } from "svelte-hero-icons";
</script>

<div class="h-auto w-screen lg:h-screen">
<div
class="flex h-full w-full flex-col place-content-center place-items-center justify-center lg:flex-row lg:place-content-around lg:place-items-center"
>
<div class="flex h-[90vh] w-4/5 flex-col place-content-center gap-2 p-[2%] lg:h-2/3 lg:w-1/2">
<div class="mb-3 text-center">
<h1 class="text-2xl font-medium">
<slot name="title" />
</h1>
{#if $$slots.subtitle}
<h2 class="text-xl text-gray-500">
<slot name="subtitle" />
</h2>
{/if}
</div>
<slot name="tool" />
</div>
<div class="flex h-[10vh] flex-col place-items-center gap-1 lg:hidden">
Scroll for more
<Icon src={ChevronDoubleDown} class="h-5 w-5" />
</div>
<div
class="mb-[3vh] flex min-h-[100vh] w-4/5 flex-col place-content-center gap-[5vh] p-[2%] lg:h-2/3 lg:w-1/4 lg:gap-4"
>
{#if $$slots.links}
<div>
<h1 class="mb-4 text-2xl">Helpful links</h1>
<ul>
<slot name="links" />
</ul>
</div>
{/if}
<div>
{#if $$slots.about}
<h1 class="mb-3 text-2xl">About this tool</h1>
<slot name="about" />
{/if}
<p class="mt-[3vh] text-center text-gray-500">
Made by
<span class="font-medium text-blue-500">
<a href="https://github.com/Friends-of-Monika" target="_blank"> Friends of Monika </a>
</span>
❤️
</p>
</div>
</div>
</div>
</div>
Loading

0 comments on commit ef16e10

Please sign in to comment.