Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: templates/product-home.tmpl

Issue 29516622: Issue 5511 - Create Product Help Home Template for help.eyeo.com (Closed) Base URL: https://hg.adblockplus.org/help.eyeo.com
Patch Set: Addressed final NITs Created Sept. 25, 2017, 7:24 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « templates/default.tmpl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 {% extends "templates/default" %}
2
3 {% set product = products[product_id] %}
4
5 {% block body %}
6 <main id="main" class="container">
7 <h1 class="product-heading">
8 <img class="heading-icon" src="/img/png/logo-{{ product_id }}.png" srcset="/ img/svg/logo-{{ product_id }}.svg 2x" alt="{{ product.full_name+" Logo" | transl ate( product_id+"-logo-alt", "Image alt text") }}">
9
10 {{ product.full_name + " Help Center" | translate(product_id+"-help-home-tit le", "Page title") }}
11 </h1>
12
13 {% set popular_topics = get_pages_metadata({ "product_id": product_id, "templa te": "article", "popular": "true" }) %}
14 {% if popular_topics %}
15 <section class="card {{ product_id }}-card section">
16 <h2 class="card-heading">
17 <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") }}">
18
19 {{ "Popular Topics" | translate("popular-topics-title", "Section title") } }
20 </h2>
21
22 <ul class="underlined-list row">
23 {% for article in popular_topics %}
24 <li class="column one-half">
25 <a href="{{ article["page"] }}">
26 {{ article.title | translate( get_page_name( article["page"]) + "-titl e", "Article title") }}
27 </a>
28 </li>
29 {% endfor %}
30 </ul>
31 </section>
32 {% endif %}
33
34 <div class="row">
35 {% for category in product.help_categories %}
36 {% set articles = get_pages_metadata({ "product_id": product_id, "template": "article", "category": category.name }) %}
37 {% if articles and category.name != 'Popular Topics' %}
38 <section class="section column one-half">
39 <h2 class="h4">
40 <img class="heading-icon" src="/img/png/{{ category.icon }}.png" srcset= "/img/svg/{{ category.icon }}.svg 2x" alt="{{ category.name+" Icon" | translate( category.icon+"-alt", "Image alt text") }}">
41
42 {{ category.name | translate( category.slug + "-category-title", "Catego ry title") }}
43 </h2>
44
45 <ul class="underlined-list">
46 {% for article in articles %}
47 <li>
48 <a href="{{ article["page"] }}">
49 {{ article.title | translate( get_page_name( article["page"]) + "-ti tle", "Article title") }}
50 </a>
51 </li>
52 {% endfor %}
53 </ul>
54 </section>
55 {% endif %}
56 {% endfor %}
57 </div>
58
59 </main>
60 {% endblock %}
OLDNEW
« no previous file with comments | « templates/default.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld