From f61467a7eb8be21d17d592bc7693da34f6a441e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Sko=C5=99epa?= <jakub@skorepa.info>
Date: Tue, 8 Mar 2016 00:34:35 +0100
Subject: [PATCH] Remove theme from gitignore & add .html to imports

Also change extension from verbose nunjucks to just nunj
---
 .gitignore                                           |  1 -
 theme/templates/{404.html.nunjucks => 404.html.nunj} |  0
 .../{article.html.nunjucks => article.html.nunj}     |  4 ++--
 theme/templates/gallery.html.nunjucks                |  3 ---
 .../{footer.html.nunjucks => footer.html.nunj}       |  0
 .../{header.html.nunjucks => header.html.nunj}       |  5 ++---
 .../partials/{list.html.nunjucks => list.html.nunj}  | 12 ++++++------
 .../{paginator.html.nunjucks => paginator.html.nunj} |  5 ++---
 .../{search.html.nunjucks => search.html.nunj}       |  0
 .../partials/{svgs.html.nunjucks => svgs.html.nunj}  |  0
 .../{redirect.html.nunjucks => redirect.html.nunj}   |  0
 theme/templates/tag.html.nunj                        |  3 +++
 theme/templates/tag.html.nunjucks                    |  3 ---
 13 files changed, 15 insertions(+), 21 deletions(-)
 rename theme/templates/{404.html.nunjucks => 404.html.nunj} (100%)
 rename theme/templates/{article.html.nunjucks => article.html.nunj} (93%)
 delete mode 100644 theme/templates/gallery.html.nunjucks
 rename theme/templates/partials/{footer.html.nunjucks => footer.html.nunj} (100%)
 rename theme/templates/partials/{header.html.nunjucks => header.html.nunj} (98%)
 rename theme/templates/partials/{list.html.nunjucks => list.html.nunj} (96%)
 rename theme/templates/partials/{paginator.html.nunjucks => paginator.html.nunj} (96%)
 rename theme/templates/partials/{search.html.nunjucks => search.html.nunj} (100%)
 rename theme/templates/partials/{svgs.html.nunjucks => svgs.html.nunj} (100%)
 rename theme/templates/{redirect.html.nunjucks => redirect.html.nunj} (100%)
 create mode 100644 theme/templates/tag.html.nunj
 delete mode 100644 theme/templates/tag.html.nunjucks

diff --git a/.gitignore b/.gitignore
index c09a9cb..36bea9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,5 @@ coverage
 build
 build-debug
 content
-theme
 static
 .buildconfig
diff --git a/theme/templates/404.html.nunjucks b/theme/templates/404.html.nunj
similarity index 100%
rename from theme/templates/404.html.nunjucks
rename to theme/templates/404.html.nunj
diff --git a/theme/templates/article.html.nunjucks b/theme/templates/article.html.nunj
similarity index 93%
rename from theme/templates/article.html.nunjucks
rename to theme/templates/article.html.nunj
index 090aead..db1cf95 100644
--- a/theme/templates/article.html.nunjucks
+++ b/theme/templates/article.html.nunj
@@ -1,4 +1,4 @@
-{% include "partials/header" %}
+{% include "partials/header.html" %}
   <div class="section container" id="content">
     <div class="metadata">
       <h2 id="title">{{ metadata.title }}</h2>
@@ -30,4 +30,4 @@
       </p>
     </article>
   </div>
-{% include "partials/footer" %}
+{% include "partials/footer.html" %}
diff --git a/theme/templates/gallery.html.nunjucks b/theme/templates/gallery.html.nunjucks
deleted file mode 100644
index 8cea052..0000000
--- a/theme/templates/gallery.html.nunjucks
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ include "partials/header.html" }}
-  
-{{ include "partials/footer.html" }}
diff --git a/theme/templates/partials/footer.html.nunjucks b/theme/templates/partials/footer.html.nunj
similarity index 100%
rename from theme/templates/partials/footer.html.nunjucks
rename to theme/templates/partials/footer.html.nunj
diff --git a/theme/templates/partials/header.html.nunjucks b/theme/templates/partials/header.html.nunj
similarity index 98%
rename from theme/templates/partials/header.html.nunjucks
rename to theme/templates/partials/header.html.nunj
index 0c5b817..6c9d1a6 100644
--- a/theme/templates/partials/header.html.nunjucks
+++ b/theme/templates/partials/header.html.nunj
@@ -39,7 +39,7 @@
   {{ metadata.headerextra | safe }}
 </head>
 <body {{ "class=type-article" if type=="article" }}>
-  {% import "partials/svgs" as svgs %}
+  {% import "partials/svgs.html" as svgs %}
   <div id="all">
     <!-- Top nav -->
     <nav class="supernav" role="navigation" style="z-index:5;position:absolute;">
@@ -141,5 +141,4 @@
         </ul>
       </div>
     </nav>
-    {% include "partials/search" %}
-      
+    {% include "partials/search.html" %}
diff --git a/theme/templates/partials/list.html.nunjucks b/theme/templates/partials/list.html.nunj
similarity index 96%
rename from theme/templates/partials/list.html.nunjucks
rename to theme/templates/partials/list.html.nunj
index 8c4a2f7..350be36 100644
--- a/theme/templates/partials/list.html.nunjucks
+++ b/theme/templates/partials/list.html.nunj
@@ -1,4 +1,4 @@
-{% import "partials/svgs" as svgs %}
+{% import "partials/svgs.html" as svgs %}
   <div id=content class=container>
     <div class="section">
       <div class="row">
@@ -35,8 +35,8 @@
           </div>
         {% endfor %}
       </div>
-      
-      {% include "partials/paginator" %}
+
+      {% include "partials/paginator.html" %}
     </div>
 
     <div class="hide-on-small-only">
@@ -62,21 +62,21 @@
            if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
         });
         $(".head-perex").height(maxHeight);
-        
+
         $(".head-title").height("auto");
         maxHeight = 0;
         $(".head-title").each(function(){
            if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
         });
         $(".head-title").height(maxHeight);
-        
+
         $(".head-info").height("auto");
         maxHeight = 0;
         $(".head-info").each(function(){
            if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
         });
         $(".head-info").height(maxHeight);
-        
+
         // Sidelink icons of same size
         $(".sidelink-icon").css("top",$(window).height()/2);
       };
diff --git a/theme/templates/partials/paginator.html.nunjucks b/theme/templates/partials/paginator.html.nunj
similarity index 96%
rename from theme/templates/partials/paginator.html.nunjucks
rename to theme/templates/partials/paginator.html.nunj
index e2a618f..ab8dd69 100644
--- a/theme/templates/partials/paginator.html.nunjucks
+++ b/theme/templates/partials/paginator.html.nunj
@@ -1,4 +1,4 @@
-{% import "partials/svgs" as svgs %}
+{% import "partials/svgs.html" as svgs %}
 
 <ul class="pagination">
   <li><a {{ (" href=\""+config.baseurl +"/"+ metadata.firstpage.file +"\"") | safe if metadata.firstpage.file != file }}>
@@ -17,9 +17,8 @@
   <li><a {{ " href="+config.baseurl +"/"+ metadata.nextpage.file if metadata.nextpage != undefined }}>
     {{ svgs.chevronright( "#999" if metadata.nextpage == undefined else "#000", 1,"em" ) }}
   </a></li>
-  
+
   <li><a {{ (" href=\""+config.baseurl +"/"+ metadata.lastpage.file +"\"") | safe if metadata.lastpage.file != file }}>
     {{ svgs.doublechevronright( "#999" if metadata.lastpage.file == file else "#000", 1,"em" ) }}
   </a></li>
 </ul>
-
diff --git a/theme/templates/partials/search.html.nunjucks b/theme/templates/partials/search.html.nunj
similarity index 100%
rename from theme/templates/partials/search.html.nunjucks
rename to theme/templates/partials/search.html.nunj
diff --git a/theme/templates/partials/svgs.html.nunjucks b/theme/templates/partials/svgs.html.nunj
similarity index 100%
rename from theme/templates/partials/svgs.html.nunjucks
rename to theme/templates/partials/svgs.html.nunj
diff --git a/theme/templates/redirect.html.nunjucks b/theme/templates/redirect.html.nunj
similarity index 100%
rename from theme/templates/redirect.html.nunjucks
rename to theme/templates/redirect.html.nunj
diff --git a/theme/templates/tag.html.nunj b/theme/templates/tag.html.nunj
new file mode 100644
index 0000000..fb0913d
--- /dev/null
+++ b/theme/templates/tag.html.nunj
@@ -0,0 +1,3 @@
+{% include "partials/header.html" %}
+{% include "partials/list.html" %}
+{% include "partials/footer.html" %}
diff --git a/theme/templates/tag.html.nunjucks b/theme/templates/tag.html.nunjucks
deleted file mode 100644
index 7ec1cad..0000000
--- a/theme/templates/tag.html.nunjucks
+++ /dev/null
@@ -1,3 +0,0 @@
-{% include "partials/header" %}
-{% include "partials/list" %}
-{% include "partials/footer" %}
-- 
GitLab