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

github.com/fiatjaf/classless-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2018-04-10 07:08:52 +0300
committerfiatjaf <fiatjaf@gmail.com>2018-04-10 07:11:58 +0300
commit7a73c70ba414d3926e8787c37bdc46f8adc595e1 (patch)
tree4a36bd71e81a689eb381c389beae5c6a5a4f2043
basic classless hugo theme.
-rw-r--r--archetypes/default.md6
-rw-r--r--layouts/404.html0
-rw-r--r--layouts/_default/baseof.html45
-rw-r--r--layouts/_default/index.html6
-rw-r--r--layouts/_default/list.html26
-rw-r--r--layouts/_default/single.html10
-rw-r--r--layouts/partials/article-header.html12
-rw-r--r--layouts/partials/aside.html2
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/tags/list.html23
-rw-r--r--theme.toml17
11 files changed, 149 insertions, 0 deletions
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..0b05d06
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,6 @@
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+cover: https://picsum.photos/1024/768
+tags: []
+---
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/404.html
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..ebd2efe
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,45 @@
+<!doctype html>
+
+<head>
+ <meta charset="utf-8">
+ <meta name="description" content="{{ block "description" . }}{{.Site.Params.description}}{{ end }}">
+ <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes">
+ <title>{{ block "title" . }}{{.Site.Title}}{{ end }}</title>
+ <link rel="stylesheet" href="https://cdn.rawgit.com/fiatjaf/classless/{{$.Param "commit_sha"}}/themes/{{$.Param "theme"}}/theme.css">
+</head>
+<body>
+ <header role="banner">
+ {{ if .Site.Params.cover }}
+ <a href="{{.Site.BaseURL}}"><img src="{{.Site.Params.cover}}"></a>
+ {{ end }}
+ <h1>
+ <a href="{{.Site.BaseURL}}">{{.Site.Title}}</a>
+ </h1>
+ <aside>
+ <p>{{.Site.Params.description}}</p>
+ </aside>
+ </header>
+ <nav>
+ <ul>
+ {{ range .Site.Menus.main }}
+ <li>
+ <a href="{{.URL}}">{{.Name}}</a>
+ </li>
+ {{ end }}
+ </ul>
+ </nav>
+ <main>
+ {{ block "main" . }}
+ {{ end }}
+ </main>
+ <aside>
+ {{ block "aside" . }}
+ {{ partial "aside.html" . }}
+ {{ end }}
+ </aside>
+ <footer role="contentinfo">
+ {{ block "footer" . }}
+ {{ partial "footer.html" . }}
+ {{ end }}
+ </footer>
+</body>
diff --git a/layouts/_default/index.html b/layouts/_default/index.html
new file mode 100644
index 0000000..7d633e0
--- /dev/null
+++ b/layouts/_default/index.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+<article>
+ {{ partial "article-header.html" . }}
+ <div>{{.Content}}</div>
+</article>
+{{ end }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..888ff4f
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,26 @@
+{{ define "title" }}{{.Title}} | {{.Site.Title}}{{ end }}
+
+{{ define "description" }}{{.Title}} on {{.Site.Title}}{{ end }}
+
+{{ define "main" }}
+<section>
+ {{ if .Content }}
+ <article>
+ {{ partial "article-header.html" . }}
+ <div>{{.Content}}</div>
+ </article>
+ {{ end }}
+ <ul>
+ {{ range .Data.Pages.ByDate }}
+ <li>
+ <article>
+ {{ partial "article-header.html" . }}
+ {{ if $.Site.Params.show_summaries}}
+ <div>{{.Summary}}</div>
+ {{ end }}
+ </article>
+ </li>
+ {{ end }}
+ </ul>
+</section>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..db66e71
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,10 @@
+{{ define "title" }}{{.Title}} | {{.Site.Title}}{{ end }}
+
+{{ define "description" }}{{.Summary}}{{ end }}
+
+{{ define "main" }}
+<article>
+ {{ partial "article-header.html" . }}
+ <div>{{.Content}}</div>
+</article>
+{{ end }}
diff --git a/layouts/partials/article-header.html b/layouts/partials/article-header.html
new file mode 100644
index 0000000..1039b6c
--- /dev/null
+++ b/layouts/partials/article-header.html
@@ -0,0 +1,12 @@
+<header>
+ {{ if .Params.cover }}<a href="{{.Permalink}}"><img src="{{.Params.cover}}"></a>{{ end }}
+ <h1><a href="{{.Permalink}}">{{.Title}}</a></h1>
+ {{ if not .Params.hide_date }}
+ <time datetime="{{.Date.Format "2006-01-02"}}">{{.Date.Format "Jan 2, 2006"}}</time>
+ {{ end }}
+ <ul>
+ {{ range .Params.tags }}
+ <li><a href="{{ "/tags/" | relURL }}{{. | urlize}}">{{.}}</a></li>
+ {{ end }}
+ </ul>
+</header>
diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html
new file mode 100644
index 0000000..47ae394
--- /dev/null
+++ b/layouts/partials/aside.html
@@ -0,0 +1,2 @@
+<p>This is an `aside`, a useful place to put information of any kind: metadata about the site author (with or without pictures), brief information about the purposes of the site, a static collection of external links or anything else.</p>
+<p>For some Classless themes pictures and data about the author may suit better in the `cover` and `description` site attributes (see `config.toml`), but most of the times that kind of information will fit here better.</p>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..2ded39a
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,2 @@
+<p>A default site footer. If you don't know what to place here maybe you should just write your name plus the current year?</p>
+<p>If you want to have a sitemap, a contact form or other complex stuff, most Classless themes will also handle it nicely. Or you can take a look at the <code>aside.html</code> partial.</p>
diff --git a/layouts/tags/list.html b/layouts/tags/list.html
new file mode 100644
index 0000000..e22bbc3
--- /dev/null
+++ b/layouts/tags/list.html
@@ -0,0 +1,23 @@
+{{ define "title" }}tag: {{.Data.Term}} | {{.Site.Title}}{{ end }}
+
+{{ define "description" }}Items tagged as '{{.Data.Term}}' on {{.Site.Title}}{{ end }}
+
+{{ define "main" }}
+<header>
+ <h1>{{.Title}}</h1>
+</header>
+<section>
+ <ul>
+ {{ range .Data.Pages.ByDate }}
+ <li>
+ <article>
+ {{ partial "article-header.html" . }}
+ {{ if $.Site.Params.show_summaries}}
+ <div>{{.Summary}}</div>
+ {{ end }}
+ </article>
+ </li>
+ {{ end }}
+ </ul>
+</section>
+{{ end }}
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..fa6ceed
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,17 @@
+name = "Classless"
+license = "MIT"
+licenselink = "https://github.com/fiatjaf/classless-hugo/blob/master/LICENSE.md"
+description = "The Classless templates and themes implemented in Hugo."
+homepage = "https://classless.alhur.es/"
+tags = ["blog", "personal"]
+features = ["multiple themes", "not extensible"]
+min_version = "0.38.2"
+
+[author]
+ name = "Giovanni T"
+ homepage = "https://fiatjaf.alhur.es/"
+
+[original]
+ name = "Classless"
+ homepage = "https://classless.alhur.es/"
+ repo = "https://github.com/fiatjaf/classless"