portfolio-2025/app.vue
2025-04-06 20:33:44 +02:00

195 lines
3.1 KiB
Vue

<template>
<div class="app">
<Header />
<main>
<NuxtPage />
</main>
<Footer />
<!-- Top Flying Duck (Left to Right) -->
<div class="bg-duck bg-duck-1 flying-duck">
<Duck1 />
</div>
<!-- Bottom Flying Duck (Right to Left) -->
<div class="second-duck">
<Duck1 />
</div>
</div>
</template>
<script>
import Duck1 from './components/ducks/Duck1.vue';
export default {
components: {
Duck1
}
}
</script>
<style>
/* Global Styles */
:root {
--duck-yellow: #ffdb58;
--duck-orange: #f97316;
--duck-blue: #4682b4;
--duck-dark-blue: #1e3a8a;
--duck-green: #228b22;
--bg-color: #fffdf7;
--text-color: #333;
--gray-600: #4b5563;
--gray-700: #374151;
--gray-500: #6b7280;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
overflow-x: hidden;
position: relative;
}
.app {
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: var(--bg-color);
position: relative;
overflow: hidden;
}
main {
flex: 1;
max-width: 1200px;
margin: 0 auto;
width: 100%;
}
/* Animation Classes */
@keyframes float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
@keyframes wave {
0%,
100% {
transform: rotate(-5deg);
}
50% {
transform: rotate(5deg);
}
}
@keyframes splash {
0% {
opacity: 0;
transform: translateY(20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.animate-float {
animation: float 6s ease-in-out infinite;
}
.animate-wave {
animation: wave 3s ease-in-out infinite;
transform-origin: bottom center;
}
.animate-splash {
animation: splash 0.5s ease-out forwards;
}
/* Top Duck Styles */
.bg-duck {
position: absolute;
opacity: 0.16;
z-index: 1;
}
.bg-duck-1 {
top: 8rem;
}
.bg-duck-1 svg {
width: 16rem;
height: 16rem;
}
/* Second Duck Styles - Completely Separate */
.second-duck {
position: absolute; /* Changed from fixed to absolute */
top: 66vh; /* Position at 20% from the bottom of the initial viewport */
right: -20vw;
z-index: 1;
opacity: 0.17;
animation: fly-right-to-left 20s linear infinite, float-duck 6s ease-in-out infinite;
}
.second-duck svg {
width: 14rem;
height: 14rem;
transform: scaleX(-1); /* Flip the duck to face left */
}
/* Flying duck animations */
.flying-duck {
animation: fly-across 20s linear infinite, float-up-down 8s ease-in-out infinite;
}
@keyframes fly-across {
0% {
transform: translateX(-20vw) rotate(12deg);
}
100% {
transform: translateX(100vw) rotate(12deg);
}
}
@keyframes fly-right-to-left {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-120vw);
}
}
@keyframes float-up-down {
0%, 100% {
margin-top: 0;
}
50% {
margin-top: -40px;
}
}
@keyframes float-duck {
0%, 100% {
margin-top: 0;
}
50% {
margin-top: -20px;
}
}
</style>