animations

This commit is contained in:
N0\A
2025-10-30 08:41:03 +01:00
parent a3d382b1b7
commit eadbf18661
5 changed files with 385 additions and 142 deletions

View File

@@ -16,6 +16,10 @@
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
background: linear-gradient(
var(--bg-gradient-1),
@@ -130,6 +134,24 @@ li a {
gap: 12px;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
position: relative;
overflow: hidden;
}
li a::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(244, 162, 97, 0.1),
transparent
);
transition: left 0.5s ease;
}
li a:active {
@@ -160,12 +182,100 @@ br {
content: "";
}
/* Back to top button */
.back-to-top {
position: fixed;
bottom: 24px;
right: 24px;
width: 48px;
height: 48px;
border-radius: 50%;
background: var(--link-bg);
border: 1px solid var(--container-border);
color: var(--link-color);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: 1000;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.3);
}
.back-to-top.visible {
opacity: 1;
visibility: visible;
}
.back-to-top:hover {
background: var(--link-hover-bg);
border-color: var(--link-hover-border);
transform: translateY(-2px);
}
.back-to-top:active {
transform: translateY(0);
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: fadeIn 0.6s ease-out forwards;
}
.slide-down {
animation: slideDown 0.6s ease-out forwards;
}
.slide-up {
animation: slideUp 0.6s ease-out forwards;
opacity: 0;
}
@media (hover: hover) {
li a:hover {
background-color: var(--link-hover-bg);
border-color: var(--link-hover-border);
transform: scale(1.02);
}
li a:hover::before {
left: 100%;
}
}
@media (min-width: 768px) {
@@ -209,11 +319,29 @@ br {
li a span {
font-size: 0.85rem;
}
.back-to-top {
bottom: 16px;
right: 16px;
width: 44px;
height: 44px;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
* {
animation: none !important;
transition: none !important;
}
.fade-in,
.slide-down,
.slide-up {
opacity: 1 !important;
transform: none !important;
}
}