-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
161 lines (145 loc) · 4.67 KB
/
Copy pathindex.html
File metadata and controls
161 lines (145 loc) · 4.67 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Designing in Code</title>
<style>
/* Exercise 3: Design Tokens — change a value here and see everything update */
:root {
--color-primary: #0770e3;
--color-primary-hover: #0557b0;
--color-text: #444;
--color-heading: #0770e3;
--color-bg: #f0f4ff;
--color-card-bg: white;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 32px;
--spacing-xl: 40px;
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
--font-size-base: 1rem;
--font-size-lg: 1.1rem;
--font-size-xl: 2rem;
}
body {
font-family: sans-serif;
background: var(--color-bg);
margin: 0;
padding: var(--spacing-xl) 20px;
}
.exercise {
max-width: 700px;
margin: 0 auto var(--spacing-xl);
}
.exercise-label {
font-size: 0.75rem;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #999;
margin-bottom: var(--spacing-sm);
}
/* Exercise 1 */
.card {
background: var(--color-card-bg);
padding: var(--spacing-xl);
border-radius: var(--radius-lg);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
text-align: center;
}
h1 {
color: var(--color-heading);
font-size: var(--font-size-xl);
margin-bottom: var(--spacing-sm);
}
.card > p {
color: var(--color-text);
font-size: var(--font-size-lg);
line-height: 1.6;
margin-bottom: var(--spacing-lg);
}
.button {
display: inline-block;
background: var(--color-primary);
color: white;
padding: 14px var(--spacing-lg);
border-radius: var(--radius-md);
font-size: var(--font-size-base);
font-weight: bold;
text-decoration: none;
cursor: pointer;
border: none;
}
.button:hover {
background: var(--color-primary-hover);
}
/* Exercise 2 */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: var(--spacing-md);
}
.destination-card {
background: var(--color-card-bg);
padding: var(--spacing-md) var(--spacing-lg);
border-radius: var(--radius-lg);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.destination-card h2 {
color: var(--color-heading);
font-size: 1.2rem;
margin: 0 0 var(--spacing-sm);
}
.destination-card p {
color: var(--color-text);
font-size: var(--font-size-base);
margin: 0;
}
</style>
</head>
<body>
<!-- ============================================================
Exercise 1 — Edit with AI
Open this file, then try asking Claude to make changes.
============================================================ -->
<div class="exercise">
<div class="exercise-label">Exercise 1 — Edit with AI</div>
<div class="card">
<h1>Hello, I'm Alex</h1>
<p>I love exploring new places. My dream destination is Japan — the food, the temples, the trains.</p>
<button class="button">Let's go</button>
</div>
</div>
<!-- ============================================================
Exercise 2 — Components
These three cards share the same structure (.destination-card).
Try adding a new card — it should be easy now.
============================================================ -->
<div class="exercise">
<div class="exercise-label">Exercise 2 — Components</div>
<div class="card-grid">
<div class="destination-card">
<h2>Japan</h2>
<p>Temples, trains, and incredible food.</p>
</div>
<div class="destination-card">
<h2>Iceland</h2>
<p>Waterfalls, geysers, and northern lights.</p>
</div>
<div class="destination-card">
<h2>Thailand</h2>
<p>Beaches, street food, and warm weather.</p>
</div>
</div>
</div>
<!-- ============================================================
Exercise 3 — Design Tokens
All colours, spacing, and radii are defined as CSS variables
in :root at the top of the <style> block.
Try changing --color-primary and see everything update.
============================================================ -->
</body>
</html>