INIT: initial commit

This commit is contained in:
Fiona Lena Urban 2025-06-03 18:05:45 +02:00
parent bdcf50ca0b
commit 78e0ff6ac9
10 changed files with 217 additions and 8 deletions

3
app/app.vue Normal file
View file

@ -0,0 +1,3 @@
<template>
<NuxtPage />
</template>

View file

@ -0,0 +1,19 @@
.CurrentMood {
background: var(--clr-current-light);
color: var(--clr-current-dark);
height: 60dvh;
padding: 2rem .5rem;
font-family: 'Delius', sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
& .icon {
font-size: 14rem;
}
& h1 {
font-size: 1.5rem;
}
}

View file

@ -0,0 +1,34 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--clr-happy-dark: #009933;
--clr-happy-light: #d1ffe8;
--clr-sad-dark: #252ed5;
--clr-sad-light: #e5ecfc;
--clr-disappointed-dark: #ab6b0e;
--clr-disappointed-light: #fffbd8;
--clr-angry-dark: #851919;
--clr-angry-light: #ffe5e5;
--clr-empty-dark: #595959;
--clr-empty-light: #f1f1f1;
--clr-dead-dark: #ffffff;
--clr-dead-light: #000000;
--clr-sick-dark: #87ad00;
--clr-sick-light: #edffd8;
--clr-pissed-dark: #7853ff;
--clr-pissed-light: #f1efff;
--clr-current-dark: var(--clr-happy-dark);
--clr-current-light: var(--clr-happy-light);
}

View file

@ -0,0 +1,27 @@
.MoodDropdown {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: 4rem;
& > button {
all: unset;
--background: var(--clr-empty-light);
--color: var(--clr-empty-dark);
font-family: 'Delius', sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: var(--background);
color: var(--color);
& span {
font-size: .8rem;
}
& .icon {
font-size: 2rem;
}
}
}

View file

@ -0,0 +1,28 @@
<template>
<aside class="MoodDropdown">
<button
v-for="[moodName, mood] in availableMoods"
:key="mood.label"
:style="{
'--background': `var(--clr-${mood.color}-light)`,
'--color': `var(--clr-${mood.color}-dark)`,
}"
@click="changeMood(moodName)"
>
<Icon class="icon" :name="`mingcute:${mood.icon}`" mode="svg" />
<span>{{ mood.label }}</span>
</button>
</aside>
</template>
<script setup lang="ts">
import { type Mood, moods, type PossibleMood } from '../../shared/moods'
const availableMoods = computed<[PossibleMood, Mood][]>(() => Object.entries(moods))
const emit = defineEmits(['changeMood'])
const changeMood = (newMood : PossibleMood) => {
emit('changeMood', newMood)
}
</script>

View file

@ -0,0 +1,25 @@
<template>
<section class="CurrentMood">
<h1>Du bist derzeit</h1>
<span>{{ moods[currentMood].label }}</span>
<Icon class="icon" :name="`mingcute:${moods[currentMood].icon}`" mode="svg" />
</section>
<MoodDropdown
@change-mood="changeMood"
/>
</template>
<script setup lang="ts">
import { moods, type PossibleMood } from '../../../shared/moods'
const currentMood = ref<PossibleMood>('happy')
const changeMood = (newMood : PossibleMood) => {
currentMood.value = newMood
document.body.style.setProperty('--clr-current-dark', `var(--clr-${newMood}-dark)`)
document.body.style.setProperty('--clr-current-light', `var(--clr-${newMood}-light)`)
}
useSeoMeta({
title: () => `Du bist derzeit ${moods[currentMood.value].label}`
})
</script>

7
app/pages/index.vue Normal file
View file

@ -0,0 +1,7 @@
<template>
<SectionsCurrentMood />
</template>
<script setup lang="ts">
</script>