1 <!-- This file is part of api-worker <https://github.com/senpy-club/api-worker>.
2 Copyright (C) 2022-2022 Fuwn <contact@fuwn.me>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, version 3.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 Copyright (C) 2022-2022 Fuwn <contact@fuwn.me>
17 SPDX-License-Identifier: GPL-3.0-only -->
19 import { onMount } from "svelte";
20 import { fetchRandomImage } from "$lib/api";
26 fetchTime = performance.now();
27 image = await fetchRandomImage();
28 fetchTime = performance.now() - fetchTime;
34 <title>Home | The Senpy Club</title>
41 <p>Fetching a random image...</p>
43 <div class="highlight-image">
44 <a href={`/language?language=${image.language}&image=${image.image}`}>
47 alt="Image of an anime girl holding a programming book"
52 <p>Double fetch_time = {fetchTime}; /* ms */</p>
55 <h2>Related Projects</h2>
56 <p>Check out these other [The] Senpy Club-related projects!</p>
59 <a href="https://github.com/senpy-club/api-worker" target="_blank">API</a>
60 — The Senpy Club API
63 <a href="https://github.com/senpy-club/frontend-next" target="_blank">
65 </a> — You are here!
68 <a href="https://github.com/senpy-club/cli" target="_blank">CLI</a> —
69 Access The Senpy Club API from your terminal! (and export it to files too!)
72 <a href="https://docs.rs/senpy" target="_blank"><code>senpy-rs</code></a>
73 — Access The Senpy Club API from
74 <a href="https://www.rust-lang.org/">Rust</a>!
77 <a href="https://docs.rs/senpy-ffi" target="_blank">
78 <code>senpy-ffi</code>
80 — Access The Senpy Club API from any programming language!
83 <a href="https://github.com/senpy-club/graphql-api" target="_blank">
86 — GraphQL access to The Senpy Club API! (<a
87 href="https://graphql.senpy.club/playground">Playground</a