commit 8461b98622cb2c1a38afaf4893db7f6e23984794
parent 46a62cacf2d02fc12aca9a901463b637584bdadb
Author: Oscar Benedito <oscar@obenedito.org>
Date:   Tue, 10 Sep 2019 14:03:44 +0200

Tabs to spaces

Diffstat:
Massets/js/toggle-theme.js | 32++++++++++++++++----------------
Mconfig.toml | 12++++++------
Mlayouts/_default/rss.xml | 12++++++------
Mlayouts/_default/single.html | 46+++++++++++++++++++++++-----------------------
Mlayouts/partials/hero-header.html | 16++++++++--------
Mlayouts/partials/main.html | 2+-
Mlayouts/taxonomy/taxonomy.html | 12++++++------
7 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/assets/js/toggle-theme.js b/assets/js/toggle-theme.js @@ -1,27 +1,27 @@ 'use strict'; function toggleTheme() { - if (localStorage && localStorage.getItem("theme") === "dark") { - localStorage.setItem("theme", "default"); - } else if (localStorage) { - localStorage.setItem("theme", "dark"); - } - setTheme(); + if (localStorage && localStorage.getItem("theme") === "dark") { + localStorage.setItem("theme", "default"); + } else if (localStorage) { + localStorage.setItem("theme", "dark"); + } + setTheme(); } function setTheme() { - if (localStorage) { - var light = localStorage.getItem("theme") === "default"; + if (localStorage) { + var light = localStorage.getItem("theme") === "default"; - document.getElementById("theme").setAttribute("href", "/" + (light ? "light" : "dark") + ".css"); - document.getElementById("nav-logo").setAttribute("src", "/img/logo-" + (light ? "white" : "grey") + ".svg"); + document.getElementById("theme").setAttribute("href", "/" + (light ? "light" : "dark") + ".css"); + document.getElementById("nav-logo").setAttribute("src", "/img/logo-" + (light ? "white" : "grey") + ".svg"); - var e = document.getElementsByClassName((light ? "has-text-grey" : "has-text-dark")); - for (var i = 0; i < e.length; i++) { - e[i].className = (light ? "has-text-dark" : "has-text-grey"); - } - } + var e = document.getElementsByClassName((light ? "has-text-grey" : "has-text-dark")); + for (var i = 0; i < e.length; i++) { + e[i].className = (light ? "has-text-dark" : "has-text-grey"); + } + } } if (localStorage && localStorage.getItem("theme") === "dark") { - setTheme(); + setTheme(); } diff --git a/config.toml b/config.toml @@ -6,16 +6,16 @@ paginate = 5 summaryLength = 15 [params] - blog_title = "Oscar's Blog" + blog_title = "Oscar's Blog" [taxonomies] - category = "categories" - tag = "tags" + category = "categories" + tag = "tags" [permalinks] blog = "/blog/:year/:month/:slug/" - categories = "/blog/categories/:slug/" - tags = "/blog/tags/:slug/" + categories = "/blog/categories/:slug/" + tags = "/blog/tags/:slug/" [frontmatter] - date = [":filename", ":default"] + date = [":filename", ":default"] diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml @@ -11,13 +11,13 @@ <title>{{ if .Title }}{{ if eq .Kind "taxonomy" }}{{ .Title | title }} on {{ .Site.Params.blog_title }}{{ else }}{{ .Title }}{{ end }}{{ else }}{{ .Site.Title }}{{ end }}</title> <link>{{ .Permalink }}</link> <description>Recent content in {{ if .Title }}{{ if eq .Kind "taxonomy" }}{{ .Title }} on {{ .Site.Params.blog_title }}{{ else }}{{ .Title }}{{ end }}{{ else }}{{ .Site.Title }}{{ end }}</description> - {{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}} - {{ with .Site.Author.email }}<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}} - {{ with .Site.Author.email }}<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}} - {{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}} - {{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}} + {{ with .Site.Author.email }}<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}} + {{ with .Site.Author.email }}<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}} + {{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}} + {{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{ with .OutputFormats.Get "RSS" }} - {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ end }} {{ range $pages }} <item> diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -1,37 +1,37 @@ {{ define "hero-header"}} <header class="hero is-primary"> - <div class="hero-body"> - <div class="section container has-text-centered"> - <h1 class="title is-1 has-text-centered">{{ .Site.Params.blog_title }}</h1> - <h2 class="subtitle is-4 has-text-centered">{{ .Params.categories | title }} entry</h2> - </div> - </div> + <div class="hero-body"> + <div class="section container has-text-centered"> + <h1 class="title is-1 has-text-centered">{{ .Site.Params.blog_title }}</h1> + <h2 class="subtitle is-4 has-text-centered">{{ .Params.categories | title }} entry</h2> + </div> + </div> </header> {{ end }} {{ define "main" }} <div class="container"> <div class="columns"> <div class="column is-8 is-offset-2"> - <h1 class="title">{{ .Title }}</h1> - <p class="has-text-grey is-size-6 subtitle">{{ with .Params.categories }}<a class="has-text-grey" href="{{ "blog/categories/" | relURL }}{{ . | urlize }}">{{ . | title }}</a> &middot; {{ end }}{{ .Date.Format "January 2, 2006" }}{{ if .Lastmod }} (last modified on {{ .Lastmod.Format "January 2, 2006" }}){{ end }}</p> + <h1 class="title">{{ .Title }}</h1> + <p class="has-text-grey is-size-6 subtitle">{{ with .Params.categories }}<a class="has-text-grey" href="{{ "blog/categories/" | relURL }}{{ . | urlize }}">{{ . | title }}</a> &middot; {{ end }}{{ .Date.Format "January 2, 2006" }}{{ if .Lastmod }} (last modified on {{ .Lastmod.Format "January 2, 2006" }}){{ end }}</p> - {{ .Content }} + {{ .Content }} - {{ if .Params.tags }} - <div class="tags"> - {{ range sort .Params.tags }}<a class="tag is-primary" href="{{ "blog/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>{{ end }} - </div> - {{ end }} + {{ if .Params.tags }} + <div class="tags"> + {{ range sort .Params.tags }}<a class="tag is-primary" href="{{ "blog/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>{{ end }} + </div> + {{ end }} - <hr> - {{ if .NextInSection }} - <a class="button" style="float: left;" href="{{ .NextInSection.RelPermalink }}" title="{{ .NextInSection.Title }}">&larr; Next Post</a> - {{ end }} + <hr> + {{ if .NextInSection }} + <a class="button" style="float: left;" href="{{ .NextInSection.RelPermalink }}" title="{{ .NextInSection.Title }}">&larr; Next Post</a> + {{ end }} {{ if .PrevInSection }} - <a class="button" style="float: right;" href="{{ .PrevInSection.RelPermalink }}" title="{{ .PrevInSection.Title }}">Previous Post &rarr;</a> - {{ end }} - <br/> - </div> - </div> + <a class="button" style="float: right;" href="{{ .PrevInSection.RelPermalink }}" title="{{ .PrevInSection.Title }}">Previous Post &rarr;</a> + {{ end }} + <br/> + </div> + </div> </div> {{ end }} diff --git a/layouts/partials/hero-header.html b/layouts/partials/hero-header.html @@ -1,10 +1,10 @@ <header class="hero is-primary"> - <div class="hero-body"> - <div class="section container has-text-centered"> - <h1 class="title is-1 has-text-centered">{{ .Title }}</h1> - {{ with .Params.subtitle }} - <h2 class="subtitle is-4 has-text-centered">{{ . }}</h2> - {{ end }} - </div> - </div> + <div class="hero-body"> + <div class="section container has-text-centered"> + <h1 class="title is-1 has-text-centered">{{ .Title }}</h1> + {{ with .Params.subtitle }} + <h2 class="subtitle is-4 has-text-centered">{{ . }}</h2> + {{ end }} + </div> + </div> </header> diff --git a/layouts/partials/main.html b/layouts/partials/main.html @@ -7,7 +7,7 @@ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <title>Oscar Benedito</title> <link rel="icon" href="/img/favicon.svg"> - {{- $style := resources.Get "landing.css" | resources.Minify }} + {{- $style := resources.Get "landing.css" | resources.Minify }} <link rel="stylesheet" href="{{ $style.Permalink }}"> </head> <body> diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html @@ -1,11 +1,11 @@ {{ define "hero-header"}} <header class="hero is-primary"> - <div class="hero-body"> - <div class="section container has-text-centered"> - <h1 class="title is-1 has-text-centered">{{ .Site.Params.blog_title }}</h1> - <h2 class="subtitle is-4 has-text-centered">{{ .Data.Singular | title }}: {{ .Title | title }}</h2> - </div> - </div> + <div class="hero-body"> + <div class="section container has-text-centered"> + <h1 class="title is-1 has-text-centered">{{ .Site.Params.blog_title }}</h1> + <h2 class="subtitle is-4 has-text-centered">{{ .Data.Singular | title }}: {{ .Title | title }}</h2> + </div> + </div> </header> {{ end }} {{ define "main" }}