-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnexter-guide.html
321 lines (276 loc) · 7.37 KB
/
nexter-guide.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="jquery-v3.5.1.min.js"></script>
<link
rel="stylesheet"
href="./node_modules/skeleton-css/css/skeleton.css"
/>
<link rel="stylesheet" href="jquery-ui-1.12.1/jquery-ui.min.css" />
<title>Nexter</title>
</head>
<body>
<header>
<div
class="header__container header__container--nexter container text-center u-max-full-width"
>
<h1 class="header__heading m-0">NEXTER</h1>
<p class="m-0">
A course guide for Nexter Project CSS Grid
<span>
<pre class="m-0">
Advanced CSS and SASS by: Jonas Schedtmann</pre
>
</span>
</p>
</div>
</header>
<main class="custom__container">
<section class="section--right-panel mt-40" id="accordion">
<h3>Summary</h3>
<pre>
Think 1st the layout, then create the grid-template-rows and columns
then, put it on the child tracks. review the grid-naming-technique
- use the SVG,
- review the package.json scripts. how it works.
- review the float style, and flex-box.
</pre>
<h3>Tricks</h3>
<div>
<h5>Final Script</h5>
run this after all the codes
so all css will generate
prefix, compress,
<pre><code>
npm run build:css
</code></pre>
<h5>Overkill Emmet Tricks</h5>
<pre><code>
(figure.gallery__item.gallery__item--$>img.gallery__img[src="img/gal-$"][alt="Gallery image $"])*14
</code></pre>
<h5>Centering items inside grid</h5>
<pre><code>
grid-column: 1 / -1 ;
justify-self: center;
</code></pre>
<h5>Align-items:</h5>
<pre><code>
aign-items: align grid items to their grid cells in the column
</code></pre>
<h5>Center item un Flexbox</h5>
<pre><code>
display: flex;
justify-content: center;
</code></pre>
<pre>
It is not neccessary to define the grid-template-rows:
</pre
>
<h5>Align all item in the grid container</h5>
<pre><code>
display: grid;
align-items: center;
justify-items: center;
</code></pre>
</div>
<h3>f9v107 Building the Overall Layout - Part 1</h3>
<div>
<h5>Simple starting point</h5>
<pre><code>
.container {
display: grid;
// use this to adapt the responsiveness and shorter codes
// 6 rows - 1st = 80vh, 2nd = overall height of content.
// 3rd = view weight height, 4th,5th,6th = over all height of content
//
grid-template-rows: 80vh min-content;
}
</code></pre>
<h5>Positioning object without position:absolute</h5>
<pre><code>
//placing heart icon in the top right
// 1st grid-row: 1 / 2 - place it 1st on 1st row
// 2nd grid-column: then put it on 2nd-3rd column
// 3rd - justify-self:end;
&__like {
grid-row: 1 / 2;
grid-column: 2 / 3;
fill: $color-primary;
height: 2.5rem;
width: 2.5rem;
z-index: 2;
justify-self: end;
margin: 1rem;
}
</code></pre>
</div>
<h3>f9v108 Building the Overall Layout - Part 2</h3>
<div>
<pre><code>
// will create 8 same size columns! COOLEST!
grid-template-columns: repeat(8, 1fr);
</code></pre>
<pre><code>
//repeat 8 columns, with minimum width na kasing size ng content
- tapos max size na 14rem o 140px
grid-template-columns: repeat(8, minmax(min-content, 14rem));
</code></pre>
<h5>Setting up the layout in main-container</h5>
<pre><code>
display: grid;
//6 rows
grid-template-rows:80vh min-content 40vw repeat(3, min-content);
// grid line can have multiple names
// full-start - start of ful bleed section
// center-start - the beginning of our 8 columns, so this is the part that stays in the middle
//col-start - starts in column 1, like col-1, col-2, col-3 etc
grid-template-columns:[sidebar-start] 8rem [sidebar-end full-start] 1fr [center-start] repeat(8, [col-star] minmax(min-content, 14rem) [col-end]) [center-end] 1fr [full-end];
</code></pre>
<pre><code>
.sidebar {
background-color: $color-primary;
//this name was set in grid-templates-columns
// size of 8rem
grid-column: sidebar-start / sidebar-end;
//start at 1st row / to last
grid-row: 1 / -1;
}-----------------------------------------
.features {
background-color: $color-grey-light-2;
grid-column: center-start / center-end;
} -----------------------------------------
.gallery {
background-color: $color-grey-dark-1;
grid-column: full-start / full-end;
}
-----------------------------------------
// column size we set in container class
.footer {
background-color: $color-secondary;
grid-column: full-start / full-end;
} -----------------------------------------
.homes {
background-color: $color-secondary;
// column size we set in container class
grid-column: center-start / center-end;
}
</code></pre>
</div>
<h3>
f9109 - 110 Building the Features Section - Part 1 and part
2
</h3>
<div>
<h5>How and why to create grids inside of grids</h5>
<pre><code>
</code></pre>
<h5>
How to create a responsive component without media
querries
</h5>
<pre><code>
display: grid;
grid-template-columns:repeat(auto-fit, minmax(25rem, 1fr));
</code></pre>
<h5>How to build a small component using CSS Grids</h5>
<h5>Modifying the Google Font then reuse them</h5>
<pre> <code>
%heading {
font-family: $font-display;
font-weight: 400;
}
.heading-1 {
@extend %heading;
}
.heading-2 {
@extend %heading;
}
.heading-3 {
@extend %heading;
}
.heading-4 {
@extend %heading;
}
</code></pre>
<h5>Responsive without media querries</h5>
<pre><code>
on main container
display: grid;
grid-template-columns:repeat(auto-fit, minmax(25rem, 1fr));
</code></pre>
</div>
<h3>f9v111 Building the Story Section - Part 1</h3>
<div>
<h5>
Why images are special and behave differently than other
grid items;
</h5>
meron daw silang intrinsince ration associate with them
<pre><code>
</code></pre>
<h5>
How to decide if flexbox is a better tool in certain
situations.
</h5>
<pre><code>
&__content {
background-color: $color-grey-light-1;
// &__picture grid-column code are connected here
// from 8 column, we start at 5 and end at last column
grid-column: col-start 5 / full-end;
padding: 6rem 12rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}
</code></pre>
</div>
<h3>f9v114 Building the Homes Section - Part 2</h3>
<div>
<h5>Positioning object without position:absolute</h5>
<pre><code>
//placing heart icon in the top right
// 1st grid-row: 1 / 2 - place it 1st on 1st row
// 2nd grid-column: then put it on 2nd-3rd column
// 3rd - justify-self:end;
&__like {
grid-row: 1 / 2;
grid-column: 2 / 3;
fill: $color-primary;
height: 2.5rem;
width: 2.5rem;
z-index: 2;
justify-self: end;
margin: 1rem;
}
</code></pre>
</div>
<h3>115 Building the Gallery - Part 1</h3>
<div></div>
</div>
Basahin mo nalang ung code sa SASS.. .
<h3>f9v119 and v120 Building the Header - Part 1 and 2</h3>
<div>
<pre>
tinamad. go to the header.scss read the code
</pre>
</div>
<h3>f9v121 Building the Realtors Section</h3>
<div>
</div>
</section>
</main>
</body>
<script src="./jquery-ui-1.12.1/jquery-ui.min.js"></script>
<script>
$(function () {
$("#accordion").accordion({
collapsible: true,
heightStyle: "content",
});
});
</script>
</html>