Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/VincentTam/huginn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Berthault <justin.berthault@zaclys.net>2017-12-06 10:12:49 +0300
committerJustin Berthault <justin.berthault@zaclys.net>2017-12-06 10:12:49 +0300
commit5c20e0fad51a5300055ae34ee3607dd7c1a2853c (patch)
tree974fd1ae7818ce77ff6f7a2be942355f854fb450
parent3b8d21d72049a4246ff96bf348e0debaf5d03e2d (diff)
Trim white spaces in HTML + css tweak
- trim with {{- -}} - tags::before instead of plain # - remove Hashover, time for static comments rising
-rw-r--r--layouts/_default/baseof.html39
-rw-r--r--layouts/_default/list.html34
-rw-r--r--layouts/_default/single.html121
-rw-r--r--layouts/_default/terms.html5
-rw-r--r--layouts/index.html22
-rw-r--r--static/css/style.css3
6 files changed, 111 insertions, 113 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index e3ab1ed..6720e7f 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -4,54 +4,53 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
- {{ block "title" . }}
- {{ .Site.Title }}
- {{ end }}
+ {{- block "title" . -}}
+ {{- .Site.Title -}}
+ {{- end -}}
</title>
- {{ if .RSSLink }}
- <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
- <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
- {{ end }}
+ <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+ <link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
<link rel="stylesheet" href="/css/style.css" />
<link rel="stylesheet" href="/css/icomoon.min.css" />
- {{ block "css" . }}
+ {{- block "css" . -}}
{{ end }}
</head>
<body>
<aside>
- <a href="{{ .Site.BaseURL }}">
+ <a href="{{ .Site.BaseURL }}">
<img id="avatar" alt="Blog Avatar" src="{{ .Site.Params.avatar | relURL }}">
</a>
<div id="sitetitle">
<a href="{{ .Site.BaseURL }}">
- {{ .Site.Title }}
+ {{- .Site.Title -}}
</a>
</div>
<div id="sitesubtitle">
- {{ .Site.Params.Sitesubtitle }}
+ {{- .Site.Params.Sitesubtitle -}}
</div>
<div id="navlinks">
- {{ range .Site.Menus.main }}
+ {{- range .Site.Menus.main -}}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</div>
<div id="social">
- {{ range .Site.Menus.social }}
+ {{- range .Site.Menus.social -}}
<a href="{{ .URL }}"><i class="{{ .Name }}"></i></a>
- {{ end }}
+ {{- end -}}
<a href="{{ .Site.RSSLink }}"><i class="icon-rss"></i></a>
</div>
</aside>
<main>
- {{ block "main" . }}
- {{ end }}
+ {{- block "main" . -}}
+ {{- end -}}
<footer>
- {{ block "scripts" . }}
- {{ end }}
+ {{- block "scripts" . -}}
+ {{- end -}}
{{ with .Site.Params.footer }}
- {{ . | markdownify }}
- {{ end }}
+ {{- . | markdownify -}}
+ {{- end -}}
</footer>
</main>
</body>
+ </html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index f8f355a..579276a 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,39 +1,39 @@
{{ define "main" }}
<header>
<h1>
- <a href="{{ .Page.RSSLink }}"><i class="icon-rss"></i></a>{{ .Title }}
+ <a href="{{ .Page.RSSLink }}"><i class="icon-rss"></i></a>{{ .Title }}
</h1>
</header>
<ul>
- {{ range .Paginator.Pages }}
+ {{- range .Paginator.Pages -}}
<li>
<a href="{{ .Permalink }}">
- {{ .Date.Format "02/01/2006" }} - {{ .Title }}
+ {{- .Date.Format "02/01/2006" -}} - {{- .Title -}}
</a>
<div class="meta">
- {{ range .Params.categories }}
+ {{- range .Params.categories -}}
<a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">
- {{ . }}
+ {{- . -}}
</a>
- {{ end }}
- {{ range .Params.tags }}
- - <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
- #{{ . }}
+ {{- end -}}
+ {{- range .Params.tags -}}
+ <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
+ {{- . -}}
</a>
- {{ end }}
+ {{- end -}}
</div>
</li>
- {{ end }}
+ {{- end -}}
</ul>
<nav>
<p>
- {{if .Paginator.HasPrev }}
- <a href="{{ .Paginator.Prev.URL }}">&laquo; Previous</a> |
- {{ end }}
+ {{- if .Paginator.HasPrev -}}
+ <a href="{{ .Paginator.Prev.URL }}">&laquo; Previous</a>
+ {{- end -}}
<span>Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span>
- {{ if .Paginator.HasNext }}
- | <a href="{{ .Paginator.Next.URL }}">Next &raquo;</a>
- {{ end }}
+ {{- if .Paginator.HasNext -}}
+ <a href="{{ .Paginator.Next.URL }}">Next &raquo;</a>
+ {{- end -}}
</p>
</nav>
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index f66f223..605180d 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,77 +1,74 @@
-{{ define "css" }}
+{{- define "css" -}}
{{ if isset .Params "lightbox" }}
<link rel="stylesheet" href="/css/baguetteBox.min.css" />
{{ end }}
{{ if isset .Params "gallery" }}
<link rel="stylesheet" href="/css/baguetteBox.min.css" />
{{ end }}
-{{ end }}
-{{ define "title" }}
+{{- end -}}
+{{- define "title" -}}
{{ .Title }} – {{ .Site.Title }}
-{{ end }}
+{{- end -}}
{{ define "main" }}
-<article>
- <header>
- <h1>
- <a href="{{ .Permalink }}">
- {{ .Title }}
- </a>
- <time datetime="{{ .Date.Format "2006-01-02T15:04:05+01:00" }}">
- {{ .Date.Format "02/01/2006" }}
- </time>
- </h1>
- <div class="meta">
- {{ range .Params.categories }}
- <a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">
- {{ . }}
- </a>
- {{ end }}
- {{ range .Params.tags }}
- - <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
- #{{ . }}
- </a>
- {{ end }}
- </div>
- </header>
- {{ if .TableOfContents }}
- <details>
- <summary>Table des Matières</summary>
- {{ .TableOfContents }}
- </details>
- {{ end }}
- {{ with .Params.song }}
- <div class="nowlistening">
- {{ . | markdownify }}
- </div>
- {{ end }}
- {{ .Content }}
-</article>
- {{ $related := .Site.RegularPages.Related . | first 5 }}
-{{ with $related }}
-<h3>Billets en liens :</h3>
-<ul>
- {{ range . }}
- <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
- {{ end }}
-</ul>
-{{ end }}
- <script type="text/javascript" src="/hashover/hashover.js"></script>
- <noscript>Merci d'activer JavaScript pour voir les commentaires avec HashOver.</noscript>
-{{ end }}
-{{ define "scripts" }}
- <script src="{{ "js/jquery.min.js" | relURL}}"></script>
- {{ if isset .Params "lightbox" }}
- <script src="{{ "js/baguetteBox.min.js" | relURL}}"></script>
- <script>baguetteBox.run('a', {
+ <article>
+ <header>
+ <h1>
+ <a href="{{ .Permalink }}">
+ {{- .Title -}}
+ </a>
+ <time datetime="{{ .Date.Format "2006-01-02T15:04:05+01:00" }}">
+ {{- .Date.Format "02/01/2006" -}}
+ </time>
+ </h1>
+ <div class="meta">
+ {{ range .Params.categories }}
+ <a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">
+ {{- . -}}
+ </a>
+ {{- end -}}
+ {{ range .Params.tags }}
+ <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
+ {{- . -}}
+ </a>
+ {{- end -}}
+ </div>
+ </header>
+ {{ if .TableOfContents }}
+ <details>
+ <summary>Table des Matières</summary>
+ {{- .TableOfContents -}}
+ </details>
+ {{- end -}}
+ {{- with .Params.song -}}
+ <div class="nowlistening">
+ {{- . | markdownify -}}
+ </div>
+ {{- end -}}
+ {{- .Content -}}
+ </article>
+ {{ $related := .Site.RegularPages.Related . | first 5 }}
+ {{ with $related }}
+ <h3>Billets en liens :</h3>
+ <ul>
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ {{ end }}
+ {{- define "scripts" -}}
+ {{- if isset .Params "lightbox" -}}
+ <script src="{{ "js/baguetteBox.min.js" | relURL}}"></script>
+ <script>baguetteBox.run('a', {
captions: function(element) {
return element.getElementsByTagName('img')[0].alt;
}});</script>
- {{ end }}
- {{ if isset .Params "gallery" }}
- <script src="{{ "js/baguetteBox.min.js" | relURL}}"></script>
- <script>baguetteBox.run('.gallery', {
+ {{- end -}}
+ {{- if isset .Params "gallery" -}}
+ <script src="{{ "js/baguetteBox.min.js" | relURL}}"></script>
+ <script>baguetteBox.run('.gallery', {
captions: function(element) {
return element.getElementsByTagName('img')[0].alt;
}});</script>
- {{ end }}
+ {{- end -}}
{{ end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index acb0013..6c2638c 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,14 +1,13 @@
{{ define "main" }}
<header>
<h1>
- {{ .Title }}
+ {{- .Title -}}
</h1>
</header>
<div class="taxonomy">
{{ $data := .Data }}
- {{ range $key, $value := .Data.Terms }}
+ {{- range $key, $value := .Data.Terms -}}
<a class="label label-info" href="/{{ $data.Plural }}/{{ $key | urlize }}">{{ $key }} ({{ len $value }})</a>
{{ end }}
</div>
-
{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index cc29745..54e341d 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,31 +1,31 @@
{{ define "main" }}
-{{ range (.Paginator 5).Pages }}
+{{- range (.Paginator 5).Pages -}}
<article>
<header>
<h1>
<a href="{{ .Permalink }}">
- {{ .Title }}
+ {{- .Title -}}
</a>
<time datetime="{{ .Date.Format "1914-12-20" }}">
- {{ .Date.Format "02/01/2006" }}
+ {{- .Date.Format "02/01/2006" -}}
</time>
</h1>
<div class="meta">
- {{ range .Params.categories }}
+ {{- range .Params.categories -}}
<a class="categories" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">
- {{ . }}
+ {{- . -}}
</a>
- {{ end }}
- {{ range .Params.tags }}
- - <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
- #{{ . }}
+ {{- end -}}
+ {{- range .Params.tags -}}
+ <a class="tags" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
+ {{- . -}}
</a>
- {{ end }}
+ {{- end -}}
</div>
</header>
{{ .Summary }}
</article>
-{{ end }}
+{{- end -}}
<nav id="index">
<a href="{{ .Site.BaseURL }}post/">Voir le reste des billets</a>
</nav>
diff --git a/static/css/style.css b/static/css/style.css
index 292862a..cc0aa58 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -89,6 +89,9 @@ time {
color: #42b983;
margin-left: 0.6rem;
}
+.tags::before {
+ content: "#";
+}
footer {
margin: 4rem 0 1rem 0;
background: #2D3236;