Index: templates/default.tmpl |
diff --git a/templates/default.tmpl b/templates/default.tmpl |
index 27edc4ecd32d2deb852ef348178d91a70acc923b..76ee09350f610d64ef98c5ca626dd666bcba602b 100644 |
--- a/templates/default.tmpl |
+++ b/templates/default.tmpl |
@@ -1,3 +1,21 @@ |
+{# |
+ # This file is part of the Adblock Plus website, |
+ # Copyright (C) 2006-2015 Eyeo GmbH |
+ # |
+ # Adblock Plus is free software: you can redistribute it and/or modify |
+ # it under the terms of the GNU General Public License version 3 as |
+ # published by the Free Software Foundation. |
+ # |
+ # Adblock Plus is distributed in the hope that it will be useful, |
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of |
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
+ # GNU General Public License for more details. |
+ # |
+ # You should have received a copy of the GNU General Public License |
+ # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
+ #} |
+ |
+{% set index_page = (pagedata == "<? include index ?>\n") %} |
<!DOCTYPE html> |
<html lang="{{locale}}" dir="{{"rtl" if config.has_option("rtl", locale) else "ltr"}}" itemscope="itemscope" itemtype="http://schema.org/WebPage"> |
<head> |
@@ -12,7 +30,7 @@ |
<link rel="stylesheet" href="/css/noscript-mobile.css" media="screen and (max-width: 40.5em)"/> |
</noscript> |
- <link rel="canonical" href="https://adblockplus.org/{{page}}"> |
+ <link rel="canonical" href="https://adblockplus.org/{{page if not index_page}}"> |
Wladimir Palant
2015/02/24 20:19:40
No, we should have https://adblockplus.org/firefox
kzar
2015/02/26 19:50:17
Done.
|
<!--[if lt IE 7]> |
<script src="/js/vendor/DD_belatedPNG.js"></script> |
@@ -28,15 +46,17 @@ |
<link rel="stylesheet" href="/css/empty.css" class="cssfx"/> |
<![endif]--> |
+ {% block head %} |
{{head|safe}} |
+ {% endblock %} |
</head> |
<body> |
{% macro pageitem(name) %} |
{% if name == page %} |
- <li class="selected">{{"title"|translate(name)}}</li> |
+ <li class="selected">{{name|translate("menu")}}</li> |
{% else %} |
- <li>{{name|linkify}}{{"title"|translate(name)}}</a></li> |
+ <li>{{name|linkify}}{{name|translate("menu")}}</a></li> |
{% endif %} |
{% endmacro %} |
@@ -44,7 +64,7 @@ |
<a id="logo" class="sprite" itemprop="image" href="/"></a> |
<nav> |
<ul> |
- {% if localefile == "index" %} |
+ {% if index_page %} |
Wladimir Palant
2015/02/24 20:19:40
Where is that variable being defined?
kzar
2015/02/26 19:50:17
At the top of this page.
|
<li class="selected first">{{"installation"|translate("menu")}}</li> |
{% else %} |
<li class="install-link first">{{"index"|linkify}}{{"installation"|translate("menu")}} <span class="sprite install-link-icon"></span></a></li> |
@@ -82,7 +102,7 @@ |
</nav> |
</header> |
- <div id="content"> |
+ <div id="content" class="{{page}}"> |
Wladimir Palant
2015/02/24 20:19:40
Please remove that class tag - this can easily tur
kzar
2015/02/26 19:50:17
The current site adds a class like that to the div
Wladimir Palant
2015/02/26 20:35:03
I see. Setting this on the content tag is a limita
|
{% if not noheading %} |
<h1>{{title|translate}}</h1> |
{% endif %} |
@@ -107,7 +127,9 @@ |
{% endif %} |
{% endif %} |
+ {% block body %} |
{{body|safe}} |
+ {% endblock %} |
</div> |
<footer> |
@@ -116,7 +138,7 @@ |
<section class="first"> |
<h1>{{"resources"|translate("menu")}}</h1> |
<ul> |
- {% for name in ["screenshots", "documentation", "privacy", "impressum"] %} |
+ {% for name in ["acceptable-ads", "documentation", "deployments", "privacy", "impressum"] %} |
{{pageitem(name)}} |
{% endfor %} |
</ul> |
@@ -136,7 +158,6 @@ |
<h1>{{"development"|translate("menu")}}</h1> |
<ul> |
{{pageitem("source")}} |
- <li><a href="/forum/viewforum.php?f=11" hreflang="en">{{"bugs"|translate("menu")}}</a></li> |
<li><a href="/category/roadmap/" hreflang="en">{{"roadmap"|translate("menu")}}</a></li> |
{{pageitem("tools")}} |
</ul> |