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

github.com/calintat/minimal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalin Tataru <calintat@gmail.com>2019-10-10 19:06:02 +0300
committerCalin Tataru <calintat@gmail.com>2019-10-10 19:06:02 +0300
commita357477aaa6b6896766c72196b10c90cf17d09c6 (patch)
tree08de61b03416feb3fd0a6e8e38e0f4285c4c398c
parent2662c63c6c4d06b548f146941dcbf8081cb5d230 (diff)
Small changes to layouts
-rw-r--r--archetypes/default.md2
-rw-r--r--exampleSite/config.toml15
-rw-r--r--exampleSite/content/about/index.md11
-rw-r--r--exampleSite/content/project/project1.md2
-rw-r--r--exampleSite/content/project/project2.md2
-rw-r--r--exampleSite/content/project/project3.md2
-rw-r--r--exampleSite/content/project/project4.md2
-rw-r--r--layouts/404.html7
-rw-r--r--layouts/_default/list.html5
-rw-r--r--layouts/_default/single.html30
-rw-r--r--layouts/_default/terms.html5
-rw-r--r--layouts/index.html12
-rw-r--r--layouts/page/single.html11
-rw-r--r--layouts/partials/body-open.html4
-rw-r--r--layouts/partials/footer.html6
-rw-r--r--layouts/partials/head-open.html4
-rw-r--r--layouts/partials/header.html14
-rw-r--r--layouts/partials/js.html8
-rw-r--r--layouts/partials/list-item.html10
-rw-r--r--layouts/partials/paginator.html18
-rw-r--r--layouts/partials/tags.html3
-rw-r--r--layouts/post/single.html28
22 files changed, 92 insertions, 109 deletions
diff --git a/archetypes/default.md b/archetypes/default.md
index 8c7c756..a628182 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,5 +1,5 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
-date: {{ dateFormat "2006-01-02" .Date }}
+description: ""
draft: true
---
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 9f87860..c312afc 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -23,18 +23,23 @@ googleAnalytics = ""
weight = 1
[[menu.main]]
+ url = "/about/"
+ name = "About"
+ weight = 2
+
+[[menu.main]]
url = "/post/"
name = "Posts"
- weight = 2
+ weight = 3
[[menu.main]]
url = "/project/"
name = "Projects"
- weight = 3
+ weight = 4
-# Social icons to be shown on the right-hand side of the navigation bar
-# The "name" field should match the name of the icon to be used
-# The list of available icons can be found at http://fontawesome.io/icons/
+# Social icons to be shown on the right-hand side of the navigation bar.
+# The "name" field should match the name of the icon in Font Awesome.
+# The list of available icons can be found at http://fontawesome.io/icons.
[[menu.icon]]
url = "mailto:me@example.com"
diff --git a/exampleSite/content/about/index.md b/exampleSite/content/about/index.md
new file mode 100644
index 0000000..4d4898b
--- /dev/null
+++ b/exampleSite/content/about/index.md
@@ -0,0 +1,11 @@
+---
+title: About
+description: What is Hugo?
+---
+
+Hugo is a fast and modern static site generator written in Go, and designed to make website creation fun again.
+Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.
+
+Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including Netlify, Heroku, GoDaddy, DreamHost, GitHub Pages, GitLab Pages, Surge, Aerobatic, Firebase, Google Cloud Storage, Amazon S3, Rackspace, Azure, and CloudFront and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
+
+We think of Hugo as the ideal website creation tool with nearly instant build times, able to rebuild whenever a change is made.
diff --git a/exampleSite/content/project/project1.md b/exampleSite/content/project/project1.md
index 54d5138..2d7e1f9 100644
--- a/exampleSite/content/project/project1.md
+++ b/exampleSite/content/project/project1.md
@@ -1,7 +1,7 @@
---
title: "Project 1"
description: "Lorem ipsum dolor sit amet"
-repo: "#" # delete this line if you want blog-like posts for projects
+repo: "#" # delete this line if you want a blog-like page
tags: ["go", "golang", "hugo"]
weight: 1
draft: false
diff --git a/exampleSite/content/project/project2.md b/exampleSite/content/project/project2.md
index c62e896..e7a32e5 100644
--- a/exampleSite/content/project/project2.md
+++ b/exampleSite/content/project/project2.md
@@ -1,7 +1,7 @@
---
title: "Project 2"
description: "Consectetur adipiscing elit"
-repo: "#" # delete this line if you want blog-like posts for projects
+repo: "#" # delete this line if you want a blog-like page
tags: ["html", "css", "js"]
weight: 2
draft: false
diff --git a/exampleSite/content/project/project3.md b/exampleSite/content/project/project3.md
index 0eac5cd..2923e0b 100644
--- a/exampleSite/content/project/project3.md
+++ b/exampleSite/content/project/project3.md
@@ -1,7 +1,7 @@
---
title: "Project 3"
description: "Cras felis sapien"
-repo: "#" # delete this line if you want blog-like posts for projects
+repo: "#" # delete this line if you want a blog-like page
tags: ["bootstrap", "responsive"]
weight: 3
draft: false
diff --git a/exampleSite/content/project/project4.md b/exampleSite/content/project/project4.md
index 86b502d..89d3786 100644
--- a/exampleSite/content/project/project4.md
+++ b/exampleSite/content/project/project4.md
@@ -1,7 +1,7 @@
---
title: "Project 4"
description: "Pellentesque eu lacinia id"
-repo: "#" # delete this line if you want blog-like posts for projects
+repo: "#" # delete this line if you want a blog-like page
tags: ["highlight-js", "syntax-highlighting"]
weight: 4
draft: false
diff --git a/layouts/404.html b/layouts/404.html
index 11cef1c..8a686ff 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,15 +1,10 @@
{{ partial "header" . }}
<main>
-
<div class="intro">
-
<h1>¯\_(ツ)_/¯</h1>
-
- <h2>Page not found</h2>
-
+ <h2>Nothing here</h2>
</div>
-
</main>
{{ partial "footer" . }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 74f57fb..0596fc6 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -2,12 +2,13 @@
<main>
- <h2>{{ .Title }}</h2>
+ <div class="item">
+ <h2>{{ .Title }}</h2>
+ </div>
{{ range (.Paginator 5).Pages }} {{ partial "list-item" . }} {{ end }}
</main>
{{ partial "paginator" . }}
-
{{ partial "footer" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index cc4aa29..49a33bc 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,38 +2,14 @@
<main>
- {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subtitle" }}
- {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
-
<div class="item">
<h2>{{ .Title }}</h2>
- <h5>{{ $.Scratch.Get "subtitle" }}</h5>
- {{ range .Params.tags }}
- <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
- {{ end }}
+ <h5>{{ .Description }}</h5>
+ {{ partial "tags" . }}
</div>
<br> <div class="text-justify">{{ .Content }}</div>
- <!-- related posts with the same tags -->
- {{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
-
- {{ if $related }}
-
- <h4 class="page-header">Related</h4>
-
- {{ range $related }} {{ partial "list-item" . }} {{ end }}
-
- {{ end }}
-
- {{ if and .Site.DisqusShortname (not .Params.disableComments) }}
-
- <h4 class="page-header">Comments</h4>
-
- {{ template "_internal/disqus.html" . }}
-
- {{ end }}
-
</main>
-{{ partial "footer.html" . }}
+{{ partial "footer" . }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 74f57fb..0596fc6 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -2,12 +2,13 @@
<main>
- <h2>{{ .Title }}</h2>
+ <div class="item">
+ <h2>{{ .Title }}</h2>
+ </div>
{{ range (.Paginator 5).Pages }} {{ partial "list-item" . }} {{ end }}
</main>
{{ partial "paginator" . }}
-
{{ partial "footer" . }}
diff --git a/layouts/index.html b/layouts/index.html
index 75943a0..f94ba2d 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,22 +1,12 @@
{{ partial "header" . }}
<main>
-
<div class="intro">
-
{{ with .Site.Params.profilePic }} <img class="profile" src="{{ . }}"> {{ end }}
-
<h1>{{ .Site.Title }}</h1>
-
<h2>{{ markdownify .Site.Params.Description }}</h2>
-
- {{ with .Content }}
- <div class="homepage-content text-justify">
- {{ . }}
- </div>
- {{ end }}
+ {{ with .Content }} <div class="homepage-content text-justify">{{ . }}</div> {{ end }}
</div>
-
</main>
{{ partial "footer" . }}
diff --git a/layouts/page/single.html b/layouts/page/single.html
deleted file mode 100644
index 463fcf2..0000000
--- a/layouts/page/single.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{{ partial "header" . }}
-
-<main>
-
- <h2>{{ .Title }}</h2>
-
- <br> <div class="text-justify">{{ .Content }}</div>
-
-</main>
-
-{{ partial "footer.html" . }}
diff --git a/layouts/partials/body-open.html b/layouts/partials/body-open.html
index 11b798a..87b95b8 100644
--- a/layouts/partials/body-open.html
+++ b/layouts/partials/body-open.html
@@ -1,2 +1,2 @@
- <!-- Intentionally left empty. Override this partial in your website to insert code just after the
- opening <body> tag. For example, to install Google Analytics. --> \ No newline at end of file
+<!-- Intentionally left empty. Override this partial in your website to insert code
+just after the opening <body> tag. For example, to install Google Analytics. -->
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 8a0706f..07cead4 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,9 +1,7 @@
<footer>
-
- <p class="copyright text-muted">{{ .Site.Params.copyright | default "&copy; All rights reserved. Powered by [Hugo](https://gohugo.io) and [Minimal](https://github.com/calintat/minimal)" | markdownify }}</p>
-
+ <p class="copyright text-muted">{{ .Site.Params.copyright | default "&copy; All rights reserved. Powered by [Hugo](https://gohugo.io) and [Minimal](https://github.com/calintat/minimal)." | markdownify }}</p>
</footer>
-
+
</body>
</html>
diff --git a/layouts/partials/head-open.html b/layouts/partials/head-open.html
index 9828a89..d4fb2c2 100644
--- a/layouts/partials/head-open.html
+++ b/layouts/partials/head-open.html
@@ -1,2 +1,2 @@
- <!-- Intentionally left empty. Override this partial in your website to insert code just after the
- opening <head> tag. For example, to install Google Tag Manager. --> \ No newline at end of file
+<!-- Intentionally left empty. Override this partial in your website to insert code
+just after the opening <head> tag. For example, to install Google Tag Manager. -->
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 2172213..d5fd837 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -21,7 +21,6 @@
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
-
gtag('config', '{{ .Site.GoogleAnalytics }}');
</script>
{{ end }}
@@ -29,7 +28,7 @@
{{ if .Site.Params.MathJax | default true }}
<!-- adds MathJax support -->
<script type="text/javascript" async
- src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
+ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
{{ end }}
</head>
@@ -37,23 +36,16 @@
<body>
{{ partial "body-open" . }}
<nav class="navbar navbar-default navbar-fixed-top">
-
<div class="container">
-
<div class="navbar-header">
-
<a class="navbar-brand visible-xs" href="#">{{ .Title }}</a>
-
<button class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
-
</div>
-
<div class="collapse navbar-collapse">
-
{{ if .Site.Menus.main }}
<ul class="nav navbar-nav">
{{ range sort .Site.Menus.main }}
@@ -61,7 +53,6 @@
{{ end }}
</ul>
{{ end }}
-
{{ if .Site.Menus.icon }}
<ul class="nav navbar-nav navbar-right">
{{ range sort .Site.Menus.icon }}
@@ -69,9 +60,6 @@
{{ end }}
</ul>
{{ end }}
-
</div>
-
</div>
-
</nav>
diff --git a/layouts/partials/js.html b/layouts/partials/js.html
index 356b8e4..0495077 100644
--- a/layouts/partials/js.html
+++ b/layouts/partials/js.html
@@ -1,12 +1,10 @@
<!-- highlight.js -->
{{ if .Site.Params.highlight | default false }}
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
-
- {{ range .Site.Params.highlightLanguages }} <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script> {{ end }}
-
+ {{ range .Site.Params.highlightLanguages }}
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script>
+ {{ end }}
<script>hljs.initHighlightingOnLoad();</script>
-
{{ end }}
<!-- custom -->
diff --git a/layouts/partials/list-item.html b/layouts/partials/list-item.html
index e6a2106..1b6fc95 100644
--- a/layouts/partials/list-item.html
+++ b/layouts/partials/list-item.html
@@ -13,13 +13,11 @@
{{ end }}
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
- {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subtitle" }}
- {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
+ {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subheader" }}
+ {{ with .Description }} {{ $.Scratch.Set "subheader" . }} {{ end }}
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
- <h5>{{ $.Scratch.Get "subtitle" }}</h5>
- {{ range .Params.tags }}
- <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
- {{ end }}
+ <h5>{{ $.Scratch.Get "subheader" }}</h5>
+ {{ partial "tags" . }}
</div>
diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html
index d6128f4..24444d2 100644
--- a/layouts/partials/paginator.html
+++ b/layouts/partials/paginator.html
@@ -3,15 +3,17 @@
<div class="pages">
{{ if .Paginator.HasPrev }}
- <a class="icon pages-icon" href="{{ .Paginator.Prev.URL }}" rel="prev">
- <i class="fa fa-arrow-left"></i>
- </a>
- {{ end }} {{ if .Paginator.HasNext }}
- <a class="icon pages-icon" href="{{ .Paginator.Next.URL }}" rel="next">
- <i class="fa fa-arrow-right"></i>
- </a>
+ <a class="icon pages-icon" href="{{ .Paginator.Prev.URL }}" rel="prev">
+ <i class="fa fa-arrow-left"></i>
+ </a>
+ {{ end }}
+
+ {{ if .Paginator.HasNext }}
+ <a class="icon pages-icon" href="{{ .Paginator.Next.URL }}" rel="next">
+ <i class="fa fa-arrow-right"></i>
+ </a>
{{ end }}
</div>
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
new file mode 100644
index 0000000..e6a91d5
--- /dev/null
+++ b/layouts/partials/tags.html
@@ -0,0 +1,3 @@
+{{ range .Params.tags }}
+<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
+{{ end }}
diff --git a/layouts/post/single.html b/layouts/post/single.html
new file mode 100644
index 0000000..8cbaa72
--- /dev/null
+++ b/layouts/post/single.html
@@ -0,0 +1,28 @@
+{{ partial "header" . }}
+
+<main>
+
+ <div class="item">
+ <h2>{{ .Title }}</h2>
+ <h5>{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") }}</h5>
+ {{ partial "tags" . }}
+ </div>
+
+ <br> <div class="text-justify">{{ .Content }}</div>
+
+ <!-- Related posts -->
+ {{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
+ {{ if $related }}
+ <h4 class="page-header">Related</h4>
+ {{ range $related }} {{ partial "list-item" . }} {{ end }}
+ {{ end }}
+
+ <!-- Disquis comments -->
+ {{ if and .Site.DisqusShortname (not .Params.disableComments) }}
+ <h4 class="page-header">Comments</h4>
+ {{ template "_internal/disqus.html" . }}
+ {{ end }}
+
+</main>
+
+{{ partial "footer" . }}