| 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 <span class="sr-only">{{ "Specialization"|translate("specialization" ) }}:</span> |
|
Thomas Greiner
2016/07/15 16:07:53
Detail: Not sure what "sr-only" means but it's not
juliandoucette
2016/07/19 22:29:17
My mistake.
"sr" stands for "screen reader".
I f
| |
| 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>{{ "supplement for"|translate("supplements_prefix") }} {{ ' / '.joi n(subscription["supplements"]) }} {{ " "|translate("supplements_suffix") }}.</p> |
|
Thomas Greiner
2016/07/15 16:07:53
Detail: Mind splitting this content (and the conte
juliandoucette
2016/07/19 22:29:16
Done.
| |
| 30 {%- endif %} | 30 {%- endif %} |
| 31 </td> | 31 </div> |
| 32 <td> | 32 </div> |
| 33 {%- if subscription["maintainer"] %} | 33 <footer class="subscription-details"> |
| 34 {{ "by"|translate("maintainer_prefix") }} {{ subscription["maintainer"] }} {{ " "|translate("maintainer_suffix") }}<br> | 34 <div class="subscription-authors"> |
|
Thomas Greiner
2016/07/15 16:07:53
Detail: Since you've decided to use `<footer>` for
juliandoucette
2016/07/19 22:29:16
Good idea.
| |
| 35 {%- endif %} | 35 {%- if subscription["maintainer"] %} |
| 36 {%- set is_first = True %} | 36 <p>{{ "by"|translate("maintainer_prefix") }} {{ subscription["maintain er"] }} {{ " "|translate("maintainer_suffix") }}</p> |
| 37 {% for key, default in (('homepage', 'Homepage'), ('forum', 'Forum'), ('co ntact', 'Contact page'), ('faq', 'FAQ'), ('blog', 'Blog'), ('changelog', 'Change log'), ('policy', 'Policy')) -%} | 37 {%- endif %} |
| 38 {%- set url = subscription[key] -%} | 38 {%- set is_first = True %} |
| 39 {%- if url -%} | 39 <p> |
| 40 {%- if not is_first %}, {% endif -%} | 40 {% for key, default in (('homepage', 'Homepage'), ('forum', 'Forum'), ('contact', 'Contact page'), ('faq', 'FAQ'), ('blog', 'Blog'), ('changelog', 'Ch angelog'), ('policy', 'Policy')) -%} |
| 41 {%- set is_first = False -%} | 41 {%- set url = subscription[key] -%} |
| 42 <a href="{{ url }}">{{ default|translate(key) }}</a> | 42 {%- if url -%} |
| 43 {%- endif %} | 43 {%- if not is_first %}, {% endif -%} |
| 44 {%- endfor %} | 44 {%- set is_first = False -%} |
| 45 </td> | 45 <a href="{{ url }}">{{ default|translate(key) }}</a> |
| 46 </tr> | 46 {%- endif %} |
| 47 <tr{% if subscription["deprecated"] %} class="deprecated"{% endif %}> | 47 {%- endfor %} |
| 48 <td> | 48 </p> |
| 49 {%- if subscription["deprecated"] %} | 49 </div> |
| 50 <strong>{{ "Note: This list is not optimized for Adblock Plus and may slow down your browsing experience."|translate("deprecation_warning") }}</strong><br > | 50 <div class="subscription-links"> |
| 51 {%- endif %} | 51 {%- if subscription["deprecated"] %} |
| 52 {{ "Subscribe:"|translate("subscribe") }}{{ ' ' }} | 52 <p><strong>{{ "Note: This list is not optimized for Adblock Plus and m ay slow down your browsing experience."|translate("deprecation_warning") }}</str ong></p> |
| 53 {%- for title, url, complete in subscription["variants"] -%} | 53 {%- endif %} |
| 54 <a href="abp:subscribe?location={{ url|urlencode }}&title={{ title|u rlencode }} | 54 <p> |
| 55 {%- if parent and not complete -%} | 55 {{ "Subscribe:"|translate("subscribe") }}{{ ' ' }} |
| 56 {%- set main_title, main_url, main_complete = parent.variants[0] -%} | 56 {%- for title, url, complete in subscription["variants"] -%} |
| 57 &requiresLocation={{ main_url|urlencode }}&requiresTitle={{ main_title|urlencode }} | 57 <a href="abp:subscribe?location={{ url|urlencode }}&title={{ tit le|urlencode }} |
| 58 {%- endif -%} | 58 {%- if parent and not complete -%} |
| 59 ">{{ title }}</a>{%- if not loop.last %}, {% endif -%} | 59 {%- set main_title, main_url, main_complete = parent.variants[0] -%} |
| 60 {%- endfor %} | 60 &requiresLocation={{ main_url|urlencode }}&requiresTitle ={{ main_title|urlencode }} |
| 61 </td> | 61 {%- endif -%} |
| 62 </tr> | 62 ">{{ title }}</a>{%- if not loop.last %}, {% endif -%} |
| 63 {%- if not parent -%} | 63 {%- endfor %} |
| 64 </p> | |
| 65 </div> | |
| 66 </footer> | |
| 67 </article> | |
| 68 {%- if subscription["supplemented"] -%} | |
| 69 <ul class="supplemented-subscriptions-list"> | |
| 64 {%- for supplement in subscription["supplemented"]|subscription_sort -%} | 70 {%- for supplement in subscription["supplemented"]|subscription_sort -%} |
| 65 {{ process_subscription(supplement, subscription) }} | 71 {{ process_subscription(supplement, subscription) }} |
| 66 {%- endfor -%} | 72 {%- endfor -%} |
| 67 {%- endif -%} | 73 </ul> |
| 74 {%- endif -%} | |
| 75 </li> | |
| 68 {%- endmacro %} | 76 {%- endmacro %} |
| 69 | 77 |
| 70 {% macro display_subscriptions(subscriptions) %} | 78 {% macro display_subscriptions(subscriptions) %} |
| 71 {%- for subscription in subscriptions|subscription_sort -%} | 79 {%- for subscription in subscriptions|subscription_sort -%} |
| 72 {%- if not (subscription["supplements"] and current_type == subscription["ty pe"]) -%} | 80 {%- if not (subscription["supplements"] and current_type == subscription["ty pe"]) -%} |
| 73 {%- if current_type != subscription["type"] -%} | 81 {%- if current_type != subscription["type"] -%} |
| 74 {%- if current_type %} | 82 {%- if current_type %} |
| 75 </table> | 83 </ul> |
| 76 {%- endif -%} | 84 {%- endif -%} |
| 77 {%- set current_type = subscription["type"] %} | 85 {%- set current_type = subscription["type"] %} |
| 78 <h2 id="type_{{ current_type }}">{{ get_string("type_" + current_type, "subscr iptions") }}</h2> | 86 <h2 id="type_{{ current_type }}">{{ get_string("type_" + current_type, "subscr iptions") }}</h2> |
| 79 | 87 |
| 80 <table class="subscriptions"> | 88 <ul class="subscriptions-list"> |
| 81 {%- endif -%} | 89 {%- endif -%} |
| 82 {%- endif -%} | 90 {%- endif -%} |
| 83 {%- if subscription["type"] not in subscription["supplementsType"] -%} | 91 {%- if subscription["type"] not in subscription["supplementsType"] -%} |
| 84 {{ process_subscription(subscription) }} | 92 {{ process_subscription(subscription) }} |
| 85 {%- endif -%} | 93 {%- endif -%} |
| 86 {%- endfor %} | 94 {%- endfor %} |
| 87 </table> | 95 </ul> |
| 88 {% endmacro %} | 96 {% endmacro %} |
| OLD | NEW |