blob: d8a68b096df7cc9edf8d1d296f7412ea91bad8cf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
---
import HeaderLink from './HeaderLink.astro';
import { SITE_TITLE } from '../consts';
---
<style>
/* Default styles for non-mobile devices */
header {
background-color: #333;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
padding: 1em;
margin-bottom: 20px;
}
.logo {
width: 50px;
height: 50px;
overflow: hidden;
border-radius: 50%;
margin-right: 1em;
}
.logo img {
width: 100%;
height: 100%;
object-fit: cover;
}
h1 {
margin: 0;
font-size: 2em;
}
nav {
display: flex;
align-items: center;
font-size: larger;
}
nav > * {
margin-left: 1em;
text-decoration: none;
color: inherit;
transition: color 0.3s ease;
position: relative;
}
nav > *:first-child {
margin-left: 0;
}
nav > *:hover {
color: #ccc;
}
nav > *:hover::before {
content: "";
position: absolute;
bottom: -5px;
left: 0;
width: 100%;
height: 2px;
background-color: #ccc;
}
/* Media query for mobile devices */
@media (max-width: 768px) {
header {
flex-direction: column;
text-align: center;
}
.logo {
margin-bottom: 1em;
}
nav {
flex-direction: column;
align-items: center;
}
nav > * {
margin: 0.5em 0;
}
}
</style>
<header>
<h1>{SITE_TITLE}</h1>
<nav>
<HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blog">Blog</HeaderLink>
<HeaderLink href="/about">About</HeaderLink>
<HeaderLink href="/rss.xml">RSS</HeaderLink>
</nav>
<div class="logo">
<img src="https://files.pinapelz.com/21994085.png" alt="Profile Picture">
</div>
</header>
|