|
| 1 | +{% import "macros.html" as macros -%} |
| 2 | +{% extends "layout.html" -%} |
| 3 | +{% block page -%} |
| 4 | +<header class="mt3 mt0-ns mb4-ns"> |
| 5 | + <div class="container flex flex-column flex-row-l justify-between-l"> |
| 6 | + <div class="mw6-l"> |
| 7 | + <p> |
| 8 | + This is a subset of the <a href="/">main Rust blog</a> |
| 9 | + listing only official release annoucement posts. |
| 10 | + </p> |
| 11 | + <p> |
| 12 | + Did you know? There are convenient redirects for |
| 13 | + the latest and specific release posts: |
| 14 | + <br/>• <a href="/releases/latest">/releases/latest</a> |
| 15 | + <br/>• <a href="/releases/1.85.0">/releases/1.85.0</a> |
| 16 | + </p> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | +</header> |
| 20 | + |
| 21 | +{% set section = get_section(path="_index.md") -%} |
| 22 | +<section id="posts" class="posts"> |
| 23 | + <div class="w-100 mw-none ph3 mw8-m mw9-l center f3"> |
| 24 | + |
| 25 | + <table class="post-list collapse w-100 f2-l f2-m f3-s"> |
| 26 | + {%- set rev_pages = section.pages | reverse %} |
| 27 | + {%- for page in rev_pages %} |
| 28 | + {%- set num_comps = page.components | length %} |
| 29 | + {%- set year = page.components | nth(n=num_comps - 4) | int %} |
| 30 | + {%- set month = page.components | nth(n=num_comps - 3) | int %} |
| 31 | + {%- set day = page.components | nth(n=num_comps - 2) | int %} |
| 32 | + {%- if loop.index0 == 0 %} |
| 33 | + {{ macros::show_year(year=year, post_name="Releases") }} |
| 34 | + {%- endif %} |
| 35 | + |
| 36 | + {%- if page.extra is containing("release") %} |
| 37 | + {%- if loop.index0 != 0 %} |
| 38 | + {%- set prev_idx = loop.index0 - 1 %} |
| 39 | + {%- set prev_year = rev_pages[prev_idx].components | nth(n=num_comps - 4) | int %} |
| 40 | + {%- if prev_year != year %} |
| 41 | + {{ macros::show_year(year=year, post_name="Releases") }} |
| 42 | + {%- endif %} |
| 43 | + {%- endif %} |
| 44 | + {% if page.show_year %}<tr> |
| 45 | + <td class="bn"></td> |
| 46 | + <td class="bn"><h3 class="f0-l f1-m f2-s mt4 mb0">Posts in {{ year }}</h3></td> |
| 47 | + </tr>{% endif %} |
| 48 | + <tr> |
| 49 | + <td class="tr o-60 pr4 pr5-l bn">{{ macros::month_name(num=month) }} {{ day }}</td> |
| 50 | + <td class="bn"><a href="{{ config.base_url | safe }}{{ page.path | safe }}">{{ macros::escape_hbs(input=page.title) }}</a></td> |
| 51 | + </tr> |
| 52 | + {%- endif %} |
| 53 | + {%- endfor %} |
| 54 | + </table> |
| 55 | + </div> |
| 56 | +</section> |
| 57 | +{%- endblock page %} |
0 commit comments