Début avec des transitions qui marchent

This commit is contained in:
Angels-dev
2024-08-18 01:07:28 +02:00
parent 6ea3bdeb68
commit 207e2ad2c9
24 changed files with 352 additions and 367 deletions

View File

@@ -1,85 +1,85 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
import { RouterView, RouterLink } from 'vue-router'
</script>
<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet'>
<div class="wrapper">
<HelloWorld msg="You did it!" />
<header>
<h1 class="vc" style="font-family: Roboto Condensed">MainFrame</h1>
<div class="vl"></div>
<nav class="vc">
<router-link to="/">Index</router-link>
<p>|</p>
<router-link to="/discord">Discord</router-link>
</nav>
</header>
<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
</div>
</header>
<RouterView />
<router-view v-slot="{ Component }">
<transition name="fade" mode="out-in">
<component :is="Component" />
</transition>
</router-view>
</template>
<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
position: fixed;
z-index: 2;
top: 0;
left: 0;
height: 60px;
width: 100%;
padding: 10px;
background-color: #333;
color: #fff;
}
.logo {
display: block;
margin: 0 auto 2rem;
header * {
display: inline-block;
vertical-align: middle;
}
nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
position: relative;
right: 20px;
font-size: 20px;
}
nav a.router-link-exact-active {
color: var(--color-text);
nav * {
margin-left: 20px;
}
nav a.router-link-exact-active:hover {
background-color: transparent;
h1 {
text-align: center;
left: 0;
width: 197px;
}
nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
router-link {
font-size: 100px;
}
nav a:first-of-type {
border: 0;
.router-link-active {
border-left: 0px;
border-bottom: 2px solid hsla(160, 100%, 37%, 1);
}
@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}
.vc {
position: absolute;
margin: 0;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.logo {
margin: 0 2rem 0 0;
}
header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}
nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;
padding: 1rem 0;
margin-top: 1rem;
}
.vl {
position: absolute;
z-index: 1;
top: 0;
left: 200px;
height: 100%;
margin-left: -3px;
border-left: 6px solid rgb(0, 255, 140);
}
</style>