-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
201 lines (168 loc) · 4.66 KB
/
styles.css
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
/* Reset default margin and padding */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Style for header */
/* Style for header */
.header {
background-color: #FFDF00;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1); /* Shadow effect */
padding: 20px 0;
}
header .container {
width: 90%;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 28px;
color: #333;
text-transform: uppercase;
letter-spacing: 2px;
font-weight: bold;
}
.nav ul {
list-style: none;
}
.nav ul li {
display: inline;
margin-left: 20px;
}
.nav ul li a {
text-decoration: none;
color: #333;
font-size: 16px;
}
/* Hover effect for navigation links */
.nav ul li a:hover {
color: #555;
}
/* Main content and sidebar styles */
.main-content {
background-color: #FFFFE0;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.main-content .container {
width: 90%;
margin: 0 auto;
display: flex;
justify-content: space-between;
}
.content {
width: 65%; /* Mengurangi lebar konten untuk memberikan lebih banyak ruang pada sidebar */
margin-right: 5%; /* Menambahkan margin ke sidebar */
}
.content article {
margin-bottom: 30px;
}
.content article h3 {
font-size: 26px; /* Menambah ukuran font untuk judul konten */
margin-bottom: 20px; /* Mengurangi margin bawah untuk mengecilkan jarak antar elemen */
}
.content article h4 {
font-size: 22px; /* Menambah ukuran font untuk subjudul konten */
margin-top: 20px;
margin-bottom: 10px;
}
.content article p {
font-size: 18px; /* Menambah ukuran font untuk teks konten */
line-height: 1.6;
margin-bottom: 20px; /* Mengurangi margin bawah untuk teks konten */
}
/* Sidebar */
.sidebar {
width: 30%;
background-color: #FFEEAD; /* Meringankan warna sidebar */
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.sidebar h3 {
font-size: 20px;
margin-bottom: 15px;
}
.sidebar p {
font-size: 16px;
line-height: 1.6;
}
.footer {
background-color: #FFE066; /* Warna kuning untuk footer */
color: #333; /* Warna teks kontras */
padding: 20px 0;
text-align: center; /* Teks rata tengah */
}
.footer p {
margin: 0;
font-size: 14px;
}
/* Gaya untuk tampilan perangkat seluler */
@media screen and (max-width: 768px) {
/* Mengatur gaya untuk layar dengan lebar maksimum 768px (misalnya untuk smartphone) */
.sidebar {
display: none; /* Menyembunyikan sidebar pada layar dengan lebar maksimum 768px */
}
.content {
width: 100%; /* Mengisi lebar konten penuh pada layar kecil */
}
/* Navigasi untuk layar seluler */
.nav-links {
display: none; /* Sembunyikan tautan navigasi */
position: absolute;
top: 60px; /* Sesuaikan posisi navigasi */
left: 0;
width: 100%;
background-color: #333;
text-align: center;
transition: all 0.3s ease;
z-index: 1;
}
.menu-toggle.active + .nav-links {
display: block; /* Tampilkan tautan navigasi saat tombol hamburger diaktifkan */
}
.menu-toggle {
display: block; /* Tampilkan tombol hamburger */
cursor: pointer; /* Ubah kursor menjadi pointer saat dihover */
}
.menu-toggle .hamburger {
width: 25px; /* Atur lebar garis hamburger */
height: 3px; /* Atur tinggi garis hamburger */
background-color: #333;
margin: 5px 0; /* Beri ruang antara garis hamburger */
transition: transform 0.4s ease-in-out; /* Animasi transformasi garis hamburger */
}
/* Animasi perubahan icon menjadi X pada saat di-click */
.menu-toggle.active .hamburger {
transform: rotate(45deg); /* Ubah garis pertama */
}
.menu-toggle.active .hamburger:before,
.menu-toggle.active .hamburger:after {
transform: rotate(-90deg); /* Ubah garis kedua dan ketiga */
}
.nav-links.active {
display: block; /* Menampilkan tautan navigasi */
text-align: center; /* Pusatkan tautan navigasi */
}
.nav-links.active li {
display: block; /* Ubah tautan navigasi menjadi blok */
margin: 10px 0; /* Beri ruang antara setiap tautan */
}
.nav-links.active a {
display: inline-block;
padding: 8px 16px; /* Atur padding tombol navigasi */
border-radius: 4px; /* Tambahkan sudut tombol */
background-color: #FFDF00; /* Warna latar belakang tombol */
color: #333;
font-size: 14px;
text-decoration: none;
}
/* Hover effect untuk tombol navigasi */
.nav-links.active a:hover {
background-color: #FFFF00; /* Ubah warna latar belakang saat dihover */
}
}