|
2 | 2 | {{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} |
3 | 3 |
|
4 | 4 | <main id="site-main" class="site-main outer"> |
5 | | -<div class="post-feed inner"> |
| 5 | +<div class="inner posts"> |
6 | 6 |
|
7 | | - {{#author}} |
8 | | - <section class="post-card post-card-large"> |
| 7 | + <div class="post-feed"> |
9 | 8 |
|
10 | | - {{#if feature_image}} |
11 | | - <div class="post-card-image-link"> |
12 | | - {{!-- This is a responsive image, it loads different sizes depending on device |
13 | | - https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}} |
14 | | - <img class="post-card-image" |
15 | | - srcset="{{img_url feature_image size="s"}} 300w, |
16 | | - {{img_url feature_image size="m"}} 600w, |
17 | | - {{img_url feature_image size="l"}} 1000w, |
18 | | - {{img_url feature_image size="xl"}} 2000w" |
19 | | - sizes="(max-width: 1000px) 400px, 800px" |
20 | | - src="{{img_url feature_image size="m"}}" |
21 | | - alt="{{title}}" |
22 | | - /> |
23 | | - </div> |
24 | | - {{/if}} |
| 9 | + {{#author}} |
| 10 | + <section class="post-card post-card-large"> |
25 | 11 |
|
26 | | - <div class="post-card-content"> |
27 | | - <div class="post-card-content-link"> |
28 | | - |
29 | | - {{#if profile_image}} |
30 | | - <img class="author-profile-pic" src="{{profile_image}}" alt="{{name}}" /> |
| 12 | + {{#if feature_image}} |
| 13 | + <div class="post-card-image-link"> |
| 14 | + {{!-- This is a responsive image, it loads different sizes depending on device |
| 15 | + https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}} |
| 16 | + <img class="post-card-image" |
| 17 | + srcset="{{img_url feature_image size="s"}} 300w, |
| 18 | + {{img_url feature_image size="m"}} 600w, |
| 19 | + {{img_url feature_image size="l"}} 1000w, |
| 20 | + {{img_url feature_image size="xl"}} 2000w" |
| 21 | + sizes="(max-width: 1000px) 400px, 800px" |
| 22 | + src="{{img_url feature_image size="m"}}" |
| 23 | + alt="{{title}}" |
| 24 | + /> |
| 25 | + </div> |
31 | 26 | {{/if}} |
32 | 27 |
|
33 | | - <header class="post-card-header"> |
34 | | - <h2 class="post-card-title">{{name}}</h2> |
35 | | - </header> |
| 28 | + <div class="post-card-content"> |
| 29 | + <div class="post-card-content-link"> |
36 | 30 |
|
37 | | - {{#if bio}} |
38 | | - <div class="post-card-excerpt">{{bio}}</div> |
39 | | - {{/if}} |
| 31 | + {{#if profile_image}} |
| 32 | + <img class="author-profile-pic" src="{{profile_image}}" alt="{{name}}" /> |
| 33 | + {{/if}} |
| 34 | + |
| 35 | + <header class="post-card-header"> |
| 36 | + <h2 class="post-card-title">{{name}}</h2> |
| 37 | + </header> |
40 | 38 |
|
41 | | - <footer class="author-profile-footer"> |
42 | | - {{#if location}} |
43 | | - <div class="author-profile-location">{{location}}</div> |
| 39 | + {{#if bio}} |
| 40 | + <div class="post-card-excerpt">{{bio}}</div> |
44 | 41 | {{/if}} |
45 | | - <div class="author-profile-meta"> |
46 | | - {{#if website}} |
47 | | - <a class="author-profile-social-link" href="{{website}}" target="_blank" rel="noopener">{{website}}</a> |
48 | | - {{/if}} |
49 | | - {{#if twitter}} |
50 | | - <a class="author-profile-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a> |
51 | | - {{/if}} |
52 | | - {{#if facebook}} |
53 | | - <a class="author-profile-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a> |
| 42 | + |
| 43 | + <footer class="author-profile-footer"> |
| 44 | + {{#if location}} |
| 45 | + <div class="author-profile-location">{{location}}</div> |
54 | 46 | {{/if}} |
55 | | - </div> |
56 | | - </footer> |
| 47 | + <div class="author-profile-meta"> |
| 48 | + {{#if website}} |
| 49 | + <a class="author-profile-social-link" href="{{website}}" target="_blank" rel="noopener">{{website}}</a> |
| 50 | + {{/if}} |
| 51 | + {{#if twitter}} |
| 52 | + <a class="author-profile-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a> |
| 53 | + {{/if}} |
| 54 | + {{#if facebook}} |
| 55 | + <a class="author-profile-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a> |
| 56 | + {{/if}} |
| 57 | + </div> |
| 58 | + </footer> |
| 59 | + |
| 60 | + </div> |
| 61 | + </div> |
57 | 62 |
|
58 | | - </div> |
59 | | - </div> |
| 63 | + </section> |
| 64 | + {{/author}} |
60 | 65 |
|
61 | | - </section> |
62 | | - {{/author}} |
| 66 | + {{#foreach posts}} |
| 67 | + {{!-- The tag below includes the markup for each post - partials/post-card.hbs --}} |
| 68 | + {{> "post-card"}} |
| 69 | + {{/foreach}} |
63 | 70 |
|
64 | | - {{#foreach posts}} |
65 | | - {{!-- The tag below includes the markup for each post - partials/post-card.hbs --}} |
66 | | - {{> "post-card"}} |
67 | | - {{/foreach}} |
| 71 | + </div> |
68 | 72 |
|
| 73 | + {{pagination}} |
| 74 | + |
69 | 75 | </div> |
70 | 76 | </main> |
0 commit comments