aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hello@oscarnajera.com>2019-06-15 02:57:25 +0200
committerÓscar Nájera <hello@oscarnajera.com>2019-06-15 02:57:25 +0200
commite34ded01904b07456a48cf28f1a5a2d2d77a0be7 (patch)
tree91178a5580504a58bd5612c1448a3fac403f07e3
parentd1916e3b595abbb08d90a32f5c34f9cf64d38c9f (diff)
downloadhugo-minimalist-theme-e34ded01904b07456a48cf28f1a5a2d2d77a0be7.tar.gz
hugo-minimalist-theme-e34ded01904b07456a48cf28f1a5a2d2d77a0be7.tar.bz2
hugo-minimalist-theme-e34ded01904b07456a48cf28f1a5a2d2d77a0be7.zip
Simplifying parts of the themeHEADmaster
-rw-r--r--layouts/_default/baseof.html4
-rw-r--r--layouts/_default/single.html6
-rw-r--r--layouts/_default/summary.html14
-rw-r--r--layouts/index.html3
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/head.html8
-rw-r--r--layouts/partials/header.html27
7 files changed, 18 insertions, 46 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7f7c5ae..f5fb3d8 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -4,7 +4,11 @@
<body class="bg-near-white sans-serif"
style="background:url('{{ .Site.Params.coverImage | absURL }}') fixed;">
{{- partial "header.html" . -}}
+
+ <div id="content" class="fl w-75-ns bg-black-10">
{{- block "main" . }}{{- end }}
+ </div>
+
{{- partial "footer.html" . -}}
{{- block "footerfiles" . }}{{- end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index e28413d..6007308 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,10 +1,10 @@
{{ define "main" }}
<article>
- <div id="post-header-cover" class="w-100 vh-50 dt bg-center cover bg-black-30 pt4"
- {{ with .Params.coverimage }}
+ <div id="post-header-cover" class="bg-center cover bg-black-30"
+ {{ with .Params.cover }}
style="background-image:url({{ . }})"
{{ end }} >
- <header class="dt pa2 pa5-ns mw7 center post-header white">
+ <header class="dt pa2 mw6 center post-header white">
<h1 class="f1 lh-title">
{{ .Title }}</h1>
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index 379694c..20c8d9c 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -1,10 +1,10 @@
-<article class="bt bb b--black-10 mw7 center">
- <a href='{{ .Permalink }}' class="db pv4 ph3 black no-underline dim">
+<article class="ba br2 b--black-10 mw7 mh3-ns mv3 bg-near-white">
+ <a href='{{ .Permalink }}' class="db pa4-ns pa2 black no-underline dim ">
<header>
- <h1 class="f2 lh-title black-90 ">
+ <h1 class="f2 lh-title black-90">
{{ .Title }}
</h1>
- <div class="gray">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words </div>
+ <div class="gray">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words - {{ .ReadingTime }} min read</div>
</header>
<p class="f4 lh-copy black-80">
{{ .Summary }}
@@ -13,10 +13,10 @@
<nobr class="link">Continue reading →</nobr>
{{ with .Params.thumbnailImage }}
- <img src="{{ . }}" class="mt2 br2">
+ <img src="{{ . }}" class="mt2 br2 grow">
{{ else }}
- {{ if .Params.coverimage }}
- <img src="{{ .Params.coverimage }}" class="mt2 br2" />
+ {{ if .Params.cover }}
+ <img src="{{ .Params.cover }}" class="mt2 br2 grow" />
{{ end}}
{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index eb6d5c6..9b143c0 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,11 +1,8 @@
{{ define "main" }}
-<div id="content" class="bg-near-white pb2 pt4">
-
<!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
{{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
-</div>
{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index d4216d8..d437bde 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,4 +1,4 @@
-<footer id="footer" class="center pa2 bg-white-40">
+<footer id="footer" class="fl center pa2 bg-white-40">
<span class="db tc black-80">
&copy; {{ now.Format "2006" }} {{ with .Site.Params.footer.copyright }}{{ . | safeHTML }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ else }}{{ with .Site.Title }}{{ . }}{{ end }}{{ end }}{{ end }}. All Rights Reserved
</span>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2cb900d..adaa5ab 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -43,11 +43,3 @@
padding: 0.5em;}
</style>
-<script>
- function w3_open() {
- document.getElementById("sidebar").style.display = "block";
- }
- function w3_close() {
- document.getElementById("sidebar").style.display = "none";
- }
-</script>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 41bfd71..9b2aaab 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -4,11 +4,7 @@
{{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
{{ end }}
-<nav id="sidebar" class="w5-ns w-100 bg-gray vh-100 fixed z-2 overflow-auto dn" style="background-image:url('{{ .Site.Params.coverImage | absURL }}');">
- <a class="bg-black white link dim db pa3 tc pointer" onclick="w3_close()">
- Close &times;
- </a>
-
+<nav id="sidebar" class="fl w-25-ns bg-gray vh-100-ns">
<div class="tc pv4">
<a href="/#about" class="white link">
{{ with ($.Scratch.Get "authorPicture") }}
@@ -19,9 +15,9 @@
</h3>
</a>
</div>
- <ul class="list">
+ <ul class="list bd ba">
{{ range .Site.Menus.main }}
- <li class="pv2">
+ <li class="ma2 dib">
<a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
{{ .Pre }} {{ .Name }}</a>
</li>
@@ -46,20 +42,3 @@
</ul>
</nav>
-
-<nav class="fixed z-1 dt w-100 border-box pa2 bb b--black-30 bg-near-white">
-
- <a class="dtc dib v-mid dim " onclick="w3_open()">
- <i class="fa fa-lg fa-bars black"></i>
- </a>
-
- <a href="{{ "/" | relLangURL }}" class="dtc v-mid link dim tc">
- <div class="f4 dib black-80 b">{{ .Site.Title }}</div>
- </a>
-
- {{ with ($.Scratch.Get "authorPicture") }}
- <a href="/#about" class="dtc dim tr">
- <img class="dib v-mid dib w2 h2 br-100" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=90{{ end }}"/>
- </a>
- {{ end }}
-</nav>