website/app/src/lib/header.svelte

83 lines
1.4 KiB
Svelte
Raw Normal View History

<script>
2025-01-07 00:13:11 +03:00
import { color } from "$lib/util.js";
import { _ } from "svelte-i18n";
export let picture = "";
export let title = "";
let current = "";
for (let i = 0; i < title.length; i++) {
setTimeout(
() => {
current += title[i];
},
100 * (i + 1)
);
}
</script>
2023-08-20 00:57:35 +03:00
<header>
2025-01-07 00:13:11 +03:00
<h1 style="color: var(--{color()})">{current}</h1>
<img src="/profile/{picture}.png" alt="" />
2023-08-20 00:57:35 +03:00
</header>
<style>
2025-01-04 19:59:44 +03:00
header {
background: linear-gradient(rgba(11, 11, 11, 0.808), rgba(1, 1, 1, 0.96)),
url("https://files.ngn.tf/banner.png");
background-size: 50%;
width: 100%;
height: 100%;
2025-01-07 00:13:11 +03:00
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: end;
}
img {
padding: 50px 50px 0 50px;
width: 220px;
bottom: 0;
left: 0;
2025-01-04 19:59:44 +03:00
}
2023-08-20 00:57:35 +03:00
2025-01-04 19:59:44 +03:00
h1 {
2025-01-07 00:13:11 +03:00
font-size: var(--size-7);
font-family:
Consolas,
Monaco,
Lucida Console,
Liberation Mono,
DejaVu Sans Mono,
Bitstream Vera Sans Mono,
Courier New,
monospace;
padding: 50px 50px 30px 50px;
white-space: nowrap;
2025-01-04 19:59:44 +03:00
text-align: center;
color: white;
text-shadow: var(--text-shadow);
}
2025-01-07 00:13:11 +03:00
h1::after {
content: "_";
display: inline-block;
animation: blink 1.5s steps(2) infinite;
}
@media only screen and (max-width: 900px) {
header {
display: block;
}
h1 {
padding: 80px;
}
img {
display: none;
}
2025-01-04 19:59:44 +03:00
}
2023-08-20 00:57:35 +03:00
</style>