Skip to content

Commit 9ac294f

Browse files
committed
Merge styles: 1.
1 parent 40580c6 commit 9ac294f

11 files changed

+220
-358
lines changed

_layout.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title><%= @title %> | Ruby Elders</title>
77
<link rel="preconnect" href="https://fonts.googleapis.com" />
88
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9+
<link rel="stylesheet" href="/css/base.css" />
910
<link rel="stylesheet" href="/css/writings.css" />
1011
<link href="/writings.atom" type="application/atom+xml" rel="alternate" title="Ruby Elders' writings" />
1112
<link rel="icon" type="image/png" href="/assets/img/favicon.png" />

css/base.css

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,300;1,300&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap");
2+
3+
/* ─── Variables ──────────────────────────────────────────── */
4+
5+
:root {
6+
--font-base: "Cormorant Garamond", serif;
7+
--font-alt: "Jost", sans-serif;
8+
9+
--color-text: hsl(0, 0%, 0%);
10+
--color-bg: hsl(0, 0%, 100%);
11+
--color-accent: hsl(0, 0%, 16%);
12+
--color-accent-hover: hsl(146, 24%, 32%);
13+
--color-border: hsl(0, 0%, 0%);
14+
--color-code-bg: hsl(240, 20%, 95%);
15+
}
16+
17+
/* ─── Reset ──────────────────────────────────────────────── */
18+
19+
*, *::before, *::after { box-sizing: border-box; }
20+
21+
/* ─── Base typography ────────────────────────────────────── */
22+
23+
body {
24+
font-family: var(--font-base);
25+
font-weight: 500;
26+
color: var(--color-text);
27+
background: var(--color-bg);
28+
line-height: 1.5;
29+
margin: 0;
30+
}
31+
32+
h1, h2, h3 {
33+
font-weight: 700;
34+
color: var(--color-text);
35+
margin-top: 0;
36+
}
37+
38+
strong, b { font-weight: 700; }
39+
em, i { font-style: italic; }
40+
41+
a { color: var(--color-accent); text-decoration: underline; }
42+
a:hover { color: var(--color-accent-hover); }
43+
44+
/* ─── Hat animation ──────────────────────────────────────── */
45+
46+
@keyframes wave-hat {
47+
0% { transform: rotate(0deg); }
48+
30% { transform: rotate(-15deg); }
49+
60% { transform: rotate(5deg); }
50+
70% { transform: rotate(5deg); }
51+
100% { transform: rotate(0deg); }
52+
}
53+
54+
#hat { transform-origin: center top; }
55+
56+
/* ─── Dark mode ──────────────────────────────────────────── */
57+
58+
@media (prefers-color-scheme: dark) {
59+
:root {
60+
--color-text: hsl(0, 0%, 88%);
61+
--color-bg: hsl(0, 0%, 10%);
62+
--color-accent: hsl(0, 0%, 75%);
63+
--color-accent-hover: hsl(146, 24%, 55%);
64+
--color-border: hsl(0, 0%, 75%);
65+
--color-code-bg: hsl(240, 10%, 18%);
66+
}
67+
}

0 commit comments

Comments
 (0)