Bläddra i källkod

Format posts.

dev
Chris Smith 8 år sedan
förälder
incheckning
57eddf8627
2 ändrade filer med 302 tillägg och 2 borttagningar
  1. 9
    1
      index.html
  2. 293
    1
      res/css/style.css

+ 9
- 1
index.html Visa fil

@@ -7,7 +7,15 @@
7 7
   <body>
8 8
     <div id="wrapper">
9 9
       <div id="main">
10
-        &lt;!-- TODO --&gt;
10
+        <article class="post">
11
+          <header>
12
+            <div class="title">
13
+              <h2>Coming soon... maybe</h2>
14
+              <p>Subheading?</p>
15
+            </div>
16
+          </header>
17
+          <p>&lt;!-- TODO --&gt;</p>
18
+        </article>
11 19
       </div>
12 20
 
13 21
       <section id="sidebar">

+ 293
- 1
res/css/style.css Visa fil

@@ -289,6 +289,298 @@ header p {
289 289
   width: 100%;
290 290
 }
291 291
 
292
+/* Post */
293
+
294
+.post {
295
+  padding: 3em 3em 1em 3em ;
296
+  background: #ffffff;
297
+  border: solid 1px rgba(160, 160, 160, 0.3);
298
+  margin: 0 0 3em 0;
299
+  position: relative;
300
+}
301
+
302
+.post > header {
303
+  display: -moz-flex;
304
+  display: -webkit-flex;
305
+  display: -ms-flex;
306
+  display: flex;
307
+  border-bottom: solid 1px rgba(160, 160, 160, 0.3);
308
+  left: -3em;
309
+  margin: -3em 0 3em 0;
310
+  position: relative;
311
+  width: calc(100% + 6em);
312
+}
313
+
314
+.post > header .title {
315
+  -moz-flex-grow: 1;
316
+  -webkit-flex-grow: 1;
317
+  -ms-flex-grow: 1;
318
+  flex-grow: 1;
319
+  -ms-flex: 1;
320
+  padding: 3.75em 3em 3.3em 3em;
321
+}
322
+
323
+.post > header .title h2 {
324
+  font-weight: 900;
325
+  font-size: 1.5em;
326
+}
327
+
328
+.post > header .title > :last-child {
329
+  margin-bottom: 0;
330
+}
331
+
332
+.post > header .meta {
333
+  padding: 3.75em 3em 1.75em 3em ;
334
+  border-left: solid 1px rgba(160, 160, 160, 0.3);
335
+  min-width: 17em;
336
+  text-align: right;
337
+  width: 17em;
338
+}
339
+
340
+.post > header .meta > * {
341
+  margin: 0 0 1em 0;
342
+}
343
+
344
+.post > header .meta > :last-child {
345
+  margin-bottom: 0;
346
+}
347
+
348
+.post > header .meta .published {
349
+  color: #3c3b3b;
350
+  display: block;
351
+  font-family: "Raleway", Helvetica, sans-serif;
352
+  font-size: 0.7em;
353
+  font-weight: 800;
354
+  letter-spacing: 0.25em;
355
+  margin-top: 0.5em;
356
+  text-transform: uppercase;
357
+  white-space: nowrap;
358
+}
359
+
360
+.post > .image.featured {
361
+  overflow: hidden;
362
+}
363
+
364
+.post > .image.featured img {
365
+  -moz-transition: -moz-transform 0.2s ease-out;
366
+  -webkit-transition: -webkit-transform 0.2s ease-out;
367
+  -ms-transition: -ms-transform 0.2s ease-out;
368
+  transition: transform 0.2s ease-out;
369
+}
370
+
371
+.post > .image.featured:hover img {
372
+  -moz-transform: scale(1.05);
373
+  -webkit-transform: scale(1.05);
374
+  -ms-transform: scale(1.05);
375
+  transform: scale(1.05);
376
+}
377
+
378
+.post > footer {
379
+  display: -moz-flex;
380
+  display: -webkit-flex;
381
+  display: -ms-flex;
382
+  display: flex;
383
+  -moz-align-items: center;
384
+  -webkit-align-items: center;
385
+  -ms-align-items: center;
386
+  align-items: center;
387
+}
388
+
389
+.post > footer .actions {
390
+  -moz-flex-grow: 1;
391
+  -webkit-flex-grow: 1;
392
+  -ms-flex-grow: 1;
393
+  flex-grow: 1;
394
+}
395
+
396
+.post > footer .stats {
397
+  cursor: default;
398
+  list-style: none;
399
+  padding: 0;
400
+}
401
+
402
+.post > footer .stats li {
403
+  border-left: solid 1px rgba(160, 160, 160, 0.3);
404
+  display: inline-block;
405
+  font-family: "Raleway", Helvetica, sans-serif;
406
+  font-size: 0.6em;
407
+  font-weight: 400;
408
+  letter-spacing: 0.25em;
409
+  line-height: 1;
410
+  margin: 0 0 0 2em;
411
+  padding: 0 0 0 2em;
412
+  text-transform: uppercase;
413
+}
414
+
415
+.post > footer .stats li:first-child {
416
+  border-left: 0;
417
+  margin-left: 0;
418
+  padding-left: 0;
419
+}
420
+
421
+.post > footer .stats li .icon {
422
+  border-bottom: 0;
423
+}
424
+
425
+.post > footer .stats li .icon:before {
426
+  color: rgba(160, 160, 160, 0.3);
427
+  margin-right: 0.75em;
428
+}
429
+
430
+@media screen and (max-width: 980px) {
431
+
432
+  .post {
433
+    border-left: 0;
434
+    border-right: 0;
435
+    left: -3em;
436
+    width: calc(100% + (3em * 2));
437
+  }
438
+
439
+  .post > header {
440
+    -moz-flex-direction: column;
441
+    -webkit-flex-direction: column;
442
+    -ms-flex-direction: column;
443
+    flex-direction: column;
444
+    padding: 3.75em 3em 1.25em 3em ;
445
+    border-left: 0;
446
+  }
447
+
448
+  .post > header .title {
449
+    -ms-flex: 0 1 auto;
450
+    margin: 0 0 2em 0;
451
+    padding: 0;
452
+    text-align: center;
453
+  }
454
+
455
+  .post > header .meta {
456
+    -moz-align-items: center;
457
+    -webkit-align-items: center;
458
+    -ms-align-items: center;
459
+    align-items: center;
460
+    display: -moz-flex;
461
+    display: -webkit-flex;
462
+    display: -ms-flex;
463
+    display: flex;
464
+    -moz-justify-content: center;
465
+    -webkit-justify-content: center;
466
+    -ms-justify-content: center;
467
+    justify-content: center;
468
+    border-left: 0;
469
+    margin: 0 0 2em 0;
470
+    padding-top: 0;
471
+    padding: 0;
472
+    text-align: left;
473
+    width: 100%;
474
+  }
475
+
476
+  .post > header .meta > * {
477
+    border-left: solid 1px rgba(160, 160, 160, 0.3);
478
+    margin-left: 2em;
479
+    padding-left: 2em;
480
+  }
481
+
482
+  .post > header .meta > :first-child {
483
+    border-left: 0;
484
+    margin-left: 0;
485
+    padding-left: 0;
486
+  }
487
+
488
+  .post > header .meta .published {
489
+    margin-bottom: 0;
490
+    margin-top: 0;
491
+  }
492
+
493
+  .post > header .meta .author {
494
+    -moz-flex-direction: row-reverse;
495
+    -webkit-flex-direction: row-reverse;
496
+    -ms-flex-direction: row-reverse;
497
+    flex-direction: row-reverse;
498
+    margin-bottom: 0;
499
+  }
500
+
501
+  .post > header .meta .author .name {
502
+    margin: 0 0 0 1.5em;
503
+  }
504
+
505
+  .post > header .meta .author img {
506
+    width: 3.5em;
507
+  }
508
+
509
+}
510
+
511
+@media screen and (max-width: 736px) {
512
+
513
+  .post {
514
+    padding: 1.5em 1.5em 0.1em 1.5em ;
515
+    left: -1.5em;
516
+    margin: 0 0 2em 0;
517
+    width: calc(100% + (1.5em * 2));
518
+  }
519
+
520
+  .post > header {
521
+    padding: 3em 1.5em 0.5em 1.5em ;
522
+    left: -1.5em;
523
+    margin: -1.5em 0 1.5em 0;
524
+    width: calc(100% + 3em);
525
+  }
526
+
527
+  .post > header .title h2 {
528
+    font-size: 1.1em;
529
+  }
530
+
531
+}
532
+
533
+@media screen and (max-width: 480px) {
534
+
535
+  .post > header .meta {
536
+    -moz-align-items: center;
537
+    -webkit-align-items: center;
538
+    -ms-align-items: center;
539
+    align-items: center;
540
+    -moz-flex-direction: column;
541
+    -webkit-flex-direction: column;
542
+    -ms-flex-direction: column;
543
+    flex-direction: column;
544
+  }
545
+
546
+  .post > header .meta > * {
547
+    border-left: 0;
548
+    margin: 1em 0 0 0;
549
+    padding-left: 0;
550
+  }
551
+
552
+  .post > header .meta .author .name {
553
+    display: none;
554
+  }
555
+
556
+  .post > .image.featured {
557
+    margin-left: -1.5em;
558
+    margin-top: calc(-1.5em - 1px);
559
+    width: calc(100% + 3em);
560
+  }
561
+
562
+  .post > footer {
563
+    -moz-align-items: stretch;
564
+    -webkit-align-items: stretch;
565
+    -ms-align-items: stretch;
566
+    align-items: stretch;
567
+    -moz-flex-direction: column-reverse;
568
+    -webkit-flex-direction: column-reverse;
569
+    -ms-flex-direction: column-reverse;
570
+    flex-direction: column-reverse;
571
+  }
572
+
573
+  .post > footer .stats {
574
+    text-align: center;
575
+  }
576
+
577
+  .post > footer .stats li {
578
+    margin: 0 0 0 1.25em;
579
+    padding: 0 0 0 1.25em;
580
+  }
581
+
582
+}
583
+
292 584
 /* Sidebar */
293 585
 
294 586
 #sidebar {
@@ -297,7 +589,7 @@ header p {
297 589
   width: 22em;
298 590
 }
299 591
 
300
-  #sidebar > * {
592
+#sidebar > * {
301 593
   border-top: solid 1px rgba(160, 160, 160, 0.3);
302 594
   margin: 3em 0 0 0;
303 595
   padding: 3em 0 0 0;

Laddar…
Avbryt
Spara