Left: | ||
Right: |
OLD | NEW |
---|---|
1 {# | 1 {# |
2 # This file is part of the Adblock Plus website, | 2 # This file is part of the Adblock Plus website, |
3 # Copyright (C) 2006-2016 Eyeo GmbH | 3 # Copyright (C) 2006-2016 Eyeo GmbH |
4 # | 4 # |
5 # Adblock Plus is free software: you can redistribute it and/or modify | 5 # Adblock Plus is free software: you can redistribute it and/or modify |
6 # it under the terms of the GNU General Public License version 3 as | 6 # it under the terms of the GNU General Public License version 3 as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
8 # | 8 # |
9 # Adblock Plus is distributed in the hope that it will be useful, | 9 # Adblock Plus is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 # GNU General Public License for more details. | 12 # GNU General Public License for more details. |
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 #} | 16 #} |
17 | 17 |
18 {%- macro process_subscription(subscription, parent=None) %} | 18 {%- macro process_subscription(subscription, parent=None) %} |
19 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}> | 19 <li> |
20 {%- if parent and subscription["supplements"] %} | 20 <article class="subscription {% if subscription["deprecated"] %}deprecated{% endif %}"> |
21 <td rowspan="2" class="dummy"></td> | 21 <div class="subscription-content"> |
22 <td rowspan="2"> | 22 <div class="subscription-summary"> |
23 {%- else %} | 23 <h1>{{ subscription["name"] }}</h1> |
24 <td rowspan="2" colspan="2"> | 24 <p> |
25 {%- endif %} | 25 {{ "Specialization"|translate("specialization") }}: |
Thomas Greiner
2016/07/29 10:07:38
Coding style: "Newline at end of file, otherwise n
juliandoucette
2016/07/29 11:01:35
Done.
| |
26 <strong class="subscriptionTitle">{{ subscription["name"] }}</strong><br> | 26 {{ subscription["specialization"] }} |
27 {{ subscription["specialization"] }} | 27 </p> |
28 {%- if subscription["supplements"] %} | 28 {%- if subscription["supplements"] %} |
29 <br>{{ "supplement for"|translate("supplements_prefix") }} {{ ' / '.join(s ubscription["supplements"]) }} {{ " "|translate("supplements_suffix") }} | 29 <p> |
30 {%- endif %} | 30 {{ "supplement for"|translate("supplements_prefix") }} |
31 </td> | 31 {{ ' / '.join(subscription["supplements"]) }} |
32 <td> | 32 {{ " "|translate("supplements_suffix") }}. |
33 {%- if subscription["maintainer"] %} | 33 </p> |
34 {{ "by"|translate("maintainer_prefix") }} {{ subscription["maintainer"] }} {{ " "|translate("maintainer_suffix") }}<br> | 34 {%- endif %} |
35 {%- endif %} | 35 </div> |
36 {%- set is_first = True %} | 36 </div> |
37 {% for key, default in (('homepage', 'Homepage'), ('forum', 'Forum'), ('co ntact', 'Contact page'), ('faq', 'FAQ'), ('blog', 'Blog'), ('changelog', 'Change log'), ('policy', 'Policy')) -%} | 37 <footer class="subscription-details"> |
38 {%- set url = subscription[key] -%} | 38 <div class="subscription-authors"> |
39 {%- if url -%} | 39 {%- if subscription["maintainer"] %} |
40 {%- if not is_first %}, {% endif -%} | 40 <address> |
41 {%- set is_first = False -%} | 41 {{ "by"|translate("maintainer_prefix") }} |
42 <a href="{{ url }}">{{ default|translate(key) }}</a> | 42 {{ subscription["maintainer"] }} |
43 {%- endif %} | 43 {{ " "|translate("maintainer_suffix") }} |
44 {%- endfor %} | 44 </address> |
45 </td> | 45 {%- endif %} |
46 </tr> | 46 {%- set is_first = True %} |
47 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}> | 47 <p> |
48 <td> | 48 {% for key, default in (('homepage', 'Homepage'), ('forum', 'Forum'), ('contact', 'Contact page'), ('faq', 'FAQ'), ('blog', 'Blog'), ('changelog', 'Ch angelog'), ('policy', 'Policy')) -%} |
49 {%- if subscription["deprecated"] %} | 49 {%- set url = subscription[key] -%} |
50 <strong>{{ "Note: This list is not optimized for Adblock Plus and may slow down your browsing experience."|translate("deprecation_warning") }}</strong><br > | 50 {%- if url -%} |
51 {%- endif %} | 51 {%- if not is_first %}, {% endif -%} |
52 {{ "Subscribe:"|translate("subscribe") }}{{ ' ' }} | 52 {%- set is_first = False -%} |
53 {%- for title, url, complete in subscription["variants"] -%} | 53 <a href="{{ url }}">{{ default|translate(key) }}</a> |
54 <a href="abp:subscribe?location={{ url|urlencode }}&title={{ title|u rlencode }} | 54 {%- endif %} |
55 {%- if parent and not complete -%} | 55 {%- endfor %} |
56 {%- set main_title, main_url, main_complete = parent.variants[0] -%} | 56 </p> |
57 &requiresLocation={{ main_url|urlencode }}&requiresTitle={{ main_title|urlencode }} | 57 </div> |
58 {%- endif -%} | 58 <div class="subscription-links"> |
59 ">{{ title }}</a>{%- if not loop.last %}, {% endif -%} | 59 {%- if subscription["deprecated"] %} |
60 {%- endfor %} | 60 <p> |
61 </td> | 61 <strong>{{ "Note: This list is not optimized for Adblock Plus and ma y slow down your browsing experience."|translate("deprecation_warning") }}</stro ng> |
62 </tr> | 62 </p> |
63 {%- if not parent -%} | 63 {%- endif %} |
64 <p> | |
65 {{ "Subscribe:"|translate("subscribe") }}{{ ' ' }} | |
66 {%- for title, url, complete in subscription["variants"] -%} | |
67 <a href="abp:subscribe?location={{ url|urlencode }}&title={{ tit le|urlencode }} | |
68 {%- if parent and not complete -%} | |
69 {%- set main_title, main_url, main_complete = parent.variants[0] -%} | |
70 &requiresLocation={{ main_url|urlencode }}&requiresTitle ={{ main_title|urlencode }} | |
71 {%- endif -%} | |
72 ">{{ title }}</a>{%- if not loop.last %}, {% endif -%} | |
73 {%- endfor %} | |
74 </p> | |
75 </div> | |
76 </footer> | |
77 </article> | |
78 {%- if subscription["supplemented"] -%} | |
79 <ul class="supplemented-subscriptions-list"> | |
64 {%- for supplement in subscription["supplemented"]|subscription_sort -%} | 80 {%- for supplement in subscription["supplemented"]|subscription_sort -%} |
65 {{ process_subscription(supplement, subscription) }} | 81 {{ process_subscription(supplement, subscription) }} |
66 {%- endfor -%} | 82 {%- endfor -%} |
67 {%- endif -%} | 83 </ul> |
84 {%- endif -%} | |
85 </li> | |
68 {%- endmacro %} | 86 {%- endmacro %} |
69 | 87 |
70 {% macro display_subscriptions(subscriptions) %} | 88 {% macro display_subscriptions(subscriptions) %} |
71 {%- for subscription in subscriptions|subscription_sort -%} | 89 {%- for subscription in subscriptions|subscription_sort -%} |
72 {%- if not (subscription["supplements"] and current_type == subscription["ty pe"]) -%} | 90 {%- if not (subscription["supplements"] and current_type == subscription["ty pe"]) -%} |
73 {%- if current_type != subscription["type"] -%} | 91 {%- if current_type != subscription["type"] -%} |
74 {%- if current_type %} | 92 {%- if current_type %} |
75 </table> | 93 </ul> |
76 {%- endif -%} | 94 {%- endif -%} |
77 {%- set current_type = subscription["type"] %} | 95 {%- set current_type = subscription["type"] %} |
78 <h2 id="type_{{ current_type }}">{{ get_string("type_" + current_type, "subscr iptions") }}</h2> | 96 <h2 id="type_{{ current_type }}">{{ get_string("type_" + current_type, "subscr iptions") }}</h2> |
79 | 97 |
80 <table class="subscriptions"> | 98 <ul class="subscriptions-list"> |
81 {%- endif -%} | 99 {%- endif -%} |
82 {%- endif -%} | 100 {%- endif -%} |
83 {%- if subscription["type"] not in subscription["supplementsType"] -%} | 101 {%- if subscription["type"] not in subscription["supplementsType"] -%} |
84 {{ process_subscription(subscription) }} | 102 {{ process_subscription(subscription) }} |
85 {%- endif -%} | 103 {%- endif -%} |
86 {%- endfor %} | 104 {%- endfor %} |
87 </table> | 105 </ul> |
88 {% endmacro %} | 106 {% endmacro %} |
OLD | NEW |