|
45 | 45 | '900', |
46 | 46 | ); |
47 | 47 |
|
48 | | -$lorem_short = 'Lorem ipsum dolor sit amet'; |
| 48 | +$bs_lorem_short = 'Lorem ipsum dolor sit amet'; |
49 | 49 |
|
50 | | -$lorem_long = 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque, ut. Repudiandae excepturi sequi quaerat ex eos dicta earum, fuga deleniti amet accusantium recusandae quia aperiam aut assumenda, quas ratione laborum.' |
| 50 | +$bs_lorem_long = 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque, ut. Repudiandae excepturi sequi quaerat ex eos dicta earum, fuga deleniti amet accusantium recusandae quia aperiam aut assumenda, quas ratione laborum.' |
51 | 51 |
|
52 | 52 | ?> |
53 | 53 |
|
|
79 | 79 | <h2 class="border-bottom mb-5">Typography</h2> |
80 | 80 |
|
81 | 81 | <div class="col-12 pb-3"> |
82 | | - <p class="h1 mb-4">h1. <?php echo esc_html( $lorem_short ); ?></p> |
83 | | - <p class="h2 mb-4">h2. <?php echo esc_html( $lorem_short ); ?></p> |
84 | | - <p class="h3 mb-4">h3. <?php echo esc_html( $lorem_short ); ?></p> |
85 | | - <p class="h4 mb-4">h4. <?php echo esc_html( $lorem_short ); ?></p> |
86 | | - <p class="h5 mb-4">h5. <?php echo esc_html( $lorem_short ); ?></p> |
87 | | - <p class="h6 mb-4">h6. <?php echo esc_html( $lorem_short ); ?></p> |
| 82 | + <p class="h1 mb-4">h1. <?php echo esc_html( $bs_lorem_short ); ?></p> |
| 83 | + <p class="h2 mb-4">h2. <?php echo esc_html( $bs_lorem_short ); ?></p> |
| 84 | + <p class="h3 mb-4">h3. <?php echo esc_html( $bs_lorem_short ); ?></p> |
| 85 | + <p class="h4 mb-4">h4. <?php echo esc_html( $bs_lorem_short ); ?></p> |
| 86 | + <p class="h5 mb-4">h5. <?php echo esc_html( $bs_lorem_short ); ?></p> |
| 87 | + <p class="h6 mb-4">h6. <?php echo esc_html( $bs_lorem_short ); ?></p> |
88 | 88 | </div> |
89 | 89 |
|
90 | 90 | <div class="col-12 pb-3 pt-5"> |
|
97 | 97 | </div> |
98 | 98 |
|
99 | 99 | <div class="col-12 col-md-6 pt-5"> |
100 | | - <p><?php echo esc_html( $lorem_long ); ?></p> |
101 | | - <p><?php echo esc_html( $lorem_long ); ?></p> |
102 | | - <p><?php echo esc_html( $lorem_long ); ?></p> |
103 | | - <p><?php echo esc_html( $lorem_long ); ?></p> |
| 100 | + <p><?php echo esc_html( $bs_lorem_long ); ?></p> |
| 101 | + <p><?php echo esc_html( $bs_lorem_long ); ?></p> |
| 102 | + <p><?php echo esc_html( $bs_lorem_long ); ?></p> |
| 103 | + <p><?php echo esc_html( $bs_lorem_long ); ?></p> |
104 | 104 | </div> |
105 | 105 |
|
106 | 106 | <div class="col-12 col-md-6 pt-5"> |
107 | | - <p class="lead mb-4">LEAD. <?php echo esc_html( $lorem_long ); ?></p> |
108 | | - <p class="small mb-4">SMALL. <?php echo esc_html( $lorem_long ); ?></p> |
109 | | - <p class="fw-bold mb-4">BOLD. <?php echo esc_html( $lorem_long ); ?></p> |
110 | | - <p class="fst-italic mb-4">ITALIC. <?php echo esc_html( $lorem_long ); ?></p> |
| 107 | + <p class="lead mb-4">LEAD. <?php echo esc_html( $bs_lorem_long ); ?></p> |
| 108 | + <p class="small mb-4">SMALL. <?php echo esc_html( $bs_lorem_long ); ?></p> |
| 109 | + <p class="fw-bold mb-4">BOLD. <?php echo esc_html( $bs_lorem_long ); ?></p> |
| 110 | + <p class="fst-italic mb-4">ITALIC. <?php echo esc_html( $bs_lorem_long ); ?></p> |
111 | 111 | </div> |
112 | 112 |
|
113 | 113 | <div class="col-12 col-md-6 pt-5"> |
114 | 114 | <?php foreach ( $bs_font_weights as $weight ) { ?> |
115 | | - <p style="font-weight: <?php echo esc_attr( $weight ); ?>;"><?php echo esc_attr( $weight ); ?>. <?php echo esc_html( $lorem_long ); ?></p> |
| 115 | + <p style="font-weight: <?php echo esc_attr( $weight ); ?>;"><?php echo esc_attr( $weight ); ?>. <?php echo esc_html( $bs_lorem_long ); ?></p> |
116 | 116 | <?php } ?> |
117 | 117 | </div> |
118 | 118 |
|
119 | 119 | <div class="col-12 col-md-6 pt-5"> |
120 | 120 | <?php foreach ( $bs_font_weights as $weight ) { ?> |
121 | | - <p style="font-style: italic; font-weight: <?php echo esc_attr( $weight ); ?>;"><?php echo esc_attr( $weight ); ?>. <?php echo esc_html( $lorem_long ); ?></p> |
| 121 | + <p style="font-style: italic; font-weight: <?php echo esc_attr( $weight ); ?>;"><?php echo esc_attr( $weight ); ?>. <?php echo esc_html( $bs_lorem_long ); ?></p> |
122 | 122 | <?php } ?> |
123 | 123 | </div> |
124 | 124 |
|
|
175 | 175 |
|
176 | 176 | <p class="h2 mb-4">Lorem ipsum dolor</p> |
177 | 177 |
|
178 | | - <p class="mb-4"><?php echo esc_html( $lorem_long ); ?></p> |
| 178 | + <p class="mb-4"><?php echo esc_html( $bs_lorem_long ); ?></p> |
179 | 179 |
|
180 | 180 | <div> |
181 | 181 | <button type="button" class="btn btn-<?php echo esc_attr( $color_2 ); ?>">Button</button> |
|
194 | 194 |
|
195 | 195 | </div> <!-- #blocks --> |
196 | 196 |
|
| 197 | + <div id="images" class="container mb-5"> |
| 198 | + |
| 199 | + <h2 class="border-bottom mb-5">Images</h2> |
| 200 | + |
| 201 | + <?php |
| 202 | + |
| 203 | + $row_cols = array( |
| 204 | + '', |
| 205 | + 'row-cols-md-2', |
| 206 | + 'row-cols-md-3', |
| 207 | + 'row-cols-md-2 row-cols-lg-4', |
| 208 | + 'row-cols-md-3 row-cols-lg-6', |
| 209 | + ); |
| 210 | + |
| 211 | + foreach ( $row_cols as $row_col ) { ?> |
| 212 | + |
| 213 | + <div class="row <?php echo esc_attr( $row_col ); ?> mb-5"> |
| 214 | + <div class="col position-relative"> |
| 215 | + <img class="img-fluid" src="https://dummyimage.com/1920x1080.jpg"> |
| 216 | + <div class="img-details position-absolute top-0 mt-1 ms-1 px-2 py-1 bg-light"> |
| 217 | + <p class="natural-width mb-0"></p> |
| 218 | + <p class="client-width mb-0"></p> |
| 219 | + <p class="percent-width mb-0"></p> |
| 220 | + <p class="screen-width mb-0"></p> |
| 221 | + </div> |
| 222 | + </div> |
| 223 | + </div> |
| 224 | + |
| 225 | + <?php } ?> |
| 226 | + |
| 227 | + <script> |
| 228 | + const imagesRows = document.querySelectorAll('#images .row'); |
| 229 | + |
| 230 | + imagesRows.forEach(function (row) { |
| 231 | + |
| 232 | + const img = row.querySelector('.img-fluid'); |
| 233 | + const naturalW = row.querySelector('.img-details .natural-width'); |
| 234 | + const clientW = row.querySelector('.img-details .client-width'); |
| 235 | + const percentW = row.querySelector('.img-details .percent-width'); |
| 236 | + const screenW = row.querySelector('.img-details .screen-width'); |
| 237 | + |
| 238 | + function displayImgDetails() { |
| 239 | + naturalW.innerHTML = 'naturalWidth(px): ' + img.naturalWidth; |
| 240 | + clientW.innerHTML = 'clientWidth(px): ' + img.clientWidth; |
| 241 | + percentW.innerHTML = 'percent(%): ' + Math.round(img.clientWidth / img.naturalWidth * 100 ); |
| 242 | + screenW.innerHTML = 'Width(vw): ' + Math.round(img.clientWidth / document.body.clientWidth * 100 ); |
| 243 | + }; |
| 244 | + |
| 245 | + img.addEventListener('load', displayImgDetails); |
| 246 | + window.addEventListener('resize', displayImgDetails ); |
| 247 | + }); |
| 248 | + |
| 249 | + </script> |
| 250 | + |
| 251 | + </div> <!-- #images --> |
| 252 | + |
197 | 253 | <div id="forms" class="container mb-5"> |
198 | 254 |
|
199 | 255 | <div class="row pt-5"> |
|
227 | 283 | <div class="mb-4"> |
228 | 284 | <div class="form-check"> |
229 | 285 | <input type="checkbox" class="form-check-input" id="check-01"> |
230 | | - <label class="form-check-label" for="check-01"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 286 | + <label class="form-check-label" for="check-01"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
231 | 287 | </div> |
232 | 288 | </div> |
233 | 289 |
|
|
244 | 300 | <div class="mb-4"> |
245 | 301 | <div class="form-check"> |
246 | 302 | <input type="checkbox" class="form-check-input" id="check-1" checked> |
247 | | - <label class="form-check-label" for="check-1"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 303 | + <label class="form-check-label" for="check-1"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
248 | 304 | </div> |
249 | 305 | <div class="form-check"> |
250 | 306 | <input type="checkbox" class="form-check-input" id="check-2"> |
251 | | - <label class="form-check-label" for="check-2"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 307 | + <label class="form-check-label" for="check-2"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
252 | 308 | </div> |
253 | 309 | <div class="form-check"> |
254 | 310 | <input type="checkbox" class="form-check-input" id="check-3"> |
255 | | - <label class="form-check-label" for="check-3"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 311 | + <label class="form-check-label" for="check-3"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
256 | 312 | </div> |
257 | 313 | </div> |
258 | 314 |
|
259 | 315 | <div class="mb-4"> |
260 | 316 | <div class="form-check"> |
261 | 317 | <input class="form-check-input" type="radio" name="flexRadioDefault" id="radio-1" checked> |
262 | | - <label class="form-check-label" for="radio-1"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 318 | + <label class="form-check-label" for="radio-1"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
263 | 319 | </div> |
264 | 320 | <div class="form-check"> |
265 | 321 | <input class="form-check-input" type="radio" name="flexRadioDefault" id="radio-2"> |
266 | | - <label class="form-check-label" for="radio-2"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 322 | + <label class="form-check-label" for="radio-2"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
267 | 323 | </div> |
268 | 324 | <div class="form-check"> |
269 | 325 | <input class="form-check-input" type="radio" name="flexRadioDefault" id="radio-3"> |
270 | | - <label class="form-check-label" for="radio-3"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 326 | + <label class="form-check-label" for="radio-3"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
271 | 327 | </div> |
272 | 328 | </div> |
273 | 329 |
|
274 | 330 | <div class="mb-4"> |
275 | 331 | <div class="form-check form-switch"> |
276 | 332 | <input type="checkbox" class="form-check-input" id="switch-1" checked> |
277 | | - <label class="form-check-label" for="switch-1"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 333 | + <label class="form-check-label" for="switch-1"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
278 | 334 | </div> |
279 | 335 | <div class="form-check form-switch"> |
280 | 336 | <input type="checkbox" class="form-check-input" id="switch-2"> |
281 | | - <label class="form-check-label" for="switch-2"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 337 | + <label class="form-check-label" for="switch-2"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
282 | 338 | </div> |
283 | 339 | <div class="form-check form-switch"> |
284 | 340 | <input type="checkbox" class="form-check-input" id="switch-3"> |
285 | | - <label class="form-check-label" for="switch-3"><?php echo esc_html( $lorem_short ); ?>.</label> |
| 341 | + <label class="form-check-label" for="switch-3"><?php echo esc_html( $bs_lorem_short ); ?>.</label> |
286 | 342 | </div> |
287 | 343 | </div> |
288 | 344 |
|
|
0 commit comments