Skip to content

Commit f674234

Browse files
committed
removed duplicate header, update ui, fixed footer overlapping, panel centering
1 parent 42de3da commit f674234

File tree

14 files changed

+217
-149
lines changed

14 files changed

+217
-149
lines changed

src/assets/styles/card.css

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
list-style: none;
33
display: flex;
44
padding: 1px;
5-
background-color: #23262d;
6-
background-image: none;
5+
background: var(--background);
76
background-size: 400%;
8-
border-radius: 7px;
7+
border-radius: 0.75rem;
98
background-position: 100%;
10-
transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1);
9+
transition: all 0.2s;
1110
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
11+
border: 1px solid var(--border);
12+
overflow: hidden;
1213
}
1314

1415
.link-card > a {
1516
width: 100%;
1617
text-decoration: none;
1718
line-height: 1.4;
18-
padding: calc(1.5rem - 1px);
19+
padding: 1.5rem;
1920
border-radius: 8px;
20-
color: white;
21+
color: var(--text);
2122
background-color: #23262d;
2223
opacity: 0.8;
2324
}
@@ -26,16 +27,25 @@ h2 {
2627
margin: 0;
2728
font-size: 1.25rem;
2829
transition: color 0.6s cubic-bezier(0.22, 1, 0.36, 1);
30+
font-weight: 600;
31+
margin-bottom: 0.5rem;
32+
color: var(--primary);
2933
}
3034

3135
p {
3236
margin-top: 0.5rem;
3337
margin-bottom: 0;
38+
color: var(--secondary);
39+
font-size: 0.875rem;
40+
line-height: 1.5;
3441
}
3542

3643
.link-card:is(:hover, :focus-within) {
3744
background-position: 0;
3845
background-image: var(--accent-gradient);
46+
transform: translateY(-2px);
47+
box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 15%, transparent);
48+
border-color: var(--primary-light);
3949
}
4050

4151
.link-card:is(:hover, :focus-within) h2 {

src/assets/styles/footer.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.container__footer {
2-
@apply h-auto w-auto;
2+
@apply w-full;
33
border-top: 2px solid;
4+
padding: 2rem 0;
5+
margin-top: 2rem;
46
}
57

68
.footer__nav {

src/assets/styles/globals.css

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,38 @@
55

66
@layer base {
77
:root {
8-
--font-size-min: 16;
9-
--font-size-max: 20;
10-
--font-ratio-min: 1.2;
11-
--font-ratio-max: 1.33;
12-
--font-width-min: 375;
13-
--font-width-max: 1500;
14-
--header-h: 6rem;
8+
--primary: #3b82f6;
9+
--primary-light: #60a5fa;
10+
--secondary: #94a3b8;
11+
--background: #0f172a;
12+
--text: #f1f5f9;
13+
--border: #1e293b;
14+
15+
--header-h: 4rem;
1516
--footer-h: 4rem;
17+
--sidebar-w: 16rem;
18+
}
19+
20+
[data-theme="dark"] {
21+
--primary: #3b82f6;
22+
--primary-light: #60a5fa;
23+
--secondary: #94a3b8;
24+
--background: #0f172a;
25+
--text: #f1f5f9;
26+
--border: #1e293b;
27+
}
28+
29+
[data-theme="light"] {
30+
--primary: #2563eb;
31+
--primary-light: #3b82f6;
32+
--secondary: #64748b;
33+
--background: #ffffff;
34+
--text: #0f172a;
35+
--border: #e2e8f0;
1636
}
1737

1838
html {
19-
color-scheme: light dark;
39+
color-scheme: dark light;
2040
height: 100%;
2141
}
2242

@@ -42,6 +62,8 @@
4262
font-family: "Roboto", "SF Pro Text", "SF Pro Icons", "AOS Icons", "Helvetica Neue", Helvetica, Arial, sans-serif,
4363
system-ui;
4464
font-size: 16px;
65+
background-color: var(--background);
66+
color: var(--text);
4567
}
4668

4769
body::before {
@@ -66,10 +88,9 @@
6688

6789
.container {
6890
display: grid;
69-
grid-auto-flow: row;
91+
grid-template-columns: var(--sidebar-w) 1fr;
7092
grid-template-rows: var(--header-h) 1fr var(--footer-h);
71-
grid-template-areas: "header" "main" "footer";
72-
grid-gap: 0.25rem;
93+
min-height: 100vh;
7394
}
7495

7596
header {
@@ -100,11 +121,10 @@
100121
grid-template-columns: 20rem 1fr;
101122
grid-auto-flow: column;
102123
grid-template-areas: "sidebar content";
103-
padding: 1rem;
124+
padding: 2rem;
125+
background-color: color-mix(in srgb, var(--background) 97%, var(--text) 3%);
104126
font-size: 1.25rem;
105127
line-height: 1.6;
106-
max-height: calc(100vh - var(--header-h) - var(--footer-h) - 4rem);
107-
height: 100vh;
108128

109129
&.sidebar {
110130
grid-area: sidebar;

src/assets/styles/header.css

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,56 @@
1-
.container__header {
2-
@apply flex h-16 items-center justify-between gap-5 p-4;
3-
border-bottom: 2px solid;
1+
@import url(./globals.css);
42

5-
& .header__brand {
6-
@apply flex flex-row items-center justify-between gap-2;
3+
.header {
4+
background-color: var(--background);
5+
border-bottom: 1px solid var(--border);
6+
height: var(--header-h);
7+
padding: 0 1.5rem;
8+
display: flex;
9+
align-items: center;
10+
justify-content: space-between;
711

8-
& .logo {
9-
width: 3rem;
10-
aspect-ratio: 1;
12+
.header__brand {
13+
display: flex;
14+
align-items: center;
15+
gap: 0.75rem;
16+
17+
.logo {
18+
width: 2rem;
19+
height: 2rem;
1120
}
1221

13-
& span {
14-
@apply text-xl font-bold;
22+
span {
23+
font-size: 1.25rem;
24+
font-weight: 600;
25+
color: var(--primary);
1526
}
1627
}
1728

18-
& .header__nav {
19-
@apply flex items-center gap-5 text-[1rem] font-bold underline underline-offset-2;
29+
.caption {
30+
text-align: center;
31+
32+
h1 {
33+
font-size: 1.25rem;
34+
font-weight: 500;
35+
margin: 0;
36+
white-space: nowrap;
37+
overflow: hidden;
38+
text-overflow: ellipsis;
39+
}
40+
}
41+
42+
.action-group {
43+
display: flex;
44+
gap: 1rem;
45+
align-items: center;
46+
justify-content: flex-end;
2047
}
2148
}
49+
50+
.switch {
51+
background-color: black;
52+
height: 2rem;
53+
width: 2rem;
54+
border-radius: 50%;
55+
cursor: pointer;
56+
}

src/assets/styles/menu.css

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535
display: block;
3636
}
3737

38+
.nav--list__item.active a {
39+
background: color-mix(in srgb, var(--primary) 15%, transparent);
40+
color: var(--primary);
41+
font-weight: 600;
42+
border-radius: 0.75rem;
43+
}
44+
3845
.layout {
3946
position: relative;
4047
width: max-content;
@@ -47,18 +54,19 @@
4754
inset: unset;
4855
display: flex;
4956
flex-direction: column;
50-
width: var(--sidebar-width);
57+
width: var(--sidebar-w);
5158
margin: 0;
5259
flex-shrink: 0;
5360
right: 100%;
5461
top: var(--header-height);
5562
border: 0;
56-
background: transparent;
63+
background: var(--background);
5764
height: 100%;
58-
padding: 0;
65+
padding: 1rem 0;
5966
overflow: visible;
6067
height: calc(100svh - var(--header-height));
6168
position: sticky;
69+
border-right: 1px solid var(--border);
6270
}
6371

6472
main {
@@ -74,15 +82,25 @@
7482
font-weight: 600;
7583
display: flex;
7684
flex-direction: column;
85+
gap: 0.5rem;
7786
}
7887

7988
[popover] a {
8089
display: inline-block;
8190
width: 100%;
82-
padding-block: 0.5rem;
91+
padding-block: 0.75rem;
8392
padding-inline: 1rem;
8493
text-decoration: none;
85-
color: inherit;
94+
color: var(--secondary);
95+
font-size: 0.875rem;
96+
font-weight: 500;
97+
border-radius: 0.5rem;
98+
transition: all 0.2s;
99+
}
100+
101+
[popover] a:hover {
102+
background: color-mix(in srgb, var(--primary) 10%, transparent);
103+
color: var(--primary);
86104
}
87105

88106
[popover] {
@@ -323,6 +341,9 @@
323341
display: flex;
324342
gap: 0 0.25rem;
325343
padding-inline: 0.5rem;
344+
padding: 1rem;
345+
border-top: 1px solid var(--border);
346+
margin-top: auto;
326347

327348
button {
328349
width: 44px;
@@ -331,12 +352,14 @@
331352
padding: 0;
332353
place-items: center;
333354
border: 0;
334-
color: red;
355+
color: var(--secondary);
356+
border-radius: 0.5rem;
357+
transition: all 0.2s;
358+
}
335359

336-
svg {
337-
opacity: calc(0.625 + var(--active, 0));
338-
width: 50%;
339-
}
360+
button:hover {
361+
color: var(--primary);
362+
background: color-mix(in srgb, var(--primary) 10%, transparent);
340363
}
341364
}
342365

src/assets/styles/page-header.css

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/components/Header.astro

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)