| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 {% extends "templates/default" %} | |
| 2 | |
| 3 {% block body %} | |
| 4 <main class="main wrapper"> | |
| 5 <h1 class="h1 section ta-center"> | |
|
juliandoucette
2017/08/24 11:14:01
NIT: It seems confusing that an <h1> is a .section
ire
2017/08/28 14:54:49
I see what you mean, but if I move the class to a
juliandoucette
2017/09/12 13:21:54
See my comment in the latest Patchset.
| |
| 6 <img class="heading-icon" src="/img/png/logo-{{product_id}}.png" srcset="/im g/svg/logo-{{product_id}}.svg 2x" alt="{{ products[product_id].full_name+" Logo" | translate( product_id+"-logo-alt", "Image alt text") }}"> | |
| 7 | |
| 8 {{ products[product_id].full_name + " Help Center" | translate(product_id+"- help-home-title", "Page title") }} | |
| 9 </h1> | |
| 10 | |
| 11 {% set popular_topics = get_pages_metadata({ "product_id": product_id, "templa te": "article", "popular": "true" }) %} | |
| 12 {% if popular_topics %} | |
| 13 <section class="card {{product_id}}-card section"> | |
|
ire
2017/08/15 15:09:22
I could make this a macro if it's easier to read/u
| |
| 14 <h2 class="h4 card-heading"> | |
| 15 <img class="heading-icon" src="/img/png/popular-icon.png" srcset="/img/svg /popular-icon.svg 2x" alt="{{ "Popular Icon" | translate("popular-icon-alt", "Im age alt text") }}"> | |
| 16 | |
| 17 {{ "Popular Topics" | translate("popular-topics-title", "Section title") } } | |
| 18 </h2> | |
| 19 | |
| 20 <ul class="underlined-list row"> | |
| 21 {% for article in popular_topics %} | |
| 22 <li class="column one-half"> | |
| 23 <a href="{{article["page"]}}"> | |
| 24 {{ article.title | translate( get_page_slug( article["page"]) + "-titl e", "Article title") }} | |
| 25 </a> | |
| 26 </li> | |
| 27 {% endfor %} | |
| 28 </ul> | |
| 29 </section> | |
| 30 {% endif %} | |
| 31 | |
| 32 <div class="row"> | |
| 33 {% for category in products[product_id].help_categories %} | |
| 34 {% set articles = get_pages_metadata({ "product_id": product_id, "template": "article", "category": category.name }) %} | |
| 35 {% if articles and category.name != 'Popular Topics' %} | |
| 36 <section class="section column one-half"> | |
| 37 <h2 class="h4"> | |
| 38 <img class="heading-icon" src="/img/png/{{category.icon}}.png" srcset="/ img/svg/{{category.icon}}.svg 2x" alt="{{ category.name+" Icon" | translate(cate gory.icon+"-alt", "Image alt text") }}"> | |
| 39 | |
| 40 {{category.name | translate( category.slug + "-category-title", "Categor y title")}} | |
| 41 </h2> | |
| 42 | |
| 43 <ul class="underlined-list"> | |
| 44 {% for article in articles %} | |
| 45 <li> | |
| 46 <a href="{{article["page"]}}"> | |
| 47 {{ article.title | translate( get_page_slug( article["page"]) + "-ti tle", "Article title") }} | |
| 48 </a> | |
| 49 </li> | |
| 50 {% endfor %} | |
| 51 </ul> | |
| 52 </section> | |
| 53 {% endif %} | |
| 54 {% endfor %} | |
| 55 </div> | |
| 56 | |
| 57 </main> | |
| 58 {% endblock %} | |
| OLD | NEW |