aboutsummaryrefslogtreecommitdiff
path: root/src/routes/tools/+page.svelte
blob: b202b31cc01ee9096b1a87575729a44cfecf5368 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<script lang="ts">
	import HeadTitle from '$lib/Home/HeadTitle.svelte';
	import Picker from '$lib/Tools/Picker.svelte';
	import { tools } from '$lib/Tools/tools.js';
	import root from '$lib/Utility/root';

	let tool = 'default';
</script>

<Picker {tool} />

<HeadTitle route={tools[tool].name()} path={`/tools?tool=${tool}`} />

<div class="card">
	<div class="tool-grid">
		{#each Object.keys(tools).filter((t) => t !== 'default') as t}
			<a href={root(`/tools/${tools[t].id}`)} on:click={() => (tool = t)}>
				<div class="tool-grid-tool card">
					<span class="title">
						{tools[t].name()}
					</span>

					<p />

					{#if tools[t].description}
						<blockquote style="margin: 0 0 0 1.5rem;">
							{tools[t].description?.()}
						</blockquote>
					{/if}
				</div>
			</a>
		{/each}
	</div>

	<p />

	<blockquote style="margin: 0 0 0 1.5rem;">
		Have any requests for cool tools that you think others might find useful? Send a private message
		to
		<a href="https://anilist.co/user/fuwn" target="_blank" rel="noopener">@fuwn</a> on AniList!
	</blockquote>
</div>

<style lang="scss">
	.tool-grid {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		grid-gap: 1rem;
	}

	.tool-grid-tool {
		display: flex;
		flex-direction: column;
		height: 100%;
		$delay: 0.25s;
		transition: transform $delay ease;

		blockquote {
			font-size: 0.9rem;
			color: var(--fg);
		}

		&:hover {
			transform: scale(1.05);
			position: relative;
			z-index: 2;
			transition: transform $delay ease;
		}
	}

	.title {
		font-weight: 500;
	}
</style>