|
| 1 | +{% assign section_local_posts = site.posts | where: "section", page.section %} |
| 2 | +{% assign section_external_posts = site.data.posts | where: "section", page.section %} |
| 3 | +{% assign featured_local_posts = section_local_posts | where: "featured", true %} |
| 4 | +{% assign featured_external_posts = section_external_posts | where: "featured", true %} |
| 5 | +{% assign local_posts = section_local_posts | where_exp: "post", "post.featured != true" %} |
| 6 | +{% assign external_posts = section_external_posts | where_exp: "post", "post.featured != true" %} |
| 7 | + |
| 8 | +<section class="blog-hero"> |
| 9 | + <p class="blog-hero__kicker">{{ page.kicker }}</p> |
| 10 | + <h1 class="blog-hero__title">{{ page.title }}</h1> |
| 11 | + <p class="blog-hero__description">{{ page.description }}</p> |
| 12 | +</section> |
| 13 | + |
| 14 | +{% if featured_local_posts.size > 0 or featured_external_posts.size > 0 %} |
| 15 | + <section class="posts-group" aria-labelledby="featured-posts-title"> |
| 16 | + <div class="posts-group__header"> |
| 17 | + <h2 class="posts-group__title" id="featured-posts-title">Featured</h2> |
| 18 | + <p class="posts-group__description">Highlights from the DocumentDB team and community.</p> |
| 19 | + </div> |
| 20 | + |
| 21 | + <div class="posts-list" aria-label="Featured {{ page.section }}"> |
| 22 | + {% for post in featured_local_posts %} |
| 23 | + {% include post-card.html post=post featured=true %} |
| 24 | + {% endfor %} |
| 25 | + |
| 26 | + {% for post in featured_external_posts %} |
| 27 | + {% include post-card.html post=post featured=true %} |
| 28 | + {% endfor %} |
| 29 | + </div> |
| 30 | + </section> |
| 31 | +{% endif %} |
| 32 | + |
| 33 | +{% if local_posts.size > 0 %} |
| 34 | + <section class="posts-group" aria-labelledby="published-here-title"> |
| 35 | + <div class="posts-group__header"> |
| 36 | + <h2 class="posts-group__title" id="published-here-title">Published here</h2> |
| 37 | + <p class="posts-group__description">Posts from the DocumentDB team.</p> |
| 38 | + </div> |
| 39 | + |
| 40 | + <div class="posts-list" aria-label="Repository-authored {{ page.section }}"> |
| 41 | + {% for post in local_posts %} |
| 42 | + {% include post-card.html post=post featured=false %} |
| 43 | + {% endfor %} |
| 44 | + </div> |
| 45 | + </section> |
| 46 | +{% endif %} |
| 47 | + |
| 48 | +{% if external_posts.size > 0 %} |
| 49 | + <section class="posts-group" aria-labelledby="external-posts-title"> |
| 50 | + <div class="posts-group__header"> |
| 51 | + <h2 class="posts-group__title" id="external-posts-title">From around the web</h2> |
| 52 | + <p class="posts-group__description">Curated partner and community articles hosted outside this repository.</p> |
| 53 | + </div> |
| 54 | + |
| 55 | + <div class="posts-list" aria-label="External {{ page.section }}"> |
| 56 | + {% for post in external_posts %} |
| 57 | + {% include post-card.html post=post featured=false %} |
| 58 | + {% endfor %} |
| 59 | + </div> |
| 60 | + </section> |
| 61 | +{% endif %} |
0 commit comments