Extract Vue frontend into separate container and add stp_wasm crate
Deploy with Docker Compose / deploy (push) Successful in 4m58s
Deploy with Docker Compose / deploy (push) Successful in 4m58s
Move Vue app from nginx/vue/ to top-level vue/ with its own Dockerfile, update docker-compose configs and nginx proxy to serve from the new container, and add initial Rust WASM crate (stp_wasm). Also fix .gitignore to exclude Rust target/ directories. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<main class="flex flex-col items-center">
|
||||
<div
|
||||
class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll"
|
||||
>
|
||||
<h1>404</h1>
|
||||
<RouterLink to="/" class="bdr-2">
|
||||
<img src="/img/memes/epic.jpeg" />
|
||||
</RouterLink>
|
||||
<h1>Click her, she will take you home</h1>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,255 @@
|
||||
<script setup>
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
|
||||
const links = [
|
||||
[
|
||||
"Reading Links",
|
||||
[
|
||||
{
|
||||
name: "Substack",
|
||||
link: "https://substack.com/",
|
||||
},
|
||||
{
|
||||
name: "Medium",
|
||||
link: "https://medium.com/",
|
||||
},
|
||||
{
|
||||
name: "4Chan",
|
||||
link: "https://www.4chan.org/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Job Links",
|
||||
[
|
||||
{
|
||||
name: "LinkedIn",
|
||||
link: "https://www.linkedin.com/",
|
||||
},
|
||||
{
|
||||
name: "Jack and Jill",
|
||||
link: "https://app.jackandjill.ai",
|
||||
},
|
||||
{
|
||||
name: "LinkedIn",
|
||||
link: "https://www.linkedin.com/",
|
||||
},
|
||||
{
|
||||
name: "Prospects",
|
||||
link: "https://www.prospects.ac.uk/",
|
||||
},
|
||||
{
|
||||
name: "GOV",
|
||||
link: "https://findajob.dwp.gov.uk",
|
||||
},
|
||||
{
|
||||
name: "Glassdoor",
|
||||
link: "https://www.glassdoor.co.uk/",
|
||||
},
|
||||
{
|
||||
name: "Indeed",
|
||||
link: "https://www.indeed.co.uk/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Learning Links",
|
||||
[
|
||||
{
|
||||
name: "Leetcode",
|
||||
link: "https://leetcode.com/",
|
||||
},
|
||||
{
|
||||
name: "ISLP",
|
||||
link: "https://hastie.su.domains/ISLP/ISLP_website.pdf.download.html",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Social Links",
|
||||
[
|
||||
{
|
||||
name: "Outlook",
|
||||
link: "https://outlook.live.com/",
|
||||
},
|
||||
{
|
||||
name: "Gmail",
|
||||
link: "https://mail.google.com/",
|
||||
},
|
||||
{
|
||||
name: "Whatsapp",
|
||||
link: "https://web.whatsapp.com/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Radio links",
|
||||
[
|
||||
{
|
||||
name: "Radio Helsinki",
|
||||
link: "https://www.radiohelsinki.fi/",
|
||||
},
|
||||
{
|
||||
name: "Palanga Street Radio",
|
||||
link: "https://palanga.live/",
|
||||
},
|
||||
{
|
||||
name: "IDA Radio",
|
||||
link: "https://idaidaida.net/",
|
||||
},
|
||||
{
|
||||
name: "Tīrkultūra",
|
||||
link: "https://www.tirkultura.lv/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Hacking Links",
|
||||
[
|
||||
{
|
||||
name: "pwn.college",
|
||||
link: "https://pwn.college/",
|
||||
},
|
||||
{
|
||||
name: "OSINT Framework",
|
||||
link: "https://osintframework.com/",
|
||||
},
|
||||
{
|
||||
name: "OverTheWire",
|
||||
link: "https://overthewire.org/",
|
||||
},
|
||||
{
|
||||
name: "TryHackMe",
|
||||
link: "https://tryhackme.com/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Chinese Links",
|
||||
[
|
||||
{
|
||||
name: "MDBG Chinese Dictionary",
|
||||
link: "https://www.mdbg.net/chinese/dictionary",
|
||||
},
|
||||
{
|
||||
name: "Stroke Order",
|
||||
link: "https://www.strokeorder.com/",
|
||||
},
|
||||
{
|
||||
name: "HSK 1 Peking University",
|
||||
link: "https://youtube.com/playlist?list=PLVWfp7qXLmKVfSUkucXErLncKn-JqgBbK&si=2ytO3inS8-iOAOx2",
|
||||
},
|
||||
{
|
||||
name: "Stroke Order",
|
||||
link: "https://www.strokeorder.com/",
|
||||
},
|
||||
{
|
||||
name: "Offbeat Mandarin",
|
||||
link: "https://www.youtube.com/@OffbeatMandarin",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Art links",
|
||||
[
|
||||
{
|
||||
name: "Frida Kahlo",
|
||||
link: "https://www.fridakahlo.org/",
|
||||
},
|
||||
{
|
||||
name: "Cameron's World",
|
||||
link: "https://www.cameronsworld.net/",
|
||||
},
|
||||
{
|
||||
name: "Neocities",
|
||||
link: "https://neocities.org/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Vue links",
|
||||
[
|
||||
{
|
||||
name: "Vue",
|
||||
link: "https://vuejs.org/guide/introduction.html",
|
||||
},
|
||||
{
|
||||
name: "Vue Router",
|
||||
link: "https://router.vuejs.org/introduction.html",
|
||||
},
|
||||
{
|
||||
name: "Pinia",
|
||||
link: "https://pinia.vuejs.org/introduction.html",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Go links",
|
||||
[
|
||||
{
|
||||
name: "Golang",
|
||||
link: "https://golang.org/doc/",
|
||||
},
|
||||
{
|
||||
name: "Gin Gonic",
|
||||
link: "https://gin-gonic.com/en/docs/introduction/",
|
||||
},
|
||||
{
|
||||
name: "GORM",
|
||||
link: "https://gorm.io/gen/index.html",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Doc links",
|
||||
[
|
||||
{
|
||||
name: "Rust",
|
||||
link: "https://doc.rust-lang.org/stable/book/index.html",
|
||||
},
|
||||
{
|
||||
name: "Javascript",
|
||||
link: "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
|
||||
},
|
||||
{
|
||||
name: "Python",
|
||||
link: "https://docs.python.org/3/",
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
"Article links",
|
||||
[
|
||||
{
|
||||
name: "Go and GORM",
|
||||
link: "https://medium.com/@chaewonkong/learn-go-understanding-and-implementing-foreign-keys-with-gorm-6d7608e1dbf6",
|
||||
},
|
||||
{
|
||||
name: "JWT Auth in GO",
|
||||
link: "https://medium.com/monstar-lab-bangladesh-engineering/jwt-auth-in-go-dde432440924",
|
||||
},
|
||||
{
|
||||
name: "Websockets in GO",
|
||||
link: "https://medium.com/@tanngontn/golang-gin-framework-with-normal-websocket-and-websocket-with-producer-is-rabbitmq-guide-93cad7d290f7",
|
||||
},
|
||||
],
|
||||
],
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col halftone">
|
||||
<div
|
||||
class="a4page-portrait bdr-1 flex flex-row flex-wrap overflow-x-auto gap-1"
|
||||
>
|
||||
<div class="w-full h-fit">
|
||||
<LinkTable
|
||||
class="flex flex-col flex-wrap"
|
||||
v-for="link in links"
|
||||
:title="link[0]"
|
||||
:items="link[1]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,359 @@
|
||||
<script setup>
|
||||
import Project from "./Project.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<div class="no-print w-full h-20">
|
||||
|
||||
</div>
|
||||
<div class="a4page">
|
||||
<div class="flex flex-row justify-between">
|
||||
<h1 class="name">Adam French</h1>
|
||||
<div class="contact-details text-right">
|
||||
<p>+447563266931</p>
|
||||
<p>adam.a.french@outlook.com</p>
|
||||
<h4>
|
||||
<a href="https://www.adam-french.co.uk">
|
||||
www.adam-french.co.uk
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Profile</h2>
|
||||
<p>
|
||||
First Class Honours graduate in Computer Science with Mathematics
|
||||
from the University of Leeds (81.1%), with a year abroad at the
|
||||
University of Waterloo. Proficient in full-stack development,
|
||||
systems programming, and CI/CD automation. Eager to contribute to
|
||||
a collaborative engineering team, apply strong academic
|
||||
foundations to real-world problems, and grow through hands-on
|
||||
experience.
|
||||
</p>
|
||||
|
||||
<h2>Skills</h2>
|
||||
<div class="skills-grid">
|
||||
<div><strong>Languages</strong><br /><small>Go, Rust, Python, JavaScript / TypeScript, SQL</small></div>
|
||||
<div><strong>Frontend</strong><br /><small>Vue, React / Redux, Svelte, Tailwind CSS, WebAssembly</small></div>
|
||||
<div><strong>Backend / Infra</strong><br /><small>Nginx, Docker, PostgreSQL, SQLite, JWT Auth, Git Actions</small></div>
|
||||
</div>
|
||||
|
||||
<h2>Projects</h2>
|
||||
|
||||
<Project class="border-b border-dotted">
|
||||
<template v-slot:left>
|
||||
<h4>
|
||||
<a
|
||||
href="https://www.adam-french.co.uk/gitea/adamf/web_server.git"
|
||||
>
|
||||
web_server.git
|
||||
</a>
|
||||
</h4>
|
||||
</template>
|
||||
<template v-slot:top>
|
||||
<small>
|
||||
Nginx, Vue, Postgres, Docker, Go, Python, Rust → Wasm,
|
||||
Git Actions, JWT Auth
|
||||
</small>
|
||||
<small>2025</small>
|
||||
</template>
|
||||
<p>
|
||||
Self-hosted personal website with a fully automated CI/CD
|
||||
pipeline. Iterated across diverse tech stacks including
|
||||
Svelte, React/Redux, SQLite, Rust Actix, and Deno.
|
||||
</p>
|
||||
</Project>
|
||||
<Project class="border-b border-dotted">
|
||||
<template v-slot:left>
|
||||
<h4>
|
||||
<a
|
||||
href="https://www.adam-french.co.uk/gitea/adamf/tour.git"
|
||||
>
|
||||
tour.git
|
||||
</a>
|
||||
</h4>
|
||||
</template>
|
||||
<template v-slot:top>
|
||||
<small>Rust</small>
|
||||
<small>2026</small>
|
||||
</template>
|
||||
<p>
|
||||
CLI tool for building and navigating interactive code
|
||||
tutorials, with version-traversal semantics inspired by Git.
|
||||
</p>
|
||||
</Project>
|
||||
<Project class="border-b border-dotted">
|
||||
<template v-slot:left>
|
||||
<h4>
|
||||
<a
|
||||
href="https://www.adam-french.co.uk/gitea/adamf/rust-raytracer.git"
|
||||
>
|
||||
rust-raytracer.git
|
||||
</a>
|
||||
</h4>
|
||||
</template>
|
||||
<template v-slot:top>
|
||||
<small>Rust, Linear Algebra, Multithreading</small>
|
||||
<small>2023</small>
|
||||
</template>
|
||||
<p>
|
||||
Parallelised recursive ray tracer for realistic 3D rendering.
|
||||
Emphasised algorithmic efficiency and low-level memory
|
||||
management in Rust.
|
||||
</p>
|
||||
</Project>
|
||||
<Project>
|
||||
<template #left>
|
||||
<h4>
|
||||
<a
|
||||
class="text-center w-full"
|
||||
href="https://community.wolfram.com/groups/-/m/t/3210947"
|
||||
>
|
||||
Wolfram Summer School
|
||||
</a>
|
||||
</h4>
|
||||
</template>
|
||||
<template #top>
|
||||
<small>Wolfram Mathematica</small>
|
||||
<small>2024</small>
|
||||
</template>
|
||||
<p>
|
||||
Research project on Mobile Automata with data visualisation
|
||||
and academic presentation. Delivered within a tight deadline
|
||||
in collaboration with academic mentors.
|
||||
</p>
|
||||
</Project>
|
||||
|
||||
<h2>Education</h2>
|
||||
<div class="w-full h-fit flex-row flex gap-5">
|
||||
<div class="flex-1 border-r border-dotted pr-3">
|
||||
<h3>
|
||||
<a href="https://www.adam-french.co.uk/pdf/transcript.pdf">
|
||||
University of Leeds
|
||||
</a>
|
||||
</h3>
|
||||
<div
|
||||
class="flex-row flex place-content-between m-auto place-items-center"
|
||||
>
|
||||
<small>81.1% — First Class Honours</small>
|
||||
<small>2021–2025</small>
|
||||
</div>
|
||||
<small>BSc Computer Science with Mathematics (International)</small>
|
||||
<ul>
|
||||
<li>Algorithms & Data Structures I & II</li>
|
||||
<li>Compiler Design and Construction</li>
|
||||
<li>Formal Languages & Finite Automata</li>
|
||||
<li>Graph Algorithms & Complexity Theory</li>
|
||||
<li>Machine Learning · Databases · Computer Processors</li>
|
||||
<li>Probability and Statistics I</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="flex-1 pl-3">
|
||||
<h3>University of Waterloo</h3>
|
||||
<div
|
||||
class="flex-row flex place-content-between m-auto place-items-center"
|
||||
>
|
||||
<small>Year abroad</small>
|
||||
<small>2023–2024</small>
|
||||
</div>
|
||||
<ul>
|
||||
<li>Applied Cryptography</li>
|
||||
<li>Introduction to Computer Graphics</li>
|
||||
<li>Introduction to Rings and Fields with Applications</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="no-print w-full h-20">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="a4page">
|
||||
<div class="flex-1 pl-3">
|
||||
<h2>Experience</h2>
|
||||
<Project>
|
||||
<template #left>
|
||||
<p>Hospitality</p>
|
||||
</template>
|
||||
<template #top>
|
||||
<small>Cashier, Bartender, Waiter</small>
|
||||
<small>2018–2023</small>
|
||||
</template>
|
||||
<p>
|
||||
Worked at <em>Belgrave Music Hall</em>,
|
||||
<em>The Crown and Anchor</em>, and
|
||||
<em>BFI Riverfront Kitchen</em>. Developed
|
||||
communication, composure under pressure, and
|
||||
reliability in customer-facing roles.
|
||||
</p>
|
||||
</Project>
|
||||
<h2>Interests</h2>
|
||||
<ul>
|
||||
<li>Leetcode — daily competitive problem solving</li>
|
||||
<li>Learning Mandarin</li>
|
||||
<li>Rhythm Games</li>
|
||||
<li>Climbing · Gym</li>
|
||||
<li>Board games · Meetup.com</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="no-print w-full h-20">
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Fonts */
|
||||
@font-face {
|
||||
font-family: "big_noodle_titling";
|
||||
src: url("/fonts/big_noodle_titling.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "CreatoDisplay";
|
||||
src: url("/fonts/CreatoDisplay-Bold.otf") format("opentype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Variables */
|
||||
* {
|
||||
--primary: black;
|
||||
--secondary: #0000ff;
|
||||
--tertiary: #ff0000;
|
||||
--quaternary: #cccccc;
|
||||
--background: white;
|
||||
|
||||
--font-heading: big_noodle_titling;
|
||||
--font-text: CreatoDisplay;
|
||||
--font-size-name: 2.5em;
|
||||
--font-size-text: 100%;
|
||||
--font-size-small: 0.9em;
|
||||
--font-size-heading: 2.1em;
|
||||
--font-size-subheading: 1.7em;
|
||||
--font-size-subsubheading: 1.4em;
|
||||
}
|
||||
|
||||
/* A4 Page */
|
||||
.a4page {
|
||||
line-height: 1.6;
|
||||
font-family: var(--font-text);
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
padding: 5mm;
|
||||
box-sizing: border-box;
|
||||
background-color: var(--background);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid var(--primary);
|
||||
overflow: hidden;
|
||||
margin: auto auto;
|
||||
}
|
||||
|
||||
/* Component Styling */
|
||||
main {
|
||||
padding: 0px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
span {
|
||||
height: 2em;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
border: none;
|
||||
color: var(--primary);
|
||||
font-family: var(--font-heading);
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: var(--font-size-heading);
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-bottom: 1px solid var(--primary);
|
||||
font-size: var(--font-size-subheading);
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: var(--font-size-subsubheading);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--tertiary);
|
||||
}
|
||||
a {
|
||||
background-color: transparent;
|
||||
color: var(--secondary);
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0.2em;
|
||||
color: var(--primary);
|
||||
font-size: var(--font-size-text);
|
||||
}
|
||||
|
||||
table {
|
||||
color: var(--secondary);
|
||||
border-collapse: collapse;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
td {
|
||||
color: var(--secondary);
|
||||
border-top: 1px solid var(--tertiary);
|
||||
padding: 1px 10px 1px 10px;
|
||||
font-size: var(--font-size-text);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
color: var(--secondary);
|
||||
border: 2px solid var(--tertiary);
|
||||
padding: 1px 0px 1px 7px;
|
||||
font-family: var(--font-heading);
|
||||
font-size: var(--font-size-subsubheading);
|
||||
background-color: var(--quaternary);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.no-print {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
ul {
|
||||
font-size: var(--font-size-small);
|
||||
margin: 0;
|
||||
padding-left: 1.2em;
|
||||
}
|
||||
|
||||
li {
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.skills-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 0.3em 1em;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,17 @@
|
||||
<script setup></script>
|
||||
|
||||
<template>
|
||||
<div class="flex-row flex">
|
||||
<div class="w-2/7 p-5 m-auto">
|
||||
<slot name="left" />
|
||||
</div>
|
||||
<div class="w-full p-2">
|
||||
<div
|
||||
class="flex-row flex place-content-between m-auto place-items-center"
|
||||
>
|
||||
<slot name="top" />
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,56 @@
|
||||
<script setup>
|
||||
import Link from "@/components/text/Link.vue";
|
||||
import InlineLink from "@/components/text/InlineLink.vue";
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import Paragraph from "@/components/text/Paragraph.vue";
|
||||
|
||||
const links = [
|
||||
{ name: "GitHub", href: "https://github.com/SteveThePug" },
|
||||
{ name: "Gitea", href: "/gitea/explore/repos" },
|
||||
{ name: "Spotify", href: "https://open.spotify.com/user/stevethepug" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="halftone flex justify-center px-4 py-16">
|
||||
<div class="max-w-xl w-full flex flex-col gap-12">
|
||||
<section>
|
||||
<Header>Adam French</Header>
|
||||
<Paragraph>
|
||||
Junior software engineer focused on full-stack development,
|
||||
systems programming, and infrastructure. First Class Honours
|
||||
in Computer Science with Mathematics from Leeds and
|
||||
Waterloo.
|
||||
</Paragraph>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<Header>About</Header>
|
||||
<Paragraph>
|
||||
This website is self-hosted and has a lot more on it than it
|
||||
needs to. Please have a look at my
|
||||
<InlineLink to="/cv">CV</InlineLink> for a full breakdown of
|
||||
my experience, projects, and skills. Please visit
|
||||
<InlineLink to="/stp">STP</InlineLink> for the prefered but
|
||||
less professional experience.
|
||||
</Paragraph>
|
||||
</section>
|
||||
|
||||
<nav class="navRow flex flex-row flex-wrap gap-4 justify-around">
|
||||
<Link to="/cv"> CV </Link>
|
||||
<Link to="/stp"> STP </Link>
|
||||
<Link href="mailto:[email protected]"> Email </Link>
|
||||
<Link v-for="link in links" :key="link.name" :href="link.href">
|
||||
{{ link.name }}
|
||||
</Link>
|
||||
</nav>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.navRow > a {
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid currentColor;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,75 @@
|
||||
<script setup>
|
||||
import Markdown from "@/components/util/Markdown.vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import axios from "axios";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const file = ref(null);
|
||||
const filename = ref("");
|
||||
const last_edited = ref(null);
|
||||
|
||||
// if the address is https://www.adam-french.co.uk/notes/PATH
|
||||
// request from https://www.adam-french.co.uk/api/notes/PATH
|
||||
const route = useRoute();
|
||||
const pathArray = route.params.path;
|
||||
const path = Array.isArray(pathArray) ? pathArray.join("/") : pathArray;
|
||||
const url = `/api/notes/${path}`;
|
||||
|
||||
function getFilename(headers) {
|
||||
const disposition = headers["content-disposition"];
|
||||
if (!disposition) return null;
|
||||
|
||||
const match = disposition.match(/filename="?([^"]+)"?/);
|
||||
return match ? match[1] : null;
|
||||
}
|
||||
|
||||
async function fetchFile() {
|
||||
const response = await axios.get(url, { responseType: "blob" });
|
||||
filename.value = getFilename(response.headers);
|
||||
|
||||
const lastModified = response.headers["last-modified"];
|
||||
last_edited.value = lastModified ? new Date(lastModified) : null;
|
||||
|
||||
if (filename.value.toLowerCase().endsWith(".md")) {
|
||||
const text = await response.data.text();
|
||||
file.value = fixLinks(text);
|
||||
} else {
|
||||
file.value = response.data;
|
||||
}
|
||||
}
|
||||
|
||||
function fixLinks(filedata) {
|
||||
return filedata.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (match, text, url) => {
|
||||
if (
|
||||
url.startsWith("http://") ||
|
||||
url.startsWith("https://") ||
|
||||
url.startsWith("#") ||
|
||||
url.startsWith("./") ||
|
||||
url.startsWith("../") ||
|
||||
url.startsWith("//")
|
||||
) {
|
||||
return match;
|
||||
}
|
||||
|
||||
return `[${text}](/notes/${url})`;
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(fetchFile);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col">
|
||||
<div class="background halftone" />
|
||||
<div
|
||||
v-if="file"
|
||||
class="a4page-portrait border-primary-1 flex flex-col relative overflow-scroll gap-1 bg-bg_primary"
|
||||
>
|
||||
<h1>{{ filename }}</h1>
|
||||
<small>{{ last_edited }}</small>
|
||||
<Markdown class="flex-1 border-box text-wrap" :source="file" />
|
||||
</div>
|
||||
|
||||
<div v-else>Loading…</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,20 @@
|
||||
<script setup>
|
||||
import RouterTable from "@/components/util/RouterTable.vue";
|
||||
const shrine_links = [
|
||||
{ name: "Demoman", link: "/shrines/demoman" },
|
||||
{ name: "Evangelion", link: "/shrines/evangelion" },
|
||||
{ name: "GTO", link: "/shrines/gto" },
|
||||
{ name: "Skipskipbenben", link: "/shrines/skipskipbenben" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col">
|
||||
<div class="background halftone" />
|
||||
<div
|
||||
class="a4page-portrait bdr-1 flex flex-col relative overflow-scroll gap-1"
|
||||
>
|
||||
<RouterTable :linkArr="shrine_links" />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,28 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
|
||||
import Login from "./Login.vue";
|
||||
import CreateUser from "./CreateUser.vue";
|
||||
import CreatePost from "./CreatePost.vue";
|
||||
import CreateFavorite from "./CreateFavorite.vue";
|
||||
import CreateActivity from "./CreateActivity.vue";
|
||||
import CreateRowing from "./CreateRowing.vue";
|
||||
import ManageUsers from "./ManageUsers.vue";
|
||||
|
||||
const auth = useAuthStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="halftone justify-center flex flex-row w-full h-full">
|
||||
<div class="a5page-portrait bdr-1 flex flex-col">
|
||||
<Login class="bdr-2 bg-bg_primary" />
|
||||
<CreateUser class="bdr-2 bg-bg_primary" v-if="auth.loggedIn" />
|
||||
<CreatePost class="bdr-2 bg-bg_primary" v-if="auth.loggedIn" />
|
||||
<CreateFavorite class="bdr-2 bg-bg_primary" v-if="auth.loggedIn" />
|
||||
<CreateActivity class="bdr-2 bg-bg_primary" v-if="auth.loggedIn" />
|
||||
<CreateRowing class="bdr-2 bg-bg_primary" v-if="auth.loggedIn" />
|
||||
<ManageUsers class="bdr-2 bg-bg_primary" v-if="auth.loggedIn" />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,35 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
|
||||
import { ref } from "vue";
|
||||
import { gql } from "@/graphql";
|
||||
|
||||
const type = ref("");
|
||||
const name = ref("");
|
||||
const link = ref("");
|
||||
|
||||
async function post() {
|
||||
try {
|
||||
const data = await gql(
|
||||
`mutation CreateActivity($input: CreateActivityInput!) { createActivity(input: $input) { id } }`,
|
||||
{ input: { type: type.value, name: name.value, link: link.value || undefined } },
|
||||
);
|
||||
type.value = "";
|
||||
name.value = "";
|
||||
link.value = "";
|
||||
console.log(data.createActivity);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col">
|
||||
<h1>Create Activity</h1>
|
||||
<input type="text" v-model="type" placeholder="Type" @keyup.enter="post" />
|
||||
<input type="text" v-model="name" placeholder="Name" @keyup.enter="post" />
|
||||
<input type="text" v-model="link" placeholder="Link" @keyup.enter="post" />
|
||||
<Button @click="post">Upload</Button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,35 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
|
||||
import { ref } from "vue";
|
||||
import { gql } from "@/graphql";
|
||||
|
||||
const type = ref("");
|
||||
const name = ref("");
|
||||
const link = ref("");
|
||||
|
||||
async function post() {
|
||||
try {
|
||||
const data = await gql(
|
||||
`mutation CreateFavorite($input: CreateFavoriteInput!) { createFavorite(input: $input) { id } }`,
|
||||
{ input: { type: type.value, name: name.value, link: link.value || undefined } },
|
||||
);
|
||||
type.value = "";
|
||||
name.value = "";
|
||||
link.value = "";
|
||||
console.log(data.createFavorite);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col">
|
||||
<h1>Create Favorite</h1>
|
||||
<input type="text" v-model="type" placeholder="Type" @keyup.enter="post" />
|
||||
<input type="text" v-model="name" placeholder="Name" @keyup.enter="post" />
|
||||
<input type="text" v-model="link" placeholder="Link" @keyup.enter="post" />
|
||||
<Button @click="post">Upload</Button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,36 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
import { ref } from "vue";
|
||||
import { gql } from "@/graphql";
|
||||
|
||||
const title = ref("");
|
||||
const content = ref("");
|
||||
|
||||
async function post() {
|
||||
try {
|
||||
const data = await gql(
|
||||
`mutation CreatePost($input: CreatePostInput!) { createPost(input: $input) { id } }`,
|
||||
{ input: { title: title.value, content: content.value } },
|
||||
);
|
||||
title.value = "";
|
||||
content.value = "";
|
||||
console.log(data.createPost);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col">
|
||||
<h1>Create Post</h1>
|
||||
<input type="text" v-model="title" placeholder="Title" @keyup.enter="post" />
|
||||
<textarea
|
||||
class="h-50"
|
||||
v-model="content"
|
||||
placeholder="Content"
|
||||
></textarea>
|
||||
<Button @click="post">Upload</Button>
|
||||
<!-- make textarea take up most the space -->
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,51 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
import { ref } from "vue";
|
||||
import axios from "axios";
|
||||
|
||||
const images = ref([]);
|
||||
const results = ref([]);
|
||||
|
||||
function onFileChange(e) {
|
||||
images.value = Array.from(e.target.files);
|
||||
results.value = [];
|
||||
}
|
||||
|
||||
async function submit() {
|
||||
if (!images.value.length) return;
|
||||
results.value = images.value.map((f) => ({ name: f.name, status: "Uploading..." }));
|
||||
|
||||
await Promise.all(
|
||||
images.value.map(async (file, i) => {
|
||||
const formData = new FormData();
|
||||
formData.append("image", file);
|
||||
try {
|
||||
const res = await axios.post("/api/rowing", formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
const mins = Math.floor(res.data.Time / 1e9 / 60);
|
||||
const secs = String(Math.floor((res.data.Time / 1e9) % 60)).padStart(2, "0");
|
||||
results.value[i].status = `${res.data.Distance}m in ${mins}:${secs}`;
|
||||
results.value[i].ok = true;
|
||||
} catch (err) {
|
||||
results.value[i].status = err.response?.data?.error || "Upload failed";
|
||||
results.value[i].ok = false;
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
images.value = [];
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-2">
|
||||
<h1>Create Rowing</h1>
|
||||
<input type="file" accept="image/jpeg,image/png,image/gif,image/webp" multiple @change="onFileChange" />
|
||||
<Button @click="submit">Upload</Button>
|
||||
<div v-for="r in results" :key="r.name">
|
||||
<span class="text-primary">{{ r.name }}: </span>
|
||||
<span :class="r.ok ? 'text-secondary' : 'text-red-500'">{{ r.status }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,45 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
import { ref } from "vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { gql } from "@/graphql";
|
||||
|
||||
const auth = useAuthStore();
|
||||
const username = ref("");
|
||||
const password = ref("");
|
||||
const message = ref("");
|
||||
const error = ref("");
|
||||
|
||||
async function handleCreate() {
|
||||
message.value = "";
|
||||
error.value = "";
|
||||
try {
|
||||
const data = await gql(
|
||||
`mutation CreateUser($input: CreateUserInput!) { createUser(input: $input) { id username } }`,
|
||||
{ input: { username: username.value, password: password.value } },
|
||||
);
|
||||
message.value = `User "${data.createUser.username}" created successfully.`;
|
||||
username.value = "";
|
||||
password.value = "";
|
||||
} catch (err) {
|
||||
error.value = err.message || "Failed to create user.";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="auth.loggedIn && auth.user.admin" class="flex flex-col">
|
||||
<h1>Create User</h1>
|
||||
<p v-if="message" class="text-green-500">{{ message }}</p>
|
||||
<p v-if="error" class="text-red-500">{{ error }}</p>
|
||||
<input type="text" v-model="username" placeholder="Username" @keyup.enter="handleCreate" />
|
||||
<input type="password" v-model="password" placeholder="Password" @keyup.enter="handleCreate" />
|
||||
<Button @click="handleCreate">Create Account</Button>
|
||||
</div>
|
||||
<div v-else-if="auth.loggedIn" class="flex flex-col">
|
||||
<p>You do not have permission to create users.</p>
|
||||
</div>
|
||||
<div v-else class="flex flex-col">
|
||||
<p>You must be logged in as an admin to create users.</p>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,34 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, computed } from "vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
|
||||
import Button from "@/components/input/Button.vue";
|
||||
|
||||
const auth = useAuthStore();
|
||||
const username = ref("");
|
||||
const password = ref("");
|
||||
|
||||
function handleLogin() {
|
||||
auth.logIn(username.value, password.value);
|
||||
}
|
||||
|
||||
function handleLogout() {
|
||||
auth.logOut();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="auth.loggedIn" class="flex flex-col">
|
||||
<h1>Logged in</h1>
|
||||
<p>{{ auth.user.id }}</p>
|
||||
<p>{{ auth.user.username }}</p>
|
||||
<p>{{ auth.user.admin }}</p>
|
||||
<Button @click="handleLogout">Log Out</Button>
|
||||
</div>
|
||||
<div v-else class="flex flex-col">
|
||||
<h1>Login</h1>
|
||||
<input type="text" v-model="username" placeholder="Username" @keyup.enter="handleLogin" />
|
||||
<input type="password" v-model="password" placeholder="Password" @keyup.enter="handleLogin" />
|
||||
<Button @click="handleLogin">Log In</Button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,45 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { gql } from "@/graphql";
|
||||
|
||||
const auth = useAuthStore();
|
||||
const users = ref([]);
|
||||
|
||||
async function fetchUsers() {
|
||||
try {
|
||||
const data = await gql(`query { users { id username admin } }`);
|
||||
users.value = data.users;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
async function toggleAdmin(user) {
|
||||
try {
|
||||
const data = await auth.setUserAdmin(user.id, !user.admin);
|
||||
user.admin = data.admin;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(fetchUsers);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col">
|
||||
<h1>Manage Users</h1>
|
||||
<div v-for="user in users" :key="user.id" class="flex flex-row items-center gap-2">
|
||||
<span>{{ user.username }}</span>
|
||||
<span v-if="user.admin">(admin)</span>
|
||||
<Button
|
||||
v-if="user.id !== auth.user.id"
|
||||
@click="toggleAdmin(user)"
|
||||
>
|
||||
{{ user.admin ? "Demote" : "Promote" }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,42 @@
|
||||
<script setup lang="ts">
|
||||
import { useTemplateRef, ref, onMounted, onUnmounted } from 'vue';
|
||||
|
||||
const display = useTemplateRef('display')
|
||||
const displayText = ref("");
|
||||
|
||||
const charHeight: number = 14;
|
||||
const charWidth: number = charHeight * 0.6;
|
||||
let n: number;
|
||||
let m: number;
|
||||
|
||||
function setup() {
|
||||
display.value.style.fontSize = `${charHeight}px`;
|
||||
display.value.style.lineHeight = `${charHeight}px`;
|
||||
fillDisplay()
|
||||
}
|
||||
|
||||
function fillDisplay() {
|
||||
// M rows N columns
|
||||
m = Math.floor(display.value.offsetHeight / charHeight);
|
||||
n = Math.floor(display.value.offsetWidth / charWidth);
|
||||
const row = ' '.repeat(n);
|
||||
displayText.value = (row + '\n').repeat(m - 1) + row
|
||||
}
|
||||
|
||||
function close() {
|
||||
displayText.value = ""
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
setup()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
close()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<pre class="overflow-scroll w-full h-full bg-black text-white m-0 p-0" id="container" ref="display">{{ displayText
|
||||
}}</pre>
|
||||
</template>
|
||||
@@ -0,0 +1,15 @@
|
||||
<script setup>
|
||||
import Slideshow from "@/components/util/Slideshow.vue";
|
||||
|
||||
const images = [
|
||||
{ url: "/img/memes/pidgeon.gif", comment: "鸟" },
|
||||
// { url: "/img/memes/no_slip.png" },
|
||||
// { url: "/img/memes/epic.jpeg" },
|
||||
// { url: "/img/bedroom/img2.png", comment: "办公桌" },
|
||||
// { url: "/img/bedroom/img1.png", comment: "床" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Slideshow :images="images" />
|
||||
</template>
|
||||
@@ -0,0 +1,18 @@
|
||||
<script setup>
|
||||
import AutoScroll from "@/components/util/AutoScroll.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
import Header from "@/components/text/Header.vue";
|
||||
|
||||
import { useActivityStore } from "@/stores/activity";
|
||||
|
||||
const activityStore = useActivityStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col items-center">
|
||||
<Header>Consumption</Header>
|
||||
<AutoScroll class="flex-1 w-full">
|
||||
<LinkTable variant="table" class="w-full" :items="activityStore.activity" />
|
||||
</AutoScroll>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup>
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
import AutoScroll from "@/components/util/AutoScroll.vue";
|
||||
|
||||
import { useFavoritesStore } from "@/stores/favorites";
|
||||
|
||||
const favoritesStore = useFavoritesStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col items-center">
|
||||
<Header>favs</Header>
|
||||
<AutoScroll class="w-full flex-1">
|
||||
<LinkTable
|
||||
variant="table"
|
||||
class="w-full"
|
||||
:items="favoritesStore.favorites"
|
||||
/>
|
||||
</AutoScroll>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,82 @@
|
||||
<script setup>
|
||||
import Button from "@/components/input/Button.vue";
|
||||
import Markdown from "@/components/util/Markdown.vue";
|
||||
import Header from "@/components/text/Header.vue";
|
||||
|
||||
import { ref, computed, onBeforeMount } from "vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { usePostsStore } from "@/stores/posts";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const postsStore = usePostsStore();
|
||||
|
||||
const idx = ref(0);
|
||||
|
||||
const leftCap = computed(() => idx.value === 0);
|
||||
const rightCap = computed(() => idx.value === postsStore.postsCount - 1);
|
||||
|
||||
const post = computed(() => postsStore.posts[idx.value]);
|
||||
const userOwnsPost = computed(
|
||||
() => post.value.author.username == authStore.user.username,
|
||||
);
|
||||
|
||||
function nextPost() {
|
||||
if (idx.value < postsStore.postsCount - 1) {
|
||||
idx.value++;
|
||||
}
|
||||
}
|
||||
|
||||
function prevPost() {
|
||||
if (idx.value > 0) {
|
||||
idx.value--;
|
||||
}
|
||||
}
|
||||
|
||||
function deletePost() {
|
||||
postsStore.deletePost(post.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col flex-1 min-h-0">
|
||||
<Header>{{ post.title }}</Header>
|
||||
<div
|
||||
class="flex flex-col flex-1 min-h-0 p-1 overflow-auto text-left items-start justify-start"
|
||||
>
|
||||
<small
|
||||
>Created at:
|
||||
{{ new Date(post.createdAt).toLocaleString() }}</small
|
||||
>
|
||||
<small>By: {{ post.author.username }}</small>
|
||||
<Markdown
|
||||
class="flex-1 border-box text-wrap"
|
||||
:source="post.content"
|
||||
/>
|
||||
<div class="flex flex-row w-full">
|
||||
<Button
|
||||
class="flex-1 border-box"
|
||||
v-if="!leftCap"
|
||||
@click="prevPost"
|
||||
>
|
||||
Prev
|
||||
</Button>
|
||||
<Button
|
||||
class="flex-1 border-box"
|
||||
v-if="!rightCap"
|
||||
@click="nextPost"
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</div>
|
||||
<Button class="w-full" v-if="userOwnsPost" @click="deletePost"
|
||||
>Delete</Button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
<script setup>
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
const gym = [
|
||||
{ name: "Row", type: "30 min" },
|
||||
{ name: "Run", type: "5k" },
|
||||
{ name: "Pushup & Squat", type: "50" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col place-content-between items-center">
|
||||
<Header>Gym</Header>
|
||||
<p>I'm not a gym geek</p>
|
||||
<p>4/7 days I do:</p>
|
||||
<div class="overflow-scroll w-full border-box">
|
||||
<LinkTable variant="table" class="w-full" :items="gym" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,318 @@
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import { useHomeDataStore } from "@/stores/homeData";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const store = useHomeDataStore();
|
||||
const { loaded, error, rowingSessions } = storeToRefs(store);
|
||||
|
||||
const rows = computed(() => rowingSessions.value.slice().reverse());
|
||||
const loading = computed(() => !loaded.value);
|
||||
|
||||
const metric = ref("distance");
|
||||
const hovered = ref(null);
|
||||
|
||||
const METRICS = [
|
||||
{ key: "distance", label: "Distance (m)", color: "#55ffbb" },
|
||||
{ key: "timePer500m", label: "Pace /500m", color: "#ff579a" },
|
||||
{ key: "calories", label: "Calories", color: "#62ff57" },
|
||||
];
|
||||
|
||||
const activeMetric = computed(() =>
|
||||
METRICS.find((m) => m.key === metric.value),
|
||||
);
|
||||
|
||||
// SVG layout constants
|
||||
const W = 290;
|
||||
const H = 120;
|
||||
const PL = 46; // padding left
|
||||
const PT = 8; // padding top
|
||||
const PR = 8; // padding right
|
||||
const PB = 28; // padding bottom
|
||||
const PLOT_W = W - PL - PR;
|
||||
const PLOT_H = H - PT - PB;
|
||||
|
||||
const chartData = computed(() =>
|
||||
rows.value.map((r) => ({
|
||||
date: new Date(r.date),
|
||||
value: r[metric.value],
|
||||
raw: r,
|
||||
})),
|
||||
);
|
||||
|
||||
const minVal = computed(() => Math.min(...chartData.value.map((d) => d.value)));
|
||||
const maxVal = computed(() => Math.max(...chartData.value.map((d) => d.value)));
|
||||
|
||||
const points = computed(() => {
|
||||
const data = chartData.value;
|
||||
const n = data.length;
|
||||
if (!n) return [];
|
||||
const min = minVal.value;
|
||||
const range = maxVal.value - min || 1;
|
||||
return data.map((d, i) => ({
|
||||
x: PL + (n <= 1 ? PLOT_W / 2 : (i / (n - 1)) * PLOT_W),
|
||||
y: PT + PLOT_H - ((d.value - min) / range) * PLOT_H,
|
||||
date: d.date,
|
||||
value: d.value,
|
||||
raw: d.raw,
|
||||
}));
|
||||
});
|
||||
|
||||
const polyline = computed(() =>
|
||||
points.value.map((p) => `${p.x},${p.y}`).join(" "),
|
||||
);
|
||||
|
||||
const xLabels = computed(() => {
|
||||
const data = chartData.value;
|
||||
const pts = points.value;
|
||||
if (!data.length) return [];
|
||||
const indices = new Set([
|
||||
0,
|
||||
Math.floor((data.length - 1) / 2),
|
||||
data.length - 1,
|
||||
]);
|
||||
return [...indices].map((i) => ({
|
||||
x: pts[i].x,
|
||||
label: data[i].date.toLocaleDateString("en-GB", {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
}),
|
||||
}));
|
||||
});
|
||||
|
||||
const yLabels = computed(() => {
|
||||
const min = minVal.value;
|
||||
const max = maxVal.value;
|
||||
return [0, 0.5, 1].map((t) => {
|
||||
const raw = Math.round(min + t * (max - min));
|
||||
return {
|
||||
y: PT + PLOT_H - t * PLOT_H,
|
||||
label: metric.value === "timePer500m" ? formatTime(raw) : raw,
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
function formatTime(secs) {
|
||||
const m = Math.floor(secs / 60);
|
||||
const s = Math.round(secs % 60);
|
||||
return `${m}:${String(s).padStart(2, "0")}`;
|
||||
}
|
||||
|
||||
function formatValue(key, val) {
|
||||
if (key === "timePer500m") return formatTime(val) + " /500m";
|
||||
if (key === "distance") return val + " m";
|
||||
if (key === "calories") return Math.round(val) + " kcal";
|
||||
return val;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col h-full overflow-hidden">
|
||||
<Header>Rowing</Header>
|
||||
|
||||
<div v-if="loading" class="flex-1 flex items-center justify-center">
|
||||
<p>Loading...</p>
|
||||
</div>
|
||||
<div v-else-if="error" class="flex-1 flex items-center justify-center">
|
||||
<p class="text-tertiary text-xs">{{ error }}</p>
|
||||
</div>
|
||||
<div v-else class="flex flex-col flex-1 px-1 pb-1 gap-1 overflow-hidden">
|
||||
<!-- Metric tabs -->
|
||||
<div class="flex gap-1 pt-1">
|
||||
<button
|
||||
v-for="m in METRICS"
|
||||
:key="m.key"
|
||||
class="metric-btn text-xs px-2 py-0.5 font-heading border"
|
||||
:style="{
|
||||
borderColor: m.color,
|
||||
color: metric === m.key ? '#1b110e' : m.color,
|
||||
backgroundColor: metric === m.key ? m.color : 'transparent',
|
||||
}"
|
||||
@click="metric = m.key"
|
||||
>
|
||||
{{ m.label }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- SVG Chart -->
|
||||
<div class="flex-1 relative">
|
||||
<svg
|
||||
:viewBox="`0 0 ${W} ${H}`"
|
||||
width="100%"
|
||||
height="100%"
|
||||
preserveAspectRatio="none"
|
||||
class="overflow-visible"
|
||||
>
|
||||
<!-- Grid lines -->
|
||||
<line
|
||||
v-for="yl in yLabels"
|
||||
:key="yl.y"
|
||||
:x1="PL"
|
||||
:y1="yl.y"
|
||||
:x2="W - PR"
|
||||
:y2="yl.y"
|
||||
stroke="var(--quaternary)"
|
||||
stroke-width="0.5"
|
||||
/>
|
||||
|
||||
<!-- Area fill -->
|
||||
<polygon
|
||||
v-if="points.length"
|
||||
:points="`${PL},${PT + PLOT_H} ${polyline} ${W - PR},${PT + PLOT_H}`"
|
||||
:fill="activeMetric.color"
|
||||
fill-opacity="0.08"
|
||||
/>
|
||||
|
||||
<!-- Line -->
|
||||
<polyline
|
||||
v-if="points.length"
|
||||
:points="polyline"
|
||||
:stroke="activeMetric.color"
|
||||
stroke-width="1.5"
|
||||
fill="none"
|
||||
stroke-linejoin="round"
|
||||
stroke-linecap="round"
|
||||
/>
|
||||
|
||||
<!-- Data points -->
|
||||
<circle
|
||||
v-for="(p, i) in points"
|
||||
:key="i"
|
||||
:cx="p.x"
|
||||
:cy="p.y"
|
||||
:r="hovered === i ? 4 : 2"
|
||||
:fill="activeMetric.color"
|
||||
style="cursor: pointer"
|
||||
@mouseenter="hovered = i"
|
||||
@mouseleave="hovered = null"
|
||||
/>
|
||||
|
||||
<!-- Y axis labels -->
|
||||
<text
|
||||
v-for="yl in yLabels"
|
||||
:key="`y${yl.y}`"
|
||||
:x="PL - 3"
|
||||
:y="yl.y + 3"
|
||||
text-anchor="end"
|
||||
font-size="10"
|
||||
fill="var(--primary)"
|
||||
font-family="var(--font_heading)"
|
||||
>
|
||||
{{ yl.label }}
|
||||
</text>
|
||||
|
||||
<!-- X axis labels -->
|
||||
<text
|
||||
v-for="xl in xLabels"
|
||||
:key="`x${xl.x}`"
|
||||
:x="xl.x"
|
||||
:y="H - 4"
|
||||
text-anchor="middle"
|
||||
font-size="10"
|
||||
fill="var(--primary)"
|
||||
font-family="var(--font_heading)"
|
||||
>
|
||||
{{ xl.label }}
|
||||
</text>
|
||||
|
||||
<!-- Axes -->
|
||||
<line
|
||||
:x1="PL"
|
||||
:y1="PT"
|
||||
:x2="PL"
|
||||
:y2="PT + PLOT_H"
|
||||
stroke="var(--primary)"
|
||||
stroke-width="0.5"
|
||||
/>
|
||||
<line
|
||||
:x1="PL"
|
||||
:y1="PT + PLOT_H"
|
||||
:x2="W - PR"
|
||||
:y2="PT + PLOT_H"
|
||||
stroke="var(--primary)"
|
||||
stroke-width="0.5"
|
||||
/>
|
||||
|
||||
<!-- Tooltip -->
|
||||
<g v-if="hovered !== null && points[hovered]">
|
||||
<rect
|
||||
:x="Math.min(points[hovered].x + 4, W - 85)"
|
||||
:y="points[hovered].y - 20"
|
||||
width="82"
|
||||
height="32"
|
||||
fill="var(--bg_primary)"
|
||||
:stroke="activeMetric.color"
|
||||
stroke-width="0.5"
|
||||
rx="1"
|
||||
/>
|
||||
<text
|
||||
:x="Math.min(points[hovered].x + 7, W - 82)"
|
||||
:y="points[hovered].y - 6"
|
||||
font-size="12"
|
||||
fill="var(--secondary)"
|
||||
font-family="var(--font_heading)"
|
||||
>
|
||||
{{
|
||||
points[hovered].date.toLocaleDateString("en-GB", {
|
||||
day: "numeric",
|
||||
month: "short",
|
||||
year: "2-digit",
|
||||
})
|
||||
}}
|
||||
</text>
|
||||
<text
|
||||
:x="Math.min(points[hovered].x + 7, W - 82)"
|
||||
:y="points[hovered].y + 8"
|
||||
font-size="14"
|
||||
:fill="activeMetric.color"
|
||||
font-family="var(--font_heading)"
|
||||
>
|
||||
{{ formatValue(metric, points[hovered].value) }}
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<!-- Summary stats -->
|
||||
<div class="flex justify-between text-xs border-t border-quaternary pt-1">
|
||||
<div class="flex flex-col items-center">
|
||||
<span class="text-primary font-heading">{{ rows.length }}</span>
|
||||
<span class="text-quaternary" style="font-size: 0.6rem"
|
||||
>sessions</span
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-col items-center">
|
||||
<span class="text-primary font-heading"
|
||||
>{{
|
||||
rows.reduce((s, r) => s + r.distance, 0).toLocaleString()
|
||||
}}m</span
|
||||
>
|
||||
<span class="text-quaternary" style="font-size: 0.6rem"
|
||||
>total dist</span
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-col items-center">
|
||||
<span class="text-primary font-heading">{{
|
||||
formatTime(
|
||||
rows.reduce((s, r) => s + r.timePer500m, 0) / (rows.length || 1),
|
||||
)
|
||||
}}</span>
|
||||
<span class="text-quaternary" style="font-size: 0.6rem"
|
||||
>avg pace</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.metric-btn {
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background-color 0.15s,
|
||||
color 0.15s;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,217 @@
|
||||
<script setup>
|
||||
import Timer from "@/components/util/Timer.vue";
|
||||
import Time from "@/components/util/Time.vue";
|
||||
import Radio from "@/components/util/Radio.vue";
|
||||
import Elle from "@/components/elle/Elle.vue";
|
||||
import Chat from "@/components/util/Chat.vue";
|
||||
import MusicPlayer from "@/components/util/MusicPlayer.vue";
|
||||
import CommitHistory from "@/components/util/CommitHistory.vue";
|
||||
|
||||
import Intro from "./Intro.vue";
|
||||
import Intro2 from "./Intro2.vue";
|
||||
import BadApple from "./BadApple.vue";
|
||||
import Miku from "./Miku.vue";
|
||||
import Stamps from "./Stamps.vue";
|
||||
import Listening from "./Listening.vue";
|
||||
import Links from "./Links.vue";
|
||||
import Feed from "./Feed.vue";
|
||||
import Collage from "./Collage.vue";
|
||||
import Favorites from "./Favorites.vue";
|
||||
// import Gym from "./Gym.vue";
|
||||
import Gym2 from "./Gym2.vue";
|
||||
import Consumption from "./Consumption.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="halftone justify-center flex flex-row w-full h-full">
|
||||
<div class="outerWrap flex flex-row" style="height: 310mm">
|
||||
<div class="sidebar flex-1 flex flex-col m-10 w-60 gap-2">
|
||||
<div
|
||||
class="flex-1 flex flex-col min-h-0 background-children border-children gap-2"
|
||||
>
|
||||
<Chat class="flex-1 min-h-0" />
|
||||
</div>
|
||||
<div class="sidebar-image">
|
||||
<Miku class="border-tertiary border bg-bg_secondary" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="a4page-portrait homeGrid relative background-children border-children bdr-1"
|
||||
>
|
||||
<!-- <Intro class="intro" /> -->
|
||||
<Intro2 class="intro" />
|
||||
<!-- <BadApple class="intro" /> -->
|
||||
<Listening class="listening" />
|
||||
<Stamps class="stamps" />
|
||||
<Feed class="feed" />
|
||||
<Links class="links" />
|
||||
<Collage class="collage" />
|
||||
<Consumption class="consumption" />
|
||||
<Favorites class="favorites" />
|
||||
<!-- <Gym class="gym" /> -->
|
||||
<Gym2 class="gym" />
|
||||
</div>
|
||||
<div class="sidebar flex-1 flex flex-col m-10 w-60 gap-2">
|
||||
<div
|
||||
class="flex-1 flex flex-col min-h-0 background-children border-children gap-2"
|
||||
>
|
||||
<Time />
|
||||
<Timer />
|
||||
<Radio />
|
||||
<CommitHistory class="flex-1" />
|
||||
|
||||
<!-- <Elle class="flex-1" /> -->
|
||||
<!-- <MusicPlayer /> -->
|
||||
</div>
|
||||
<div class="sidebar-image">
|
||||
<img
|
||||
src="/img/memes/fire-woman.gif"
|
||||
class="border-tertiary border"
|
||||
loading="lazy"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.border-children > * {
|
||||
border: 2px solid var(--quaternary);
|
||||
}
|
||||
|
||||
.background-children > * {
|
||||
background-color: var(--bg_primary);
|
||||
}
|
||||
|
||||
.homeGrid {
|
||||
display: grid;
|
||||
gap: 5px;
|
||||
grid-template-columns: repeat(10, 1fr);
|
||||
grid-template-rows: repeat(10, 1fr);
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.outerWrap {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.homeGrid {
|
||||
order: -1;
|
||||
width: 100%;
|
||||
height: 350mm;
|
||||
margin-inline: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
margin: 5px 10px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
.homeGrid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.stamps {
|
||||
max-height: 130px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 8px;
|
||||
justify-items: stretch;
|
||||
}
|
||||
|
||||
.sidebar > * {
|
||||
max-width: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.sidebar-image {
|
||||
max-height: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar-image :deep(img) {
|
||||
max-height: 200px;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
margin-inline: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
main {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.outerWrap {
|
||||
max-width: 100vw;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
margin: 5px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.intro {
|
||||
grid-column: 1 / span 6;
|
||||
grid-row: 1 / span 4;
|
||||
}
|
||||
|
||||
.listening {
|
||||
grid-column: 7 / span 4;
|
||||
grid-row: 1 / span 3;
|
||||
}
|
||||
|
||||
.stamps {
|
||||
grid-column: 7 / span 4;
|
||||
grid-row: 4 / span 1;
|
||||
}
|
||||
|
||||
.feed {
|
||||
grid-column: 1 / span 3;
|
||||
grid-row: 5 / span 4;
|
||||
}
|
||||
|
||||
.links {
|
||||
grid-column: 4 / span 2;
|
||||
grid-row: 5 / span 4;
|
||||
}
|
||||
|
||||
.collage {
|
||||
grid-column: 6 / span 5;
|
||||
grid-row: 5 / span 4;
|
||||
}
|
||||
|
||||
.consumption {
|
||||
grid-column: span 4;
|
||||
grid-row: span 2;
|
||||
}
|
||||
|
||||
.gym {
|
||||
grid-column: span 3;
|
||||
grid-row: span 2;
|
||||
}
|
||||
|
||||
.favorites {
|
||||
grid-column: span 3;
|
||||
grid-row: span 2;
|
||||
}
|
||||
|
||||
.bg-random {
|
||||
background-color: var(--bg_primary);
|
||||
background-image: url("/img/miku/miku2.gif");
|
||||
background-size: 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,30 @@
|
||||
<script setup>
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import Paragraph from "@/components/text/Paragraph.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex-1 border-box flex flex-col p-1 text-left items-start justify-start">
|
||||
<Header>Yo</Header>
|
||||
<!-- <Header>Intro</Header> -->
|
||||
<!-- <Paragraph> -->
|
||||
<!-- Hi, I'm Adam, thank you for visiting my website. -->
|
||||
<!-- </Paragraph> -->
|
||||
<!-- <Header>Getting around</Header> -->
|
||||
<!-- <Paragraph> -->
|
||||
<!-- Pages available can be traversed through links below. I am hoping to -->
|
||||
<!-- add some shrines, code-walkthoughs, live chat and page transitions -->
|
||||
<!-- at a later date. -->
|
||||
<!-- </Paragraph> -->
|
||||
<!-- <Header>Contact</Header> -->
|
||||
<!-- <Paragraph> -->
|
||||
<!-- Please email me <a href="mailto:[email protected]">here</a>, -->
|
||||
<!-- or contact me though any of the social medias linked. -->
|
||||
<!-- </Paragraph> -->
|
||||
<!-- <Header>A Quote</Header> -->
|
||||
<!-- <Paragraph> -->
|
||||
<!-- One crossed wire, one wayward pinch of potassium chlorate, one -->
|
||||
<!-- errant twitch, and KA-BLOOIE! -->
|
||||
<!-- </Paragraph> -->
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,130 @@
|
||||
<script setup lang="ts">
|
||||
import { rand } from "@vueuse/core";
|
||||
import { ref, onMounted, onUnmounted, nextTick } from "vue";
|
||||
|
||||
interface Item {
|
||||
x: number;
|
||||
y: number;
|
||||
dx: number;
|
||||
dy: number;
|
||||
content: string;
|
||||
}
|
||||
|
||||
const container = ref<HTMLDivElement | null>(null);
|
||||
const itemEls = ref<HTMLDivElement[]>([]);
|
||||
|
||||
const phrases = [
|
||||
"Welcome to my website",
|
||||
"I'm looking to do a big revamp",
|
||||
"A4 sheets of paper are what I'm used to",
|
||||
"I'd love to know your recommendations",
|
||||
"for very short books",
|
||||
"Message me by any means necessary",
|
||||
"I like anime, all kinds of music and sci fic",
|
||||
];
|
||||
|
||||
// Non-reactive animation state to avoid triggering Vue re-renders every frame
|
||||
const animState = phrases.map((text, i) => ({
|
||||
x: i * 20,
|
||||
y: i * 20,
|
||||
dx: rand(0, 60) / 100,
|
||||
dy: 1.0,
|
||||
content: text,
|
||||
cachedW: 0,
|
||||
cachedH: 0,
|
||||
}));
|
||||
|
||||
// Reactive items only for initial render
|
||||
const items = ref<Item[]>(
|
||||
animState.map((s) => ({
|
||||
x: s.x,
|
||||
y: s.y,
|
||||
dx: s.dx,
|
||||
dy: s.dy,
|
||||
content: s.content,
|
||||
})),
|
||||
);
|
||||
|
||||
let rafId = 0;
|
||||
let cachedCW = 0;
|
||||
let cachedCH = 0;
|
||||
let lastFrameTime = 0;
|
||||
const FRAME_INTERVAL = 1000 / 30;
|
||||
|
||||
function measureSizes() {
|
||||
const c = container.value;
|
||||
if (c) {
|
||||
cachedCW = c.clientWidth;
|
||||
cachedCH = c.clientHeight;
|
||||
}
|
||||
itemEls.value.forEach((el, i) => {
|
||||
if (el && animState[i]) {
|
||||
animState[i].cachedW = el.offsetWidth;
|
||||
animState[i].cachedH = el.offsetHeight;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function animate(timestamp: number) {
|
||||
if (!cachedCW || !cachedCH) {
|
||||
rafId = requestAnimationFrame(animate);
|
||||
return;
|
||||
}
|
||||
|
||||
if (timestamp - lastFrameTime < FRAME_INTERVAL) {
|
||||
rafId = requestAnimationFrame(animate);
|
||||
return;
|
||||
}
|
||||
lastFrameTime = timestamp;
|
||||
|
||||
for (let i = 0; i < animState.length; i++) {
|
||||
const s = animState[i];
|
||||
const el = itemEls.value[i];
|
||||
if (!el) continue;
|
||||
|
||||
s.x += s.dx;
|
||||
s.y += s.dy;
|
||||
|
||||
if (s.x < 0 || s.x > cachedCW - s.cachedW) s.dx *= -1;
|
||||
if (s.y < 0 || s.y > cachedCH - s.cachedH) s.dy *= -1;
|
||||
|
||||
el.style.transform = `translate(${s.x}px, ${s.y}px)`;
|
||||
}
|
||||
|
||||
rafId = requestAnimationFrame(animate);
|
||||
}
|
||||
|
||||
let resizeObserver: ResizeObserver;
|
||||
|
||||
onMounted(async () => {
|
||||
await nextTick();
|
||||
measureSizes();
|
||||
rafId = requestAnimationFrame(animate);
|
||||
|
||||
resizeObserver = new ResizeObserver(measureSizes);
|
||||
resizeObserver.observe(container.value!);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
cancelAnimationFrame(rafId);
|
||||
resizeObserver?.disconnect();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
ref="container"
|
||||
class="w-full h-full min-h-125 relative overflow-hidden"
|
||||
>
|
||||
<div
|
||||
v-for="(item, i) in items"
|
||||
:key="i"
|
||||
ref="itemEls"
|
||||
class="absolute w-fit h-fit"
|
||||
>
|
||||
<h1>
|
||||
{{ item.content }}
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,30 @@
|
||||
<script setup>
|
||||
import RouterTable from "@/components/util/RouterTable.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
|
||||
const site_links = [
|
||||
{ name: "CV", link: "/cv" },
|
||||
{ name: "Bookmarks", link: "/bookmarks" },
|
||||
{ name: "Notes", link: "/notes/Index.md" },
|
||||
{ name: "Admin", link: "/admin" },
|
||||
// { name: "Shrines", link: "/shrines" },
|
||||
];
|
||||
|
||||
const social_links = [
|
||||
{ name: "Gitea", link: "/gitea/explore/repos" },
|
||||
{ name: "Steam", link: "https://steamcommunity.com/id/SteveThePug" },
|
||||
{ name: "Github", link: "https://github.com/SteveThePug" },
|
||||
{ name: "Spotify", link: "https://open.spotify.com/user/stevethepug" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col justify-between">
|
||||
<div class="flex flex-col gap-1">
|
||||
<RouterTable :linkArr="site_links" />
|
||||
</div>
|
||||
<div class="flex flex-col gap-1">
|
||||
<LinkTable :items="social_links" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,81 @@
|
||||
<script setup>
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import { ref, computed, onMounted, onUnmounted } from "vue";
|
||||
import { useSongsStore } from "@/stores/songs";
|
||||
|
||||
const songsStore = useSongsStore();
|
||||
const idx = ref(0);
|
||||
const song = computed(() => songsStore.songs[idx.value]);
|
||||
|
||||
let nextId = null;
|
||||
let refreshId = null;
|
||||
|
||||
function nextSong() {
|
||||
clearTimeout(nextId);
|
||||
nextId = setTimeout(nextSong, 5000);
|
||||
idx.value = (idx.value + 1) % songsStore.songsCount;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
songsStore.fetchSongs();
|
||||
nextId = setTimeout(nextSong, 5000);
|
||||
refreshId = setInterval(songsStore.fetchSongs, 120000);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
clearTimeout(nextId);
|
||||
clearInterval(refreshId);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="listening-wrapper">
|
||||
<Transition name="fade">
|
||||
<div
|
||||
@click="nextSong"
|
||||
:key="song.track.name"
|
||||
class="flex flex-col items-center"
|
||||
>
|
||||
<Header>Listening To</Header>
|
||||
<img :src="song.track.album.images[0].url" />
|
||||
<p class="text-center">
|
||||
<strong>Song:</strong> {{ song.track.name }}
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<strong>Artist:</strong> {{ song.track.artists[0].name }}
|
||||
</p>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.listening-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 70%;
|
||||
}
|
||||
p {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
.fade-leave-active {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<script setup>
|
||||
import Slideshow from "@/components/util/Slideshow.vue";
|
||||
|
||||
const images = [
|
||||
{ url: "/img/miku/miku1.gif" },
|
||||
{ url: "/img/miku/miku2.gif" },
|
||||
// { url: "/img/miku/miku2.png" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Slideshow class="p-5" :images="images" :interval="10000" />
|
||||
</template>
|
||||
@@ -0,0 +1,50 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import Touchscreen from "@/components/util/Touchscreen.vue";
|
||||
import Link from "@/components/text/Link.vue";
|
||||
import { shuffleArray } from "@/js/utils.js";
|
||||
|
||||
let srcs = [
|
||||
"/img/stamps/portal.gif",
|
||||
"/img/stamps/miku.gif",
|
||||
"/img/stamps/utau.gif",
|
||||
"/img/stamps/teto.webp",
|
||||
"/img/stamps/3ds.jpg",
|
||||
"/img/stamps/fry.png",
|
||||
"/img/stamps/ai.png",
|
||||
"/img/stamps/rei.png",
|
||||
"/img/stamps/tetris.gif",
|
||||
"/img/stamps/tf2.gif",
|
||||
"/img/stamps/demo.gif",
|
||||
];
|
||||
shuffleArray(srcs);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Touchscreen>
|
||||
<div class="flex flex-wrap tst">
|
||||
<Link bare href="https://www.adam-french.co.uk">
|
||||
<img src="https://www.adam-french.co.uk/img/stamps/mine.gif" />
|
||||
</Link>
|
||||
<Link bare href="https://jacobbarron.xyz">
|
||||
<img
|
||||
src="https://jacobbarron.xyz/Banneh.gif"
|
||||
alt="jacobbarron.xyz"
|
||||
/>
|
||||
</Link>
|
||||
<img v-for="src in srcs" :src="src" />
|
||||
</div>
|
||||
</Touchscreen>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
img {
|
||||
width: 89px;
|
||||
height: 59px;
|
||||
}
|
||||
|
||||
.tst {
|
||||
min-width: calc(89px * 4);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,29 @@
|
||||
<script setup>
|
||||
import VideoTable from "@/components/util/VideoTable.vue";
|
||||
import Link from "@/components/text/Link.vue";
|
||||
|
||||
const videoSources = [
|
||||
{ name: "demoman", link: "/img/demoman/1760582395316219.webm" },
|
||||
{ name: "demoman", link: "/img/demoman/1761052136609718.webm" },
|
||||
{ name: "demoman", link: "/img/demoman/1761088452011210.mp4" },
|
||||
{ name: "demoman", link: "/img/demoman/1761570214170465.webm" },
|
||||
{ name: "demoman", link: "/img/demoman/1761828457509465.webm" },
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col">
|
||||
<div
|
||||
class="a4page-portrait bdr-1 flex flex-row relative overflow-scroll items-center"
|
||||
>
|
||||
<p>
|
||||
<Link href="https://wiki.teamfortress.com/wiki/Demoman"
|
||||
>The goat</Link
|
||||
>
|
||||
</p>
|
||||
<div>
|
||||
<VideoTable :sourceArr="videoSources" />
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
<script setup>
|
||||
import Wip from "@/components/util/Wip.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col">
|
||||
<div
|
||||
class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll"
|
||||
>
|
||||
<Wip />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,11 @@
|
||||
<script setup>
|
||||
import Wip from "@/components/util/Wip.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col">
|
||||
<div class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll">
|
||||
<Wip />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,13 @@
|
||||
<script setup>
|
||||
import Wip from "@/components/util/Wip.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="items-center flex flex-col">
|
||||
<div
|
||||
class="a4page-portrait items-center bdr-1 flex flex-col relative overflow-scroll"
|
||||
>
|
||||
<Wip />
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<main>
|
||||
<table id="cover-nav" class="cover-nav no-print">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Companies</th>
|
||||
<th>Completed</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="#LloydsBank">Lloyds</a></td>
|
||||
<td>YES</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="no-print m-1 w-full text-center"></div>
|
||||
<div id="LloydsBank" class="a5page">
|
||||
<div class="contact">
|
||||
<h1>Adam French</h1>
|
||||
<!-- <a href="index.html"><img width=25 height=50 src="img/rune.png"></a> -->
|
||||
<div class="contact-details">
|
||||
<p>+447563266931</p>
|
||||
<p>adam.a.french@outlook.com</p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>BAE graduate digital intelligence software engineer</h2>
|
||||
<p>
|
||||
I am writing to express my interest in your software engineering
|
||||
position. BAE Systems has hosted multiple stools at the
|
||||
University of Leeds and have always exhibited their development
|
||||
of leading-edge software and technology. This is where the
|
||||
origin of my interest in BAE systems emerged and I'm hopeful
|
||||
that this interest shall continue.
|
||||
</p>
|
||||
<p>
|
||||
I'm confidient im a strong fit for this role. My technical
|
||||
background includes extensive experience with frontend
|
||||
frameworks such as React. My devotion however lies more in
|
||||
backend development as has more potential to graple problems
|
||||
related to optimisation and designing coherent interfaces.
|
||||
</p>
|
||||
<p>
|
||||
<em> The C# Programming Yellow Book </em> was my first
|
||||
introduction to C# during A-Level, Java was our vessel for
|
||||
teaching object-orientated programming at university. I am
|
||||
confident I have the relevant experience to grasp the languages
|
||||
stated for the role I am applying for.
|
||||
</p>
|
||||
<p>
|
||||
My academic background in Computer Science and Mathematics has
|
||||
honed my ability to translate abstract concepts into structured,
|
||||
logical solutions. Just as I have transformed theoretical
|
||||
hypotheses into formal proofs, I aim to transform business
|
||||
requirements into robust, maintainable software systems through
|
||||
collaboration and rigorous reasoning.
|
||||
</p>
|
||||
<p>Thank you for reading - Adam F</p>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
@import "@/assets/css/cv_styles.css";
|
||||
@media print {
|
||||
@page {
|
||||
size: A5 landscape;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user