Embed and use FiraGo

It doesn't seem to be working correctly on Android though. A quick
google implies that my Android might not support woff2 files, so maybe
I should try ttf or woff instead.

Edit: Apparently, it *does* just work on my phone now. No idea why it
didn't work before.
This commit is contained in:
Joscha 2025-01-27 14:12:04 +01:00
parent d1f0d28dac
commit 14e85207e9
19 changed files with 139 additions and 140 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,159 +1,158 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; // const sample = "Apps is a gude";
import { invoke } from "@tauri-apps/api/core";
const greetMsg = ref("");
const name = ref("");
async function greet() {
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
greetMsg.value = await invoke("greet", { name: name.value });
}
</script> </script>
<template> <template>
<main class="container"> <div class="flex items-baseline justify-between bg-black p-2 text-white">
<p class="font-bold underline">Hello</p> <div
<h1>Welcome to Tauri + Vue</h1> class="cursor-default rounded-md bg-neutral-800 pl-2 pr-1 text-lg hover:bg-neutral-700 active:bg-neutral-500"
>
<div class="row"> GedächtNAS<span class="relative -top-1 select-none"> </span>
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" class="logo vite" alt="Vite logo" />
</a>
<a href="https://tauri.app" target="_blank">
<img src="/tauri.svg" class="logo tauri" alt="Tauri logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
</div> </div>
<p>Click on the Tauri, Vite, and Vue logos to learn more.</p> <div
class="cursor-pointer select-none rounded-md bg-neutral-800 px-2 text-xl hover:bg-neutral-700 active:bg-neutral-500"
<form class="row" @submit.prevent="greet"> >
<input id="greet-input" v-model="name" placeholder="Enter a name..." />
<button type="submit">Greet</button> </div>
</form> </div>
<p>{{ greetMsg }}</p> <p class="p-1 font-thin">The quick brown fox Qiii</p>
</main> <p class="p-1 font-extralight">The quick brown fox Qiii</p>
<p class="p-1 font-light">The quick brown fox Qiii</p>
<p class="p-1 font-normal">The quick brown fox Qiii</p>
<p class="p-1 font-medium">The quick brown fox Qiii</p>
<p class="p-1 font-semibold">The quick brown fox Qiii</p>
<p class="p-1 font-bold">The quick brown fox Qiii</p>
<p class="p-1 font-extrabold">The quick brown fox Qiii</p>
<p class="p-1 font-black">The quick brown fox Qiii</p>
</template> </template>
<style scoped>
.logo.vite:hover {
filter: drop-shadow(0 0 2em #747bff);
}
.logo.vue:hover {
filter: drop-shadow(0 0 2em #249b73);
}
</style>
<style> <style>
:root { @import "tailwindcss";
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
font-size: 16px; /*
line-height: 24px; Weights according to https://github.com/bBoxType/FiraGO?tab=readme-ov-file#firago-font-weights
100 - Thin
200 - UltraLight
300 - Light
400 - Regular
500 - Medium
600 - SemiBold
700 - Bold
800 - ExtraBold
900 - Heavy
*/
@font-face {
font-family: FiraGO;
font-style: normal;
font-weight: 100;
src: url("/fonts/FiraGO-Thin.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: normal;
font-weight: 200;
src: url("/fonts/FiraGO-UltraLight.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: normal;
font-weight: 300;
src: url("/fonts/FiraGO-Light.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: normal;
font-weight: 400; font-weight: 400;
src: url("/fonts/FiraGO-Regular.woff2") format("woff2");
color: #0f0f0f;
background-color: #f6f6f6;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
} }
@font-face {
.container { font-family: FiraGO;
margin: 0; font-style: normal;
padding-top: 10vh;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: 0.75s;
}
.logo.tauri:hover {
filter: drop-shadow(0 0 2em #24c8db);
}
.row {
display: flex;
justify-content: center;
}
a {
font-weight: 500; font-weight: 500;
color: #646cff; src: url("/fonts/FiraGO-Medium.woff2") format("woff2");
text-decoration: inherit;
} }
@font-face {
a:hover { font-family: FiraGO;
color: #535bf2; font-style: normal;
font-weight: 600;
src: url("/fonts/FiraGO-SemiBold.woff2") format("woff2");
} }
@font-face {
h1 { font-family: FiraGO;
text-align: center; font-style: normal;
font-weight: 700;
src: url("/fonts/FiraGO-Bold.woff2") format("woff2");
} }
@font-face {
input, font-family: FiraGO;
button { font-style: normal;
border-radius: 8px; font-weight: 800;
border: 1px solid transparent; src: url("/fonts/FiraGO-ExtraBold.woff2") format("woff2");
padding: 0.6em 1.2em; }
font-size: 1em; @font-face {
font-family: FiraGO;
font-style: normal;
font-weight: 900;
src: url("/fonts/FiraGO-Heavy.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 100;
src: url("/fonts/FiraGO-ThinItalic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 200;
src: url("/fonts/FiraGO-UltraLightItalic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 300;
src: url("/fonts/FiraGO-LightItalic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 400;
src: url("/fonts/FiraGO-Italic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 500; font-weight: 500;
font-family: inherit; src: url("/fonts/FiraGO-MediumItalic.woff2") format("woff2");
color: #0f0f0f; }
background-color: #ffffff; @font-face {
transition: border-color 0.25s; font-family: FiraGO;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2); font-style: italic;
font-weight: 600;
src: url("/fonts/FiraGO-SemiBoldItalic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 700;
src: url("/fonts/FiraGO-BoldItalic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 800;
src: url("/fonts/FiraGO-ExtraBoldItalic.woff2") format("woff2");
}
@font-face {
font-family: FiraGO;
font-style: italic;
font-weight: 900;
src: url("/fonts/FiraGO-HeavyItalic.woff2") format("woff2");
} }
button { @theme {
cursor: pointer; --font-sans: FiraGO;
}
button:hover {
border-color: #396cd8;
}
button:active {
border-color: #396cd8;
background-color: #e8e8e8;
}
input,
button {
outline: none;
}
#greet-input {
margin-right: 5px;
}
@media (prefers-color-scheme: dark) {
:root {
color: #f6f6f6;
background-color: #2f2f2f;
}
a:hover {
color: #24c8db;
}
input,
button {
color: #ffffff;
background-color: #0f0f0f98;
}
button:active {
background-color: #0f0f0f69;
}
} }
</style> </style>