chore: initial scaffold
This commit is contained in:
37
src/App.vue
Normal file
37
src/App.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<script setup lang="ts">
|
||||
const repo = "https://git.apoena.dev/julien/pokedex"
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="min-h-screen bg-base-200 pixel-grid flex items-center justify-center p-6">
|
||||
<div
|
||||
class="card bg-base-100 max-w-md w-full rounded-none border-4 border-primary shadow-[6px_6px_0_0_#1a1a1a]"
|
||||
>
|
||||
<div class="card-body items-center text-center gap-6">
|
||||
<svg
|
||||
class="size-20 text-primary"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
|
||||
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />
|
||||
<path d="M3 12h6" />
|
||||
<path d="M15 12h6" />
|
||||
</svg>
|
||||
|
||||
<h1 class="font-display text-2xl text-primary leading-relaxed">POKEDEX</h1>
|
||||
|
||||
<p class="text-2xl opacity-80 leading-snug">An 8-bit Pokédex. Gotta catalog 'em all.</p>
|
||||
|
||||
<div class="card-actions">
|
||||
<a :href="repo" class="btn btn-primary rounded-none font-display text-xs">View source</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
37
src/assets/icons/README.md
Normal file
37
src/assets/icons/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Icons
|
||||
|
||||
Reusable in-app icons. Source: https://tabler.io/icons (outline variant by default).
|
||||
|
||||
## Add an icon
|
||||
|
||||
1. Find the icon on https://tabler.io/icons, click it, copy the SVG (or download).
|
||||
2. Save it here as `<slug>.svg` — same slug Tabler uses (`bolt.svg`, `qrcode.svg`).
|
||||
3. Keep `stroke="currentColor"` in the SVG so colour follows Tailwind classes.
|
||||
|
||||
## Use an icon
|
||||
|
||||
Static colour (cheapest, no extra component):
|
||||
|
||||
```vue
|
||||
<img src="@/assets/icons/bolt.svg" alt="" class="size-5" />
|
||||
```
|
||||
|
||||
Dynamic colour (needs `currentColor` to flow through — paste the SVG inline as a component):
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<svg
|
||||
class="size-5 text-primary"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<!-- paste paths from the Tabler SVG here -->
|
||||
</svg>
|
||||
</template>
|
||||
```
|
||||
|
||||
The favicon at `public/favicon.svg` was generated from this same icon set with `currentColor` replaced by the app's primary hex at scaffold time.
|
||||
5
src/main.ts
Normal file
5
src/main.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { createApp } from "vue"
|
||||
import "./style.css"
|
||||
import App from "./App.vue"
|
||||
|
||||
createApp(App).mount("#app")
|
||||
38
src/style.css
Normal file
38
src/style.css
Normal file
@@ -0,0 +1,38 @@
|
||||
/* The font @import MUST come first — before @import "tailwindcss" — because
|
||||
Tailwind inlines its import into real CSS rules, and the CSS spec requires
|
||||
@import to precede all other rules. If it comes second, the production build
|
||||
warns ("@import must precede all rules…") and browsers silently DROP the
|
||||
font import, so the custom font never loads.
|
||||
8-bit theme: "Press Start 2P" for display/headings, "VT323" for body text. */
|
||||
@import url("https://api.fonts.coollabs.io/css2?family=Press+Start+2P&display=swap");
|
||||
@import url("https://api.fonts.coollabs.io/css2?family=VT323&display=swap");
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui";
|
||||
@plugin "daisyui/theme" {
|
||||
name: "light";
|
||||
default: true;
|
||||
--color-primary: #c23616;
|
||||
}
|
||||
|
||||
@theme {
|
||||
--font-sans: "VT323", ui-monospace, monospace;
|
||||
--font-display: "Press Start 2P", ui-monospace, monospace;
|
||||
}
|
||||
|
||||
/* VT323 renders small at default sizes — nudge the base up for legibility. */
|
||||
:root {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Crisp edges for pixel-art sprites (e.g. Pokémon artwork). */
|
||||
.pixelated {
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
/* Subtle 8-bit checker/grid backdrop. */
|
||||
.pixel-grid {
|
||||
background-image:
|
||||
linear-gradient(var(--color-base-300) 1px, transparent 1px),
|
||||
linear-gradient(90deg, var(--color-base-300) 1px, transparent 1px);
|
||||
background-size: 16px 16px;
|
||||
}
|
||||
Reference in New Issue
Block a user