feat: display random image on refresh
27
app.vue
@@ -1,7 +1,28 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { resolve } from "path";
|
||||||
|
import { readdir } from "fs/promises";
|
||||||
|
|
||||||
|
const images = await readdir(resolve("public", "lilou"));
|
||||||
|
const image = images[Math.floor(Math.random() * images.length)];
|
||||||
|
const imagePath = `/lilou/${image}`;
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<main
|
||||||
|
class="h-[100vh] items-center justify-center p-5 flex flex-col space-y-4 bg-[#fa86c4]"
|
||||||
|
>
|
||||||
<NuxtRouteAnnouncer />
|
<NuxtRouteAnnouncer />
|
||||||
|
|
||||||
<p>Ok</p>
|
<h1
|
||||||
</div>
|
class="text-4xl md:text-5xl lg:text-6xl font-serif text-white dark:text-white"
|
||||||
|
>
|
||||||
|
✨ Lilou ✨
|
||||||
|
</h1>
|
||||||
|
<img class="w-full max-w-[50vh]" :src="imagePath" alt="Lilou" />
|
||||||
|
<h1
|
||||||
|
class="text-4xl md:text-5xl lg:text-6xl font-serif text-white dark:text-white"
|
||||||
|
>
|
||||||
|
✨ Lilou ✨
|
||||||
|
</h1>
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: "2024-04-03",
|
compatibilityDate: "2024-04-03",
|
||||||
devtools: { enabled: true },
|
devtools: { enabled: true },
|
||||||
modules: ["@nuxt/eslint"],
|
modules: ["@nuxt/eslint", "@nuxtjs/tailwindcss"],
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,9 +12,13 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/eslint": "^0.6.0",
|
"@nuxt/eslint": "^0.6.0",
|
||||||
|
"@nuxtjs/tailwindcss": "^6.12.2",
|
||||||
"nuxt": "^3.13.0",
|
"nuxt": "^3.13.0",
|
||||||
"vue": "latest",
|
"vue": "latest",
|
||||||
"vue-router": "latest"
|
"vue-router": "latest"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.11.0"
|
"packageManager": "pnpm@9.11.0",
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "5.5.4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1031
pnpm-lock.yaml
generated
BIN
public/lilou/IMG_20211108_171245.jpg
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
public/lilou/IMG_20211117_210025.jpg
Normal file
|
After Width: | Height: | Size: 273 KiB |
BIN
public/lilou/IMG_20211119_115203.jpg
Normal file
|
After Width: | Height: | Size: 270 KiB |
BIN
public/lilou/IMG_20211119_115211.jpg
Normal file
|
After Width: | Height: | Size: 290 KiB |
BIN
public/lilou/IMG_20211119_115214.jpg
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
public/lilou/IMG_20211120_112721.jpg
Normal file
|
After Width: | Height: | Size: 373 KiB |
BIN
public/lilou/IMG_20211125_133240.jpg
Normal file
|
After Width: | Height: | Size: 264 KiB |
BIN
public/lilou/IMG_20211202_173806.jpg
Normal file
|
After Width: | Height: | Size: 241 KiB |
BIN
public/lilou/IMG_20211202_173816.jpg
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
public/lilou/IMG_20211203_193142.jpg
Normal file
|
After Width: | Height: | Size: 370 KiB |
BIN
public/lilou/IMG_20211205_202636.jpg
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
public/lilou/IMG_20211210_093745.jpg
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
public/lilou/IMG_20211210_102911.jpg
Normal file
|
After Width: | Height: | Size: 346 KiB |
BIN
public/lilou/IMG_20211212_232413.jpg
Normal file
|
After Width: | Height: | Size: 308 KiB |
BIN
public/lilou/IMG_20211217_203923.jpg
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
public/lilou/IMG_20211231_184714.jpg
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
public/lilou/IMG_20211231_184716.jpg
Normal file
|
After Width: | Height: | Size: 267 KiB |
BIN
public/lilou/IMG_20220128_171020.jpg
Normal file
|
After Width: | Height: | Size: 276 KiB |
BIN
public/lilou/IMG_20220225_142235.jpg
Normal file
|
After Width: | Height: | Size: 194 KiB |
BIN
public/lilou/IMG_20220302_184328.jpg
Normal file
|
After Width: | Height: | Size: 167 KiB |
BIN
public/lilou/IMG_20220302_184404.jpg
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
public/lilou/IMG_20220302_184405.jpg
Normal file
|
After Width: | Height: | Size: 233 KiB |
BIN
public/lilou/IMG_20220311_190336.jpg
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
public/lilou/IMG_20220324_194252.jpg
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
public/lilou/IMG_20220511_214947.jpg
Normal file
|
After Width: | Height: | Size: 148 KiB |
BIN
public/lilou/IMG_20220603_210448.jpg
Normal file
|
After Width: | Height: | Size: 302 KiB |
BIN
public/lilou/IMG_20220603_210538.jpg
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
public/lilou/IMG_20220608_204656.jpg
Normal file
|
After Width: | Height: | Size: 240 KiB |