-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle-profil.css
More file actions
385 lines (322 loc) · 10.8 KB
/
Copy pathstyle-profil.css
File metadata and controls
385 lines (322 loc) · 10.8 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
/* ============================================================
style-profil.css — Lab 6: Styling Halaman Profil dari P2
Media Interaktif — Pertemuan 3
ISBI Tanah Papua — DKV
Daniel Sande Bona, ST.M.Sc.
FILE INI MENATA tugas.html DARI PERTEMUAN 2
TANPA MENGUBAH SATU BARIS PUN KONTEN HTML!
Struktur CSS ini:
1. Reset & Box Model
2. Body & Tipografi Dasar
3. Header
4. Foto Profil (img di dalam header)
5. Navigasi (nav)
6. Main Content
7. Section
8. Heading di dalam Section
9. Paragraf & Teks
10. Blockquote
11. List (ul, ol, li)
12. Link (a)
13. Code & strong & em
14. Horizontal Rule (hr)
15. Footer
16. Responsive (layar kecil)
============================================================ */
/* ── 1. RESET & BOX MODEL ─────────────────────────────────────
Selalu di baris paling atas!
box-sizing: border-box = lebar termasuk padding & border
──────────────────────────────────────────────────────────── */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* ── 2. BODY & TIPOGRAFI DASAR ───────────────────────────────*/
body {
font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
font-size: 16px;
line-height: 1.7;
color: #1A2E4A;
background-color: #F4F7FC;
min-height: 100vh;
}
/* ── 3. HEADER ───────────────────────────────────────────────
Area kepala halaman: foto, nama, navigasi
──────────────────────────────────────────────────────────── */
header {
background-color: #0A1628;
color: white;
padding: 48px 30px 32px;
text-align: center;
}
/* Garis emas dekoratif di atas header */
header::before {
content: '';
display: block;
width: 60px;
height: 4px;
background-color: #F5B800;
margin: 0 auto 24px;
border-radius: 2px;
}
/* ── 4. FOTO PROFIL ──────────────────────────────────────────
img di dalam header
──────────────────────────────────────────────────────────── */
header img {
width: 120px;
height: 120px;
border-radius: 50%; /* membuat gambar jadi lingkaran */
border: 4px solid #F5B800; /* border emas */
object-fit: cover; /* gambar tidak terdistorsi */
display: block;
margin: 0 auto 20px;
box-shadow: 0 0 0 6px rgba(245, 184, 0, 0.2); /* cahaya emas di sekitar foto */
}
/* ── h1, h2, h3 di dalam HEADER ─────────────────────────────
Berbeda dari heading di section/main!
──────────────────────────────────────────────────────────── */
header h1 {
font-size: 28px;
font-weight: 700;
color: white;
margin-bottom: 6px;
letter-spacing: 0.5px;
}
header h2 {
font-size: 16px;
font-weight: 400;
color: #F5B800;
letter-spacing: 1px;
margin-bottom: 4px;
}
header h3 {
font-size: 13px;
font-weight: 400;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 24px;
}
/* ── 5. NAVIGASI ─────────────────────────────────────────────
Link-link di dalam <nav>
──────────────────────────────────────────────────────────── */
nav {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
margin-top: 4px;
}
nav a {
color: #0A1628;
background-color: #F5B800;
text-decoration: none;
padding: 7px 18px;
border-radius: 20px;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.3px;
transition: background-color 0.2s, transform 0.15s; /* animasi halus */
display: inline-block;
}
nav a:hover {
background-color: #FFD040;
transform: translateY(-2px); /* efek naik sedikit saat hover */
}
nav a:active {
transform: translateY(0); /* kembali saat diklik */
}
/* ── 6. MAIN CONTENT ─────────────────────────────────────────
Pembungkus semua section
max-width + margin auto = konten terpusat & mudah dibaca
──────────────────────────────────────────────────────────── */
main {
max-width: 800px;
margin: 32px auto;
padding: 0 20px;
}
/* ── 7. SECTION ──────────────────────────────────────────────
Setiap bagian konten diberi kartu putih
──────────────────────────────────────────────────────────── */
section {
background-color: white;
border-radius: 10px;
padding: 28px 32px;
margin-bottom: 20px;
border-left: 4px solid #2A6DB5;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
transition: box-shadow 0.2s;
}
section:hover {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10); /* bayangan lebih kuat saat hover */
}
/* Section kontak — beda aksen warna */
section#kontak {
border-left-color: #F5B800;
}
/* Section hobi — beda aksen warna */
section#hobi {
border-left-color: #2E7D32;
}
/* Section langkah — beda aksen warna */
section#langkah {
border-left-color: #E07B39;
}
/* ── 8. HEADING DI DALAM SECTION ─────────────────────────────
h2 dan h3 di dalam <section> (bukan di header)
──────────────────────────────────────────────────────────── */
section h2 {
font-size: 20px;
font-weight: 700;
color: #0A1628;
margin-bottom: 14px;
padding-bottom: 10px;
border-bottom: 2px solid #F4F7FC; /* garis pemisah tipis */
}
section h3 {
font-size: 15px;
font-weight: 600;
color: #2A6DB5;
margin: 18px 0 8px;
}
/* ── 9. PARAGRAF & TEKS ──────────────────────────────────────*/
section p {
color: #1A2E4A;
font-size: 15px;
margin-bottom: 12px;
line-height: 1.75;
}
/* ── 10. BLOCKQUOTE ──────────────────────────────────────────*/
blockquote {
background-color: #EBF3FB;
border-left: 5px solid #2A6DB5;
border-radius: 0 8px 8px 0;
padding: 16px 20px;
margin: 16px 0;
color: #1A2E4A;
font-style: italic;
font-size: 15px;
line-height: 1.8;
}
blockquote::before {
content: '\201C'; /* tanda kutip buka */
font-size: 48px;
color: #2A6DB5;
line-height: 0;
vertical-align: -14px;
margin-right: 6px;
font-family: Georgia, serif;
}
/* ── 11. LIST ────────────────────────────────────────────────*/
section ul,
section ol {
padding-left: 22px;
margin-bottom: 12px;
}
section li {
margin-bottom: 8px;
color: #1A2E4A;
font-size: 15px;
line-height: 1.6;
}
/* Nested list (list di dalam list) */
section ul ul,
section ol ol,
section ul ol,
section ol ul {
margin-top: 6px;
margin-bottom: 4px;
}
section ul ul li,
section ol ul li {
font-size: 14px;
color: #6B7A8D;
margin-bottom: 4px;
}
/* ── 12. LINK ────────────────────────────────────────────────*/
section a {
color: #2A6DB5;
text-decoration: none;
font-weight: 600;
border-bottom: 1px solid rgba(42, 109, 181, 0.3);
transition: color 0.2s, border-color 0.2s;
}
section a:hover {
color: #0A1628;
border-bottom-color: #0A1628;
}
/* ── 13. CODE & STRONG & EM ──────────────────────────────────*/
code {
background-color: #E8EFF8;
color: #2A6DB5;
padding: 2px 6px;
border-radius: 4px;
font-family: 'Courier New', Courier, monospace;
font-size: 13px;
}
strong {
color: #E07B39;
font-weight: 700;
}
em {
color: #2A6DB5;
font-style: italic;
}
/* ── 14. HORIZONTAL RULE ─────────────────────────────────────*/
hr {
border: none;
border-top: 1px solid #DEE4EC;
margin: 20px 0;
}
/* ── 15. FOOTER ──────────────────────────────────────────────*/
footer {
background-color: #0A1628;
color: #6B7A8D;
text-align: center;
padding: 28px 20px;
font-size: 13px;
margin-top: 10px;
}
footer p {
margin-bottom: 6px;
line-height: 1.6;
}
footer p:last-child {
margin-bottom: 0;
font-size: 12px;
color: rgba(107, 122, 141, 0.7);
}
/* Garis emas dekoratif di atas footer */
footer::before {
content: '';
display: block;
width: 40px;
height: 3px;
background-color: #F5B800;
margin: 0 auto 16px;
border-radius: 2px;
}
/* ── 16. RESPONSIVE ──────────────────────────────────────────
Penyesuaian untuk layar kecil (HP/tablet)
──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
body {
font-size: 15px;
}
header {
padding: 32px 20px 24px;
}
header h1 { font-size: 22px; }
header h2 { font-size: 14px; }
nav a {
font-size: 12px;
padding: 6px 14px;
}
main {
padding: 0 14px;
margin: 20px auto;
}
section {
padding: 20px 20px;
}
section h2 { font-size: 17px; }
}