-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
296 lines (247 loc) · 4.96 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
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
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: 62.5%;
}
body {
font-family: "Oswald", sans-serif;
font-size: 1.6rem;
background: #000000;
color: #ffffff;
/* Pattern from heropatterns.com */
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='105' viewBox='0 0 80 105'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='death-star' fill='%23540606' fill-opacity='0.1'%3E%3Cpath d='M20 10a5 5 0 0 1 10 0v50a5 5 0 0 1-10 0V10zm15 35a5 5 0 0 1 10 0v50a5 5 0 0 1-10 0V45zM20 75a5 5 0 0 1 10 0v20a5 5 0 0 1-10 0V75zm30-65a5 5 0 0 1 10 0v50a5 5 0 0 1-10 0V10zm0 65a5 5 0 0 1 10 0v20a5 5 0 0 1-10 0V75zM35 10a5 5 0 0 1 10 0v20a5 5 0 0 1-10 0V10zM5 45a5 5 0 0 1 10 0v50a5 5 0 0 1-10 0V45zm0-35a5 5 0 0 1 10 0v20a5 5 0 0 1-10 0V10zm60 35a5 5 0 0 1 10 0v50a5 5 0 0 1-10 0V45zm0-35a5 5 0 0 1 10 0v20a5 5 0 0 1-10 0V10z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
a {
color: white;
text-decoration: none;
}
ul {
list-style: none;
}
.container {
width: 90%;
margin: auto;
}
/* Navigation */
.nav-main {
display: flex;
justify-content: space-between;
align-items: center;
height: 60px;
font-size: 1.7rem;
}
.nav-brand {
width: 50px;
}
.nav-main ul {
display: flex;
}
.nav-main ul li {
padding: 10px;
}
.nav-main ul li a {
padding: 6px;
}
.nav-main ul li a:hover {
border-bottom: 2px solid #ffffff;
}
.nav-main ul.nav-menu {
flex: 1;
margin-left: 20px;
}
.menu-btn {
display: none;
position: absolute;
cursor: pointer;
top: 15px;
right: 30px;
z-index: 2;
}
/* Show case */
hr {
margin: 10px 0;
}
.showcase {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
width: 100%;
height: 550px;
padding: 50px;
margin-bottom: 20px;
background: url("https://github.com/FaztWeb/technews-html/blob/master/img/showcase2.jpg?raw=true")
no-repeat center center/cover;
}
.btn {
display: inline-block;
margin: 10px 0;
padding: 10px 20px;
color: white;
font-size: 15px;
border: 1px solid #fff;
cursor: pointer;
}
.btn:hover {
opacity: 0.7;
}
.showcase h2,
.showcase p {
margin-bottom: 10px;
}
/* News-cards */
.news-cards {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 25px;
margin: 10px 0;
}
.news-cards img {
width: 100%;
height: 180px;
}
.news-cards h3 {
font-size: 20px;
margin: 10px 0;
}
.news-cards a {
display: inline-block;
padding: 10px 0;
color: #f2f2f2;
text-transform: uppercase;
font-weight: bold;
}
.news-cards a:hover {
text-decoration: underline;
}
/* Cards banner one */
.cards-banner-one {
width: 100%;
height: 350px;
background: url("https://github.com/FaztWeb/technews-html/blob/master/img/tech-red.jpg?raw=true")
no-repeat center center/cover;
margin-bottom: 40px;
}
.cards-banner-one .content {
width: 50%;
padding: 100px 0 0 30px;
}
.cards-banner-one h2,
.cards-banner-one p {
margin: 10px 0 20px 0;
}
/* Cards banner two */
.cards-banner-two {
width: 100%;
height: 350px;
background: url("https://github.com/FaztWeb/technews-html/blob/master/img/image-five.jpg?raw=true")
no-repeat center center/cover;
margin-bottom: 40px;
}
.cards-banner-two .content {
width: 50%;
padding: 100px 30px 0 0;
margin: 0 0 0 auto;
text-align: right;
}
.cards-banner-two h2,
.cards-banner-two p {
margin: 10px 0 20px 0;
}
/* Social */
.social {
margin: 50px;
}
.social p {
margin-bottom: 30px;
font-size: 30px;
text-align: center;
}
.links {
display: flex;
align-items: center;
justify-content: center;
}
.links a {
margin: 0 30px;
}
.links a i {
font-size: 30px;
}
/* Footer */
.footer-links {
padding: 35px 0;
font-size: 1.2rem;
background-color: #2f3640;
color: #616161;
}
.footer-container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
align-items: flex-start;
justify-content: center;
}
.footer-container ul {
margin: 0 auto;
}
.footer-container ul li {
line-height: 2;
}
.footer-copyright {
padding: 20px 0 0 0;
font-size: 1.2rem;
text-align: center;
background-color: #2f3640;
color: #616161;
}
@media (max-width: 700px) {
.menu-btn {
display: block;
}
.nav-main ul.nav-menu {
display: block;
position: absolute;
top: 0;
left: 0;
background-color: #2f3640;
padding: 10px;
height: 100%;
transform: translateX(-400px);
transition: transform 0.5s ease-in-out;
opacity: 0.9;
}
.nav-main ul.nav-menu.show {
transform: translateX(-20px);
}
.nav-main ul.nav-menu li {
font-size: 1.4rem;
padding: 15px;
}
.nav-main ul.nav-menu-right {
display: none;
}
.news-cards {
grid-template-columns: repeat(2, 1fr);
}
.cards-banner-one .content,
.cards-banner-two .content {
width: 80%;
}
}
@media (max-width: 500px) {
.news-cards {
grid-template-columns: 1fr;
}
.news-cards img {
height: 270px;
}
.cards-banner-one .content,
.cards-banner-two .content {
width: 100%;
padding: 60px 20px;
}
}