Initial commit

This commit is contained in:
Vladimir Hodakov 2018-01-11 09:16:05 +04:00
commit db02c6922b
18 changed files with 10966 additions and 0 deletions

20
LICENSE Normal file
View File

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2018 Vladimir "fat0troll" Hodakov.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

7
archetypes/default.md Normal file
View File

@ -0,0 +1,7 @@
+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = true
tags = []
categories = []
+++

7
archetypes/posts.md Normal file
View File

@ -0,0 +1,7 @@
+++
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = true
tags = []
categories = []
+++

7
layouts/404.html Normal file
View File

@ -0,0 +1,7 @@
{{ define "main" }}
<section id="404">
<p>This is not the page you are looking for...</p>
</section>
{{ end }}

View File

@ -0,0 +1,6 @@
{{ partial "header" . }}
{{ block "main" . }}
{{ end }}
{{ partial "footer" . }}

View File

@ -0,0 +1,40 @@
{{ define "main" }}
{{ $baseurl := .Site.BaseURL }}
<div class="container">
<div class="columns">
<div class="column">
{{ if eq .Data.Singular "tag" }}
<h2 class="is-size-2">#{{ .Title | lower }}</h2>
{{ else }}
<h2 class="is-size-2">{{ .Title }}</h2>
{{ end }}
{{ .Content }}
<hr>
{{ range (.Paginate (.Data.Pages.GroupByDate "2006")).PageGroups }}
<h3 class="is-size-4">{{ .Key }}</h3>
{{ range .Pages }}
<article class="tile is-child">
<span class="is-size-2"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
{{ if .Params.tags }}
<div class="tags is-pulled-right">
{{ range $i, $t := .Params.tags }}
<span class="tag"><a href="/tags/{{$t | urlize }}/">#{{ $t }}</a></span>
{{ end }}
</div>
{{ end }}
</span>
{{ partial "aside" . }}
<hr>
</article>
{{ end }}
{{ end }}
</div>
</div>
</div>
{{ partial "pagination" . }}
{{ end }}

View File

@ -0,0 +1,10 @@
{{ define "main" }}
<div class="container">
<br>
{{ partial "article" . }}
{{ partial "single_footer" . }}
</div>
{{ end }}

38
layouts/index.html Normal file
View File

@ -0,0 +1,38 @@
{{ define "main" }}
<section class="section">
<div class="container">
<div class="tile is-ancestor">
<div class="tile is-vertical">
<div class="tile">
<div class="tile is-parent is-vertical">
{{ range $index, $page := first 10 (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
<article class="tile is-child">
<span class="is-size-2">
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
{{ if .Params.tags }}
<div class="tags is-pulled-right">
{{ range $i, $t := .Params.tags }}
<span class="tag">
<a href="/tags/{{$t | urlize }}/">#{{ $t }}</a>
</span>
{{ end }}
</div>
{{ end }}
</span>
{{ partial "aside" . }}
<br>
<p>{{ .Summary }}</p>
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">{{ .Site.Params.i18n_read_more }}</a>
{{ end }}
<hr>
</article>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</section>
{{ end }}

View File

@ -0,0 +1,16 @@
<article class="content">
<span class="is-size-2"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
{{ if .Params.tags }}
<div class="tags is-pulled-right">
{{ range $i, $t := .Params.tags }}
<span class="tag"><a href="/tags/{{$t | urlize }}/">#{{ $t }}</a></span>
{{ end }}
</div>
{{ end }}
</span>
{{ partial "aside" . }}
<hr>
{{.Content}}
</article>

View File

@ -0,0 +1,10 @@
<aside class="is-size-6">
<time class="post-date" datetime="{{ .Date.Format " 2006-01-02T15:04:05Z07:00 " | safeHTML }}">{{ .Date.Format "02.01.2006" }}</time>
{{ if .Params.categories }} | {{ .Site.Params.i18n_categories }}
<em>
{{ range $i, $c := .Params.categories }} {{ if $i }}, {{ end }}
<a href="/categories/{{$c | urlize }}/">{{ $c }}</a>
{{ end }}
</em>
{{ end }} | {{ .ReadingTime }} {{ .Site.Params.i18n_read_time }}
</aside>

View File

@ -0,0 +1,15 @@
</main>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<h6>{{ .Site.Copyright | markdownify }} | Rendered by
<a href="https://gohugo.io" title="Hugo">Hugo</a> |
<a href="{{.Site.BaseURL}}index.xml">Subscribe</a>
</h6>
</div>
</div>
</footer>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!doctype html>
<html lang="{{ .Site.LanguageCode | default " en-us " }}">
<head>
<title>{{ .Site.Title }}</title>
{{ partial "meta" . }} {{ partial "header_includes" . -}}
</head>
<body>
<div id="container">
<nav class="navbar is-dark is-active" role="navigation" aria-label="main navigation">
<div class="navbar-start">
<div class="navbar-brand">
<a class="navbar-item" href="{{ relURL " / " }}">{{ .Site.Title | markdownify }}</a>
</div>
</div>
<div class="navbar-end">
{{ range .Site.Menus.main }}
<a class="navbar-item" href="{{.URL}}">{{ .Name }}</a>
{{ end }}
</div>
</nav>
<main>

View File

@ -0,0 +1,3 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="{{ "css/bulma.css" | relURL}}" />

View File

@ -0,0 +1,5 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="{{ .Site.Params.description | default "The HTML5 Herald" }}" />
<meta name="author" content="{{ .Params.Author | default .Site.Author.name }}" />
{{ .Hugo.Generator -}}

View File

@ -0,0 +1,16 @@
{{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }}
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
<a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" class="pagination-previous" {{ if not $pag.HasPrev }}disabled{{
end }}>←</a>
<a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" class="pagination-next" {{ if not $pag.HasNext }}disabled{{ end
}}>→</a>
<ul class="pagination-list">
{{ range $pag.Pagers }}
<li>
<a href="{{ .URL }}" class="pagination-link {{ if eq . $pag }}is-current{{ end }}" {{ if eq . $pag }}aria-current="page"
{{ end }}>{{ .PageNumber }}</a>
</li>
{{ end }}
</ul>
</nav>
<br> {{ end }}

View File

@ -0,0 +1,10 @@
{{ if not .Params.meta }}
<div class="column">
{{ with .PrevInSection }}
<a class="button is-pulled-left" href="{{.Permalink}}">← {{ .Title }}</a>
{{ end }} {{ with .NextInSection }}
<a class="button is-pulled-right" href="{{.Permalink}}">{{ .Title }} -></a>
{{ end }}
</div>
{{ else }}
<br> {{ end }}

10719
static/css/bulma.css vendored Normal file

File diff suppressed because it is too large Load Diff

12
theme.toml Normal file
View File

@ -0,0 +1,12 @@
name = "Tango"
license = "MIT"
licenselink = "https://lab.pztrn.name/fat0troll/hugo-tango-theme/blob/master/LICENSE"
description = "Hugo Theme for creative and technical writing"
homepage = "https://lab.pztrn.name/fat0troll/hugo-tango-theme"
tags = ["blog","minimal","responsive"]
features = ["blog","font-awesome"]
min_version = "0.33"
[author]
name = "Vladimir Hodakov"
homepage = "https://blog.hodakov.me/"