[gimp-web/testing] Remove {{ SITEURL }} from templates



commit 2d67fbd7e550bc1270e6d5061f93ccba6cbf1ca7
Author: Michael Schumacher <schumaml gmx de>
Date:   Sun Nov 22 20:02:52 2015 +0100

    Remove {{ SITEURL }} from templates

 themes/newgimp/templates/archives.html        |    2 +-
 themes/newgimp/templates/article.html         |    6 +++---
 themes/newgimp/templates/authors.html         |    2 +-
 themes/newgimp/templates/base.html            |   18 +++++++++---------
 themes/newgimp/templates/categories.html      |    2 +-
 themes/newgimp/templates/draft-index.html     |    8 ++++----
 themes/newgimp/templates/home.html            |   10 +++++-----
 themes/newgimp/templates/index.html           |   22 +++++++++++-----------
 themes/newgimp/templates/page.html            |    4 ++--
 themes/newgimp/templates/pagination.html      |    4 ++--
 themes/newgimp/templates/period_archives.html |    2 +-
 themes/newgimp/templates/tags.html            |    2 +-
 themes/newgimp/templates/translations.html    |    2 +-
 13 files changed, 42 insertions(+), 42 deletions(-)
---
diff --git a/themes/newgimp/templates/archives.html b/themes/newgimp/templates/archives.html
index 050f268..b115f73 100644
--- a/themes/newgimp/templates/archives.html
+++ b/themes/newgimp/templates/archives.html
@@ -5,7 +5,7 @@
 <dl>
 {% for article in dates %}
     <dt>{{ article.locale_date }}</dt>
-    <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+    <dd><a href="/{{ article.url }}">{{ article.title }}</a></dd>
 {% endfor %}
 </dl>
 {% endblock %}
diff --git a/themes/newgimp/templates/article.html b/themes/newgimp/templates/article.html
index 6e2d8d8..c9d568a 100644
--- a/themes/newgimp/templates/article.html
+++ b/themes/newgimp/templates/article.html
@@ -16,7 +16,7 @@
     <meta name="tags" content="{{tag}}" />
   {% endfor %}
 
-    <link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/article.css" />
+    <link rel='stylesheet' type='text/css' href="/theme/css/article.css" />
 
 {% endblock head %}
 
@@ -29,7 +29,7 @@
                 {# <header> #}
 
                     <h2 class="entry-title">
-                      <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
+                      <a href="/{{ article.url }}" rel="bookmark"
                          title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
                  {% import 'translations.html' as translations with context %}
                  {{ translations.translations_for(article) }}
@@ -48,7 +48,7 @@
                     {% if article.authors %}
                     <address class="vcard author">
                       by {% for author in article.authors %}
-                          <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+                          <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
                         {% endfor %}
                     </address>
                     {% endif %}
diff --git a/themes/newgimp/templates/authors.html b/themes/newgimp/templates/authors.html
index 4914904..bd50af9 100644
--- a/themes/newgimp/templates/authors.html
+++ b/themes/newgimp/templates/authors.html
@@ -7,7 +7,7 @@
 
     <ul>
     {%- for author, articles in authors|sort %}
-        <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
+        <li><a href="/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
     {% endfor %}
     </ul>
 {% endblock %}
diff --git a/themes/newgimp/templates/base.html b/themes/newgimp/templates/base.html
index 064cc02..806ff94 100644
--- a/themes/newgimp/templates/base.html
+++ b/themes/newgimp/templates/base.html
@@ -7,10 +7,10 @@
         <meta name="viewport" content="width=device-width, initial-scale=1" />
         <link rel="icon" href="/images/wilber16.png" type="image/png" />
         {# SITEURL gets odd when using i18n, using better paths just below
-        <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/normalize.css" />
-        <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/grid.css" />
-        <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/gimp.css" />
-        <link rel="stylesheet" type="text/css" href="{{ SITEURL 
}}/theme/css/font-awesome-4.4.0/css/font-awesome.min.css" />
+        <link rel="stylesheet" type="text/css" href="/theme/css/normalize.css" />
+        <link rel="stylesheet" type="text/css" href="/theme/css/grid.css" />
+        <link rel="stylesheet" type="text/css" href="/theme/css/gimp.css" />
+        <link rel="stylesheet" type="text/css" href="/theme/css/font-awesome-4.4.0/css/font-awesome.min.css" 
/>
         #}
         <link rel="stylesheet" type="text/css" href="/theme/css/normalize.css" />
         <link rel="stylesheet" type="text/css" href="/theme/css/grid.css" />
@@ -58,18 +58,18 @@
             {% if DISPLAY_PAGES_ON_MENU %}
               {% for p in PAGES %}
                 {% if p.parents|length == 1 %}
-                  <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ 
p.title }}</a></li>
+                  <li{% if p == page %} class="active"{% endif %}><a href="/{{ p.url }}">{{ p.title 
}}</a></li>
                 {% endif %}
                 {# The old way...
                   {% if not p.parent %}
-                    <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ 
p.title }}</a></li>
+                    <li{% if p == page %} class="active"{% endif %}><a href="/{{ p.url }}">{{ p.title 
}}</a></li>
                   {% endif %}
                 #}
               {% endfor %}
             {% else %}
               {% if DISPLAY_CATEGORIES_ON_MENU %}
                 {% for cat, null in categories %}
-                  <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url 
}}">{{ cat }}</a></li>
+                  <li{% if cat == category %} class="active"{% endif %}><a href="/{{ cat.url }}">{{ cat 
}}</a></li>
                 {% endfor %}
               {% endif %}
             {% endif %}
@@ -145,7 +145,7 @@
 
                           {% for p in PAGES %}
                             {% if p.parents|length == 1 %}
-                              <li{% if p == page %} class="active"{% endif %} class="page-on-menu"><a 
href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
+                              <li{% if p == page %} class="active"{% endif %} class="page-on-menu"><a 
href="/{{ p.url }}">{{ p.title }}</a></li>
                             {% endif %}
                           {% endfor %}
 
@@ -153,7 +153,7 @@
 
                           {% if DISPLAY_CATEGORIES_ON_MENU %}
                             {% for cat, null in categories %}
-                              <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL 
}}/{{ cat.url }}">{{ cat }}</a></li>
+                              <li{% if cat == category %} class="active"{% endif %}><a href="/{{ cat.url 
}}">{{ cat }}</a></li>
                             {% endfor %}
                           {% endif %}
 
diff --git a/themes/newgimp/templates/categories.html b/themes/newgimp/templates/categories.html
index e29be0c..55b1453 100644
--- a/themes/newgimp/templates/categories.html
+++ b/themes/newgimp/templates/categories.html
@@ -2,7 +2,7 @@
 {% block content %}
 <ul>
 {% for category, articles in categories %}
-    <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
+    <li><a href="/{{ category.url }}">{{ category }}</a></li>
 {% endfor %}
 </ul>
 {% endblock %}
diff --git a/themes/newgimp/templates/draft-index.html b/themes/newgimp/templates/draft-index.html
index 76b1684..7b160bd 100644
--- a/themes/newgimp/templates/draft-index.html
+++ b/themes/newgimp/templates/draft-index.html
@@ -14,7 +14,7 @@
     <meta name="tags" content="{{tag}}" />
   {% endfor %}
 
-    <link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/article.css" />
+    <link rel='stylesheet' type='text/css' href="/theme/css/article.css" />
 
 {% endblock head %}
 
@@ -27,7 +27,7 @@
                 {# <header> #}
 
                     <h2 class="entry-title">
-                      <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
+                      <a href="/{{ article.url }}" rel="bookmark"
                          title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
                  {% import 'translations.html' as translations with context %}
                  {{ translations.translations_for(article) }}
@@ -46,7 +46,7 @@
                     {% if article.authors %}
                     <address class="vcard author">
                       by {% for author in article.authors %}
-                          <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+                          <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
                         {% endfor %}
                     </address>
                     {% endif %}
@@ -72,7 +72,7 @@
                           Testing all_articles...<br/>
                           <ul>
                           {% for article in all_articles %}
-                          <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.url }}</a></li>
+                          <li><a href="/{{ article.url }}">{{ article.url }}</a></li>
                           {% endfor %}
                           </ul>
                       </p>
diff --git a/themes/newgimp/templates/home.html b/themes/newgimp/templates/home.html
index c340d64..2ca3411 100644
--- a/themes/newgimp/templates/home.html
+++ b/themes/newgimp/templates/home.html
@@ -16,9 +16,9 @@
 
                     <img id='WilberLogo' src="/theme/images/wilber-big.png" alt="GIMP Wilber" width='200' 
height='150'/>
                     <h1>
-                        <a href="{{ SITEURL }}/">GIMP</a>
-                        {#<a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a> #}
-                        {# <a href="{{ SITEURL }}/"><img src="{{ SITEURL }}/theme/images/wilber-big.png" 
alt="GIMP Wilber"/>{{ SITENAME }}</a> #}
+                        <a href="/">GIMP</a>
+                        {#<a href="/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a> #}
+                        {# <a href="/"><img src="/theme/images/wilber-big.png" alt="GIMP Wilber"/>{{ 
SITENAME }}</a> #}
                     </h1>
                     <div class='introInfo'>
                         <span id='gFirst'>GNU IMAGE</span>
@@ -277,12 +277,12 @@
         <ol id="post-list">
         {% for article in articles_page.object_list %}
                 <li><article class="hentry">
-                        <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" 
rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
+                        <header> <h2 class="entry-title"><a href="/{{ article.url }}" rel="bookmark" 
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
                         <footer class="post-info">
                             <abbr class="published" title="{{ article.date.isoformat() }}"> {{ 
article.locale_date }} </abbr>
                             <address class="vcard author">By
                             {% for author in article.authors %}
-                                <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+                                <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
                             {% endfor %}
                             </address>
                         </footer><!-- /.post-info -->
diff --git a/themes/newgimp/templates/index.html b/themes/newgimp/templates/index.html
index 4caeed7..9c85b19 100644
--- a/themes/newgimp/templates/index.html
+++ b/themes/newgimp/templates/index.html
@@ -4,8 +4,8 @@
 
 {% block head %}
 {{ super() }}
-<link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/page.css" />
-<link rel='stylesheet' type='text/css' href="{{ SITEURL }}/theme/css/news-index.css" />
+<link rel='stylesheet' type='text/css' href="/theme/css/page.css" />
+<link rel='stylesheet' type='text/css' href="/theme/css/news-index.css" />
 {% endblock head %}
 
 
@@ -15,11 +15,11 @@
             <div class="container">
                 <div class="intro row">
 
-                    <img id='WilberLogo' src="{{ SITEURL }}/theme/images/wilber-big.png" alt="GIMP Wilber" 
width='200' height='150'/>
+                    <img id='WilberLogo' src="/theme/images/wilber-big.png" alt="GIMP Wilber" width='200' 
height='150'/>
                     <h1>
-                        <a href="{{ SITEURL }}/">GIMP</a>
-                        {#<a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a> #}
-                        {# <a href="{{ SITEURL }}/"><img src="{{ SITEURL }}/theme/images/wilber-big.png" 
alt="GIMP Wilber"/>{{ SITENAME }}</a> #}
+                        <a href="/">GIMP</a>
+                        {#<a href="/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a> #}
+                        {# <a href="/"><img src="/theme/images/wilber-big.png" alt="GIMP Wilber"/>{{ 
SITENAME }}</a> #}
 
 {#
                     </h1>
@@ -128,7 +128,7 @@
 
                     <div class="column full">
                         <h3 class="entry-title">
-                            <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ 
article.title|striptags }}">
+                            <a href="/{{ article.url }}" rel="bookmark" title="Permalink to {{ 
article.title|striptags }}">
                                 {{ article.title }}
                             </a>
                         </h3>
@@ -139,7 +139,7 @@
                             {# Suppressing the author info - they're all Wilber for now!
                             <address class="vcard author">By
                                 {% for author in article.authors %}
-                                    <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+                                    <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
                                 {% endfor %}
                             </address>
                             #}
@@ -152,7 +152,7 @@
 
                         {#
                         <div class='entry-more'>
-                            <a href="{{ SITEURL }}/{{ article.url }}" rel='bookmark' title='Permalink to {{ 
article.title|striptags }}'>
+                            <a href="/{{ article.url }}" rel='bookmark' title='Permalink to {{ 
article.title|striptags }}'>
                                 More &raquo;
                             </a>
                         </div>
@@ -173,12 +173,12 @@
         <ol id="post-list">
         {% for article in articles_page.object_list %}
                 <li><article class="hentry">
-                        <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" 
rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
+                        <header> <h2 class="entry-title"><a href="/{{ article.url }}" rel="bookmark" 
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
                         <footer class="post-info">
                             <abbr class="published" title="{{ article.date.isoformat() }}"> {{ 
article.locale_date }} </abbr>
                             <address class="vcard author">By
                             {% for author in article.authors %}
-                                <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
+                                <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
                             {% endfor %}
                             </address>
                         </footer><!-- /.post-info -->
diff --git a/themes/newgimp/templates/page.html b/themes/newgimp/templates/page.html
index 7da159f..387c10f 100644
--- a/themes/newgimp/templates/page.html
+++ b/themes/newgimp/templates/page.html
@@ -59,14 +59,14 @@
             <li>page.parents.length: {{ page.parents|length }}</li>
             {% for parent in page.parents %}
             <li>url: {{ parent.url }} - title: {{ parent.title }}<br/>
-                <a href="{{ SITEURL }}/{{ parent.url }}">{{ parent.title }}</a></li>
+                <a href="/{{ parent.url }}">{{ parent.title }}</a></li>
             {% endfor %}
         </ul>
         <p>page children</p>
         <ul>
             {% for child in page.children %}
             <li>url: {{ child.url }} - title: {{ child.title }}<br/>
-                <a href="{{ SITEURL }}/{{ child.url }}">{{ child.title }}</a></li>
+                <a href="/{{ child.url }}">{{ child.title }}</a></li>
             {% endfor %}
         </ul>
         </div>
diff --git a/themes/newgimp/templates/pagination.html b/themes/newgimp/templates/pagination.html
index 4219a5c..cc61d5b 100644
--- a/themes/newgimp/templates/pagination.html
+++ b/themes/newgimp/templates/pagination.html
@@ -1,11 +1,11 @@
 {% if DEFAULT_PAGINATION %}
 <p class="paginator">
     {% if articles_page.has_previous() %}
-        <a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
+        <a href="/{{ articles_previous_page.url }}">&laquo;</a>
     {% endif %}
     Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
     {% if articles_page.has_next() %}
-        <a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
+        <a href="/{{ articles_next_page.url }}">&raquo;</a>
     {% endif %}
 </p>
 {% endif %}
diff --git a/themes/newgimp/templates/period_archives.html b/themes/newgimp/templates/period_archives.html
index d930dbb..3a47764 100644
--- a/themes/newgimp/templates/period_archives.html
+++ b/themes/newgimp/templates/period_archives.html
@@ -5,7 +5,7 @@
 <dl>
 {% for article in dates %}
     <dt>{{ article.locale_date }}</dt>
-    <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+    <dd><a href="/{{ article.url }}">{{ article.title }}</a></dd>
 {% endfor %}
 </dl>
 {% endblock %}
diff --git a/themes/newgimp/templates/tags.html b/themes/newgimp/templates/tags.html
index b5d1482..e1b1dce 100644
--- a/themes/newgimp/templates/tags.html
+++ b/themes/newgimp/templates/tags.html
@@ -5,6 +5,6 @@
 {% block content %}
     <h1>Tags for {{ SITENAME }}</h1>
     {%- for tag, articles in tags|sort %}
-        <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
+        <li><a href="/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
     {% endfor %}
 {% endblock %}
diff --git a/themes/newgimp/templates/translations.html b/themes/newgimp/templates/translations.html
index db8c372..5b9f75d 100644
--- a/themes/newgimp/templates/translations.html
+++ b/themes/newgimp/templates/translations.html
@@ -2,7 +2,7 @@
 {% if article.translations %}
 Translations: 
 {% for translation in article.translations %}
-<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
+<a href="/{{ translation.url }}">{{ translation.lang }}</a>
 {% endfor %}
 {% endif %}
 {% endmacro %}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]