sarsooxyz.hugo/assets/scss/main.scss

170 lines
4.0 KiB
SCSS
Raw Normal View History

2024-10-12 18:59:26 +01:00
:root {
// --shadow-colour: #828282;
--shadow-colour: #3f0aff;
}
///////////////////////
// AVATAR
///////////////////////
.avatar {
img {
--shift: 20px;
--transition-time: 1s;
border-style: solid;
border-width: 7px;
border-color: black;
2024-10-12 18:59:26 +01:00
// filter: drop-shadow(var(--shift) 8px 1px var(--shadow-colour));
// translate: calc(var(--shift) * -1) calc(var(--shift) * -1);
2024-10-12 18:59:26 +01:00
@media (prefers-reduced-motion: no-preference) {
// transition: filter, translate;
// transition-duration: 1s;
// transition-timing-function: ease-in-out;
animation: shift-avatar 3s ease-in-out infinite alternate backwards;
@keyframes shift-avatar {
2024-10-12 18:59:26 +01:00
from {
filter: drop-shadow(0px 0px 0px var(--shadow-colour));
translate: none;
}
to {
2024-10-12 18:59:26 +01:00
filter: drop-shadow(var(--shift) 8px 1px var(--shadow-colour));
translate: calc(var(--shift) * -1) calc(var(--shift) * -1);
}
}
}
}
2024-10-12 18:59:26 +01:00
@media (prefers-reduced-motion: no-preference) {
img:hover {
filter: none;
translate: none;
2024-10-12 18:59:26 +01:00
// animation-play-state: paused;
}
}
}
@media only screen and (max-width: 768px) {
.avatar img {
--shift: 13px;
border-width: 5px;
}
}
2024-10-12 18:59:26 +01:00
///////////////////////
// BOX LINK
///////////////////////
.box-link {
--shift: 8px;
--border-radius: 10px;
2024-10-12 18:59:26 +01:00
position: relative;
width: 100%;
display: flex;
2024-10-12 18:59:26 +01:00
justify-content: center;
margin-top: 20px;
margin-bottom: 20px;
translate: calc(var(--shift) * -1) calc(var(--shift) * -1);
2024-10-12 18:59:26 +01:00
@media (prefers-reduced-motion: no-preference) {
transition: translate;
2024-10-12 18:59:26 +01:00
transition-duration: 0.25s;
transition-timing-function: ease-in-out;
2024-10-12 18:59:26 +01:00
animation: shift-image 0.3s backwards;
@keyframes shift-image {
from { translate: none; }
to { translate: calc(var(--shift) * -1) calc(var(--shift) * -1); }
}
}
span {
border-radius: var(--border-radius);
opacity: .5;
background-color: black;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
2024-10-12 18:59:26 +01:00
z-index: 0;
}
img {
/* object-position:38% 50%; */
2024-10-12 18:59:26 +01:00
z-index: -1;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
margin: 0;
padding: 0;
width: 100%; height: 100%;
2024-10-12 18:59:26 +01:00
overflow: hidden;
object-fit: cover;
border: 4px solid black;
border-radius: var(--border-radius);
2024-10-12 18:59:26 +01:00
box-shadow: var(--shift) var(--shift) 1px var(--shadow-colour);
2024-10-12 18:59:26 +01:00
@media (prefers-reduced-motion: no-preference) {
transition: box-shadow;
2024-10-12 18:59:26 +01:00
transition-duration: 0.25s;
transition-timing-function: ease-in-out;
2024-10-12 18:59:26 +01:00
animation: shift-shadow 0.3s backwards;
@keyframes shift-shadow {
from { box-shadow: none; }
2024-10-12 18:59:26 +01:00
to { box-shadow: var(--shift) var(--shift) 1px var(--shadow-colour); }
}
}
}
2024-10-12 18:59:26 +01:00
@media (prefers-reduced-motion: no-preference) {
&:hover {
translate: none;
img {
box-shadow: none;
}
}
}
div {
2024-10-12 18:59:26 +01:00
z-index: 0;
margin-top: 50px;
margin-bottom: 50px;
margin-right: 5%;
margin-left: 5%;
}
p {
color: white;
margin: auto;
text-align: center !important;
text-shadow: 0px 2px black;
}
a {
color: white;
cursor: pointer;
text-align: center !important;
text-underline-offset: 3px;
text-decoration-skip-ink: all;
}
2024-10-12 18:59:26 +01:00
}
///////////////////////
// FOOTER LOGO
///////////////////////
.footer-logo {
filter: contrast(100%);
transition: filter 1s ease-in-out;
}
.footer-logo:hover {
filter: contrast(0%) drop-shadow(7px 7px 5px grey);
}