Initial commit
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Nathan Day, TheJoKlLa
|
||||
|
||||
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.
|
152
README.md
Normal file
@ -0,0 +1,152 @@
|
||||
# min_night
|
||||
|
||||
Blogs are for reading and sharing. This theme tries to make both of those better.
|
||||
|
||||
`min_night` is built on top of [Minimal](https://github.com/calintat/minimal), and keeps a lot of the cool original features:
|
||||
|
||||
- Bootstrap
|
||||
- GoogleAnalytics
|
||||
- GoogleFonts
|
||||
- FontAwesome
|
||||
- HighlightJS
|
||||
|
||||
|
||||
It also gets a bunch of new add-ons:
|
||||
|
||||
- A night-mode toggle, with HTML5 storage to remember view preferences
|
||||
- OpenGraph and TwitterCard meta tags for upgrading your social sharing
|
||||
- Favicon support via the [RealFaviconGenerator](https://realfavicongenerator.net/)
|
||||
- A site logo for index.html (headshot, hexsticker...its up to you)
|
||||
- A tags/categories list page template from [Xmin](https://github.com/yihui/hugo-xmin)
|
||||
- Updated tag labels to hyperlinks (categories too)
|
||||
- Tweaked list templates for posts and projects
|
||||
|
||||
A live demo is available [here](https://natedayta.com).
|
||||
|
||||
## Installation
|
||||
|
||||
Installing Hugo themes as submodules is best.
|
||||
|
||||
This is how you can get starting with `min_night` using the [QuickStart tutorial](https://gohugo.io/getting-started/quick-start/). Run each line individually.
|
||||
|
||||
```bash
|
||||
hugo new site quick
|
||||
cd quick
|
||||
git init
|
||||
git submodule add https://github.com/nathancday/min_night.git themes/min_night
|
||||
cp -r themes/min_night/exampleSite/ .
|
||||
hugo server -D
|
||||
```
|
||||
|
||||
Now your brand new site is being served locally at `localhost:1313`.
|
||||
|
||||
Submodules are better because it makes updating the theme easier for future you.
|
||||
|
||||
```
|
||||
$ git submodule update --remote themes/min_night
|
||||
```
|
||||
|
||||
Personally I use this theme via the `R` package `blogdown`, and you can too, like this:
|
||||
|
||||
```
|
||||
library(blogdown)
|
||||
new_site(theme = "nathancday/min_night")
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
To configure most of the customizations in this theme all you need to do is edit the parameters in `quick/config.toml`.
|
||||
|
||||
### Colors
|
||||
|
||||
```toml
|
||||
[params]
|
||||
accent = "#006264"
|
||||
backgroundColor = "#f5f5f5"
|
||||
```
|
||||
|
||||
- `accent` changes the color of the navbar and footer in day-mode and the color of the body background of your site in night-mode. Dark colors work best.
|
||||
|
||||
- `backgroundColor` changes the background color of the body. The default is light grey for easy eye reading.
|
||||
|
||||
Always use hex codes.
|
||||
|
||||
### Fonts
|
||||
|
||||
```toml
|
||||
[params]
|
||||
font = "Mina"
|
||||
```
|
||||
|
||||
This theme uses [Google Fonts](https://fonts.google.com), so go nuts.
|
||||
|
||||
|
||||
### Syntax highlighting
|
||||
|
||||
```toml
|
||||
[params]
|
||||
highlight = true
|
||||
highlightStyle = "solarized-dark"
|
||||
highlightLanguages = ["r", "python", "bash"]
|
||||
```
|
||||
|
||||
The theme supports syntax highlighting thanks to [highlight.js](https://highlightjs.org), which is turned on by default. Checkout out the available palette options [here](https://highlightjs.org/static/demo/). Note `highlightStyle` param should be hyphen-separated lowercase.
|
||||
|
||||
Make sure your main languages render well and keep control on the languages that get special highlighted.
|
||||
|
||||
For best aesthetics with dark-mode, I reccommend choosing a light background style that matches your `accent` color.
|
||||
|
||||
### Favicons
|
||||
|
||||
This theme comes equipped with stock favicons modeled as hex stickers.
|
||||
|
||||
To update those, pick out an image and head over to [RealFaviconGenerator](https://realfavicongenerator.net/). Go through their build process and append the path `/img/favicon/` at the last step when you download. Just unzip and drop all of the new files in `quick/static/img/favicon/`. Now you have favicons for everything from tablets to tiles, that's tight.
|
||||
|
||||
### Site Logo
|
||||
|
||||
The site logo defaults to using the 192x192 Android favicon but you can change the path for `logo` param in `config.toml`. This could be a headshot, another hex-sticker or something completely different, but if you want to change the image dimensions drastically, you may have to tweak `layouts/index.html` directly to get a good result.
|
||||
|
||||
### Social Sharing
|
||||
|
||||
You must change `baseURL` to your current domain for this feature to work properly.
|
||||
|
||||
```toml
|
||||
baseURL = "your_domain.com"
|
||||
```
|
||||
|
||||
The current set up has two TwitterCard/OpenGraph options depending on the params you specify in your post's front matter. If you add the param `twitter_img` to a post, with the valid image path, then a summary card with large image will be shown. If you don't provide `twitter_img` then a summary card with the site logo will be shown instead. For best scaling large image summary wants a 2:1 ratio image and regular summary wants 1:1. The post `exampleSite/creating-a-new-theme.md` has been tweaked to include these new params, so you can template and test off of that.
|
||||
|
||||
The summary description will use the one provided in a post's front matter if it exists or use the generic site description from `config.toml`. You should also adjust the `twitterAuthor` and `twitterSite` params in `config.toml` to point to your account. You can check how your cards are rendering once your website is being publish with the [TwitterCard Validator](https://cards-dev.twitter.com/validator).
|
||||
|
||||
### Font Awesome
|
||||
|
||||
Font Awesome v5 icons are supported. The syntax for using these icons has changed with the version update. You must now include the full name of the icon e.g. `far fa-twitter` which adds a tag that specifies the weight of the icon used. Note that only free icons are supported by default. If you are a Font Awesome Pro user, you can add your website as a new project which will generate the code necessary to reference the pro CDN. Use the HTML code that is generated to replace that in the file at layouts/partials/css.html. Learn more in the [Font Awesome docs](https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use).
|
||||
|
||||
### [Coral](https://github.com/coralproject/talk) (formarly Talk)
|
||||
|
||||
|
||||
[Coral](https://github.com/coralproject/talk) is set of tools back by Mozilla, to make website commenting better. It is aimed at the news industry and has a lot of features for moderating a community, including abilities to mute annoying voices, set up specific notifications and access detailed commentor histories.
|
||||
|
||||
While Coral can be viewed as alternative to Hugo's built-in support of Disqus, but it is definately geared towrds larger sites and requires extra tech infrastructure. Inorder to run Coral you will need to install additional software on your server, but this theme includes partial layouts for easily adding the required JS + HTML into your pages.
|
||||
|
||||
To enable the parts for Talk v4 and Coral (Talk v5) edit your `config.toml` file like this:
|
||||
|
||||
```toml
|
||||
talkHost = "talk.example.com" # TalkV4
|
||||
coralHost = "coral.example.com"
|
||||
```
|
||||
|
||||
Make sure you comment out (or delete) the `disqusShortName` field in `config.toml` to prevent multiple comment plugins being included. And make sure your host has SSL encryption (eg https://example.com) enabled becasue Talk/Coral requires it.
|
||||
|
||||
Talk/Coral templates are graciously contributed by @mzch
|
||||
|
||||
## Going forward
|
||||
|
||||
This theme is something I enjoy and hope you do to.
|
||||
|
||||
If you get unexpected behavior post an issue and try to keep it as minimal as possible. Ideally bug reports would be reproducible using the [QuickStart tutorial](https://gohugo.io/getting-started/quick-start/) plus whatever changes cause the problem.
|
||||
|
||||
Pull requests are literally the best thing since ever, so if you have the idea (and the time) to add something to `min_night` do it! I promise I will respond quickly.
|
||||
|
||||
Happy blogging!
|
||||
|
5
archetypes/default.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ dateFormat "2006-01-02" .Date }}
|
||||
draft: true
|
||||
---
|
6
archetypes/post.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ dateFormat "2006-01-02" .Date }}
|
||||
tags: []
|
||||
draft: true
|
||||
---
|
8
archetypes/project.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
description: ""
|
||||
repo: ""
|
||||
tags: []
|
||||
weight: 0
|
||||
draft: true
|
||||
---
|
9
layouts/404.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
<div class="intro">
|
||||
<h2>Page not found</h2>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
19
layouts/_default/list.html
Normal file
@ -0,0 +1,19 @@
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
<h2>{{ .Title }}</h2>
|
||||
|
||||
{{ range (.Paginator 10).Pages }}
|
||||
{{ if eq "Posts" $.Title }}
|
||||
{{partial "list-item-post.html" .}}
|
||||
{{else}}
|
||||
{{ partial "list-item-project" . }}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
</main>
|
||||
|
||||
{{ partial "paginator" . }}
|
||||
|
||||
|
||||
{{ partial "footer" . }}
|
38
layouts/_default/single.html
Normal file
@ -0,0 +1,38 @@
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
|
||||
{{ partial "list-item" . }}
|
||||
|
||||
<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 }}
|
||||
|
||||
{{ if .Site.Params.talkHost }}
|
||||
{{ partial "talk.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.coralHost }}
|
||||
{{ partial "coral.html" . }}
|
||||
{{ end }}
|
||||
|
||||
</main>
|
||||
|
||||
{{ partial "footer.html" . }}
|
23
layouts/_default/terms.html
Normal file
@ -0,0 +1,23 @@
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main>
|
||||
|
||||
<div>
|
||||
<h2>{{ .Title }}</h2>
|
||||
|
||||
<ul class="terms">
|
||||
{{ range $key, $value := .Data.Terms }}
|
||||
<li>
|
||||
<a href='{{ (print "/" $.Data.Plural "/" $key) | relURL }}'>
|
||||
{{ $key }}
|
||||
</a>
|
||||
({{ len $value }})
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
{{ partial "footer" . }}
|
20
layouts/index.html
Normal file
@ -0,0 +1,20 @@
|
||||
{{ partial "header" . }}
|
||||
|
||||
<main class = "content-box">
|
||||
|
||||
<div class="intro">
|
||||
|
||||
<div class="avatar">
|
||||
<img class="img-responsive" src="{{ .Site.BaseURL }}/img/{{ .Site.Params.logo }}" alt="Whoopsies, this is my bad side!" style = "margin: 0 auto;">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<div style = "margin-top: 50px">
|
||||
<h2>{{ .Site.Params.description }}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
{{ partial "footer" . }}
|
30
layouts/partials/css.html
Normal file
@ -0,0 +1,30 @@
|
||||
<style>
|
||||
|
||||
html body {
|
||||
font-family: '{{ .Site.Params.font }}', sans-serif;
|
||||
background-color: {{ .Site.Params.backgroundColor | default "white" }};
|
||||
}
|
||||
|
||||
:root {
|
||||
--accent: {{ .Site.Params.accent | default "#2196F3" }};
|
||||
--border-width: {{ if .Site.Params.showBorder | default false }} 5px {{ else }} 0 {{ end }};
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<!-- google fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ .Site.Params.font }}">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=VT323">
|
||||
|
||||
<!-- bootstrap -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
|
||||
<!-- font awesome -->
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.0/css/all.css" integrity="sha384-Mmxa0mLqhmOeaE8vgOSbKacftZcsNYDjQzuCOm6D02luYSzBG8vpaOykv9lFQ51Y" crossorigin="anonymous">
|
||||
|
||||
<!-- main -->
|
||||
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
|
||||
|
||||
<!-- custom -->
|
||||
{{ range .Site.Params.css }} <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }}
|
||||
|
10
layouts/partials/footer.html
Normal file
@ -0,0 +1,10 @@
|
||||
<footer id = "bigfooter">
|
||||
<div style = "padding:15px;">
|
||||
<p>{{ "Powered by [Hugo](https://gohugo.io). Themed by [fabinfra](https://gitlab.com/fabinfra/fabinfra-theme)." | markdownify }}
|
||||
</p>
|
||||
<div class="flaticon">Icons made by <a href="https://www.flaticon.com/authors/payungkead" title="Payungkead">Payungkead</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>
|
||||
<div class="flaticon">Icons made by <a href="https://www.flaticon.com/authors/roundicons" title="Roundicons">Roundicons</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
53
layouts/partials/header.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ partial "css" . }} {{ partial "js" . }} {{ hugo.Generator }}
|
||||
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
|
||||
<!-- Favicons - https://realfavicongenerator.net/ -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/img/favicon/site.webmanifest">
|
||||
<link rel="mask-icon" href="/img/favicon/safari-pinned-tab.svg" color="#000000">
|
||||
<link rel="shortcut icon" href="/img/favicon/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-config" content="/img/favicon/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
|
||||
<body id = "bigbody">
|
||||
<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 }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .Site.Menus.icon }}
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ range sort .Site.Menus.icon }}
|
||||
<li class="navbar-icon"><a href="{{ .URL }}"><i class="{{ .Name }}"></i></a></li>
|
||||
{{ end }}
|
||||
{{ partial "toggle"}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
42
layouts/partials/js.html
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- custom -->
|
||||
{{ range .Site.Params.js }}
|
||||
<script src="{{ . | absURL }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
|
||||
<!-- bootstrap -->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- boostrap toggle tool -->
|
||||
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
|
||||
<script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
|
||||
|
||||
<!-- dismiss expanded navigation bar with click -->
|
||||
<script>$(document).on('click', function() { $('.collapse').collapse('hide'); })</script>
|
||||
|
||||
<!-- nightmode-toggle -->
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
var input = $('#night-mode-toggle');
|
||||
var container = $('#bigbody');
|
||||
var stat = $('#button-status');
|
||||
|
||||
container.toggleClass(localStorage.toggled);
|
||||
stat.bootstrapToggle(localStorage.button).change();
|
||||
|
||||
input.on('click', function() {
|
||||
if (localStorage.toggled != "-nightmode" ) {
|
||||
container.toggleClass("-nightmode", true );
|
||||
localStorage.toggled = "-nightmode";
|
||||
localStorage.button = "on";
|
||||
} else {
|
||||
container.toggleClass("-nightmode", false );
|
||||
localStorage.toggled = "";
|
||||
localStorage.button = "off"
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
35
layouts/partials/list-item-post.html
Normal file
@ -0,0 +1,35 @@
|
||||
<div class="item">
|
||||
|
||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
||||
{{ with .Params.repo }}
|
||||
{{ $repoHost := default "github" $.Params.repoHost }}
|
||||
{{ if eq "github" $repoHost }}
|
||||
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "gitlab" $repoHost }}
|
||||
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "bitbucket" $repoHost }}
|
||||
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
|
||||
|
||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
|
||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
||||
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
||||
|
||||
|
||||
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
||||
<h5>{{ $.Scratch.Get "pub_date" }} - {{ $.Scratch.Get "read_time" }} minutes</h5>
|
||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
||||
{{ range.Params.categories }}
|
||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
||||
<kbd class="item-cat"> {{ . }} </kbd>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
||||
<kbd class="item-tag"> {{ . }} </kbd>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
36
layouts/partials/list-item-project.html
Normal file
@ -0,0 +1,36 @@
|
||||
<div class="item">
|
||||
|
||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
||||
{{ with .Params.repo }}
|
||||
{{ $repoHost := default "github" $.Params.repoHost }}
|
||||
{{ if eq "github" $repoHost }}
|
||||
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "gitlab" $repoHost }}
|
||||
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "bitbucket" $repoHost }}
|
||||
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
|
||||
|
||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
|
||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
||||
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
||||
|
||||
|
||||
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
||||
<h5>{{ $.Scratch.Get "pub_date" }}</h5>
|
||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
||||
{{ range.Params.categories }}
|
||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
||||
<kbd class="item-cat"> {{ . }} </kbd>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
||||
<kbd class="item-tag"> {{ . }} </kbd>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
37
layouts/partials/list-item.html
Normal file
@ -0,0 +1,37 @@
|
||||
<div class="item">
|
||||
|
||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
||||
{{ with .Params.repo }}
|
||||
{{ $repoHost := default "github" $.Params.repoHost }}
|
||||
{{ if eq "github" $repoHost }}
|
||||
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "gitlab" $repoHost }}
|
||||
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "bitbucket" $repoHost }}
|
||||
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
|
||||
|
||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
|
||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
||||
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
||||
|
||||
|
||||
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
||||
<h5>{{ $.Scratch.Get "pub_date" }} - {{ $.Scratch.Get "read_time" }} minutes</h5>
|
||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
||||
|
||||
{{ range.Params.categories }}
|
||||
|
||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
||||
<kbd class="item-cat"> {{ . }} </kbd>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
||||
<kbd class="item-tag"> {{ . }} </kbd>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
17
layouts/partials/paginator.html
Normal file
@ -0,0 +1,17 @@
|
||||
{{ if or .Paginator.HasPrev .Paginator.HasNext }}
|
||||
|
||||
<div class="pages">
|
||||
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="icon pages-icon" href="{{ .Paginator.Prev.URL }}" rel="prev">
|
||||
<i class="fas fa-arrow-left"></i>
|
||||
</a>
|
||||
{{ end }} {{ if .Paginator.HasNext }}
|
||||
<a class="icon pages-icon" href="{{ .Paginator.Next.URL }}" rel="next">
|
||||
<i class="fas fa-arrow-right"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ end }}
|
10
layouts/partials/toggle.html
Normal file
@ -0,0 +1,10 @@
|
||||
<li id="night-mode-toggle">
|
||||
<input type="checkbox" id = "button-status"
|
||||
data-toggle="toggle"
|
||||
data-width = "10"
|
||||
data-height = "1"
|
||||
data-on="<i class='far fa-moon fa-lg'></i>"
|
||||
data-off= "<i class='far fa-sun fa-lg'></i>"
|
||||
data-style="ios"
|
||||
data-onstyle = "default">
|
||||
</li>
|
204
static/css/main.css
Normal file
@ -0,0 +1,204 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size:1.5em;
|
||||
padding-top: 55px;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
main {
|
||||
margin: auto;
|
||||
padding: 25px;
|
||||
flex: auto;
|
||||
max-width: 750px;
|
||||
}
|
||||
|
||||
/*footer*/
|
||||
|
||||
.copyright {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
/*home page*/
|
||||
|
||||
.intro {
|
||||
/* transform: translateY(80%); */
|
||||
}
|
||||
|
||||
.intro > h1 {
|
||||
font-size: 4em;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.intro > h2 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.intro > .profile {
|
||||
width: 10vh;
|
||||
height: 10vh;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/*apply accent colour to links*/
|
||||
|
||||
a:link, a:visited {
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
#bigbody main a {
|
||||
color: var(--accent) !important;
|
||||
}
|
||||
|
||||
#bigfooter a:link, a:visited {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
#bigfooter a:hover {
|
||||
text-decoration: underline;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
/*paginator at bottom of list view*/
|
||||
|
||||
.pages {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.pages-icon {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/*list item for posts and projects*/
|
||||
|
||||
.item {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.item-cat {
|
||||
background-color: #757575;
|
||||
margin:1px;
|
||||
}
|
||||
|
||||
.item-tag {
|
||||
background-color: var(--accent);
|
||||
margin:1px;
|
||||
}
|
||||
|
||||
.terms {
|
||||
margin: 1px;
|
||||
padding: 1px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
/*navigation bar icons*/
|
||||
|
||||
.navbar-icon {
|
||||
font-size: 120%;
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
/*coloured borders at top and bottom of the page*/
|
||||
.navbar.navbar-default {
|
||||
border-top: var(--border-width) solid var(--accent);
|
||||
background-color: var(--accent);
|
||||
font-size: 120%;
|
||||
color: #FFF !important;
|
||||
}
|
||||
.navbar-default .navbar-nav li a {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav li a:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav.-nightmode li a:hover {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-brand {
|
||||
color: #cccccc !important;
|
||||
}
|
||||
|
||||
/* custome footer */
|
||||
footer {
|
||||
background-color: var(--accent);
|
||||
border-top: #e7e7e7 solid;
|
||||
border-top-width: 1px;
|
||||
color: #fff;
|
||||
/* border-bottom: var(--border-width) solid #f8f8f8; */
|
||||
}
|
||||
footer a {
|
||||
color: #cccccc;
|
||||
}
|
||||
footer p {
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.flaticon {
|
||||
font-size: 0.5em
|
||||
}
|
||||
|
||||
/** Intvert colors
|
||||
* Wonderful CSS filter trick by Leo Nikkilä
|
||||
* @link https://lnikki.la/articles/night-mode-css-filter/
|
||||
*/
|
||||
#bigbody.-nightmode {
|
||||
background: var(--accent)!important;
|
||||
color: #333333 !important;
|
||||
-webkit-filter: invert(1) hue-rotate(180deg);
|
||||
filter: invert(1) hue-rotate(180deg)
|
||||
}
|
||||
/* "re-flip"" certain elements to keep colors */
|
||||
#bigbody.-nightmode img, video {
|
||||
-webkit-filter: invert(1) hue-rotate(-180deg);
|
||||
filter: invert(1) hue-rotate(-180deg)
|
||||
}
|
||||
#bigbody.-nightmode iframe {
|
||||
-webkit-filter: invert(1) hue-rotate(-180deg);
|
||||
filter: invert(1) hue-rotate(-180deg)
|
||||
}
|
||||
/* custom behavior for specfic element */
|
||||
#bigbody.-nightmode main a {
|
||||
color: var(--accent) !important;
|
||||
}
|
||||
#bigbody.-nightmode .item-tag {
|
||||
background-color: var(--accent) !important;
|
||||
color: #f8f8f8 !important;
|
||||
}
|
||||
|
||||
/* slider attributes match navbar elements */
|
||||
#night-mode-toggle {
|
||||
font-size: 100%;
|
||||
padding-top:10px;
|
||||
}
|
||||
/* built on-top of Custom Style .ios
|
||||
from: http://www.bootstraptoggle.com/ */
|
||||
.toggle.ios, .toggle-on.ios, .toggle-off.ios { border-radius: 20px}
|
||||
.toggle.ios .toggle-handle { border-radius: 20px;}
|
||||
.toggle.ios .toggle-group {transition: none;-webkit-transition: none;}
|
||||
|
||||
.toggle-on {
|
||||
background-color: #e1e1e1;
|
||||
color: #373a3d;
|
||||
}
|
||||
|
||||
.toggle-on:hover {
|
||||
background-color: var(--accent);
|
||||
color: #e1e1e1;
|
||||
}
|
||||
.toggle-off:hover {
|
||||
background-color: var(--accent) !important;
|
||||
color: #f8f8f8 !important;
|
||||
}
|
BIN
static/img/favicon/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
static/img/favicon/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
static/img/favicon/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
9
static/img/favicon/browserconfig.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#2b5797</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
BIN
static/img/favicon/favicon-16x16.png
Normal file
After Width: | Height: | Size: 907 B |
BIN
static/img/favicon/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
static/img/favicon/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
static/img/favicon/logo.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
static/img/favicon/mstile-144x144.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
static/img/favicon/mstile-150x150.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
static/img/favicon/mstile-310x150.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
static/img/favicon/mstile-310x310.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
static/img/favicon/mstile-70x70.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
53
static/img/favicon/safari-pinned-tab.svg
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M1627 6118 c-305 -30 -584 -161 -800 -375 -475 -470 -519 -1229 -100
|
||||
-1750 104 -131 224 -231 395 -333 36 -21 62 -44 69 -63 9 -22 12 -333 13
|
||||
-1306 l1 -1277 175 -262 c96 -144 177 -262 180 -262 3 0 161 117 352 260 l346
|
||||
260 -89 134 c-70 105 -89 142 -89 169 0 28 19 64 90 170 49 75 90 139 90 144
|
||||
0 4 -42 49 -93 99 -184 183 -197 198 -197 245 0 40 5 46 156 199 l156 158 -46
|
||||
135 c-25 74 -46 147 -46 162 0 14 24 101 54 193 l54 167 0 296 c-1 347 -5 332
|
||||
106 396 341 195 595 565 642 936 3 23 7 53 10 67 5 29 7 241 2 245 -2 2 -38 6
|
||||
-81 10 -102 8 -163 14 -212 20 -22 2 -60 7 -85 10 -39 5 -84 12 -255 41 -16 3
|
||||
-54 11 -83 19 -40 10 -54 11 -57 2 -2 -7 -9 -30 -16 -52 -79 -264 -366 -428
|
||||
-639 -367 -164 36 -320 165 -382 317 -34 82 -41 122 -41 220 0 121 23 197 89
|
||||
297 55 83 113 135 202 181 108 56 252 77 365 52 133 -28 260 -116 340 -233 31
|
||||
-46 77 -147 77 -171 0 -5 12 -11 28 -14 276 -58 289 -60 377 -73 17 -2 44 -6
|
||||
60 -8 27 -4 91 -10 218 -21 56 -4 57 -3 22 97 -63 179 -194 378 -337 513 -91
|
||||
85 -95 88 -185 148 -106 71 -306 157 -403 174 -14 2 -41 8 -60 13 -83 21 -260
|
||||
30 -373 18z m13 -3876 l0 -1148 -107 0 -108 1 -2 1148 -2 1147 110 0 109 0 0
|
||||
-1148z"/>
|
||||
<path d="M5035 6012 c-502 -43 -941 -341 -1170 -791 -14 -28 -25 -53 -25 -56
|
||||
0 -7 140 2 225 15 33 5 78 11 100 15 22 3 74 12 115 21 41 9 86 18 99 20 51
|
||||
10 236 65 241 72 4 4 14 27 23 52 10 25 38 73 64 108 207 271 603 292 835 43
|
||||
99 -106 148 -237 143 -381 -3 -97 -7 -120 -36 -193 -94 -240 -366 -387 -614
|
||||
-330 -152 34 -250 101 -347 234 -31 44 -77 154 -80 195 -3 29 -4 29 -115 3
|
||||
-99 -24 -96 -23 -213 -45 -47 -9 -92 -17 -100 -19 -9 -2 -43 -6 -75 -10 -33
|
||||
-4 -67 -9 -75 -10 -19 -4 -205 -18 -242 -19 -25 -1 -29 -6 -37 -51 -12 -56
|
||||
-18 -97 -26 -170 -5 -36 -9 -2473 -5 -3018 l0 -57 1422 2 1421 3 0 1505 c0
|
||||
1473 -2 1572 -24 1695 -104 581 -570 1047 -1150 1149 -98 17 -268 26 -354 18z
|
||||
m1259 -1765 c15 -10 33 -31 39 -46 9 -21 12 -313 12 -1142 -1 -1076 -2 -1115
|
||||
-20 -1146 -10 -18 -32 -37 -48 -43 -20 -7 -408 -10 -1149 -10 l-1120 0 -34 34
|
||||
c-28 28 -34 42 -35 77 -4 276 0 2210 5 2227 4 12 23 32 41 45 l33 23 1124 -1
|
||||
c1071 0 1125 -1 1152 -18z"/>
|
||||
<path d="M4159 4041 c-4 -21 -3 -1961 1 -1962 3 0 446 0 985 -1 l980 0 0 981
|
||||
c0 865 -2 982 -15 985 -24 7 -1950 3 -1951 -3z"/>
|
||||
<path d="M3187 5904 c-2 -2 -229 -15 -304 -18 -18 -1 -33 -4 -33 -7 0 -5 55
|
||||
-73 129 -159 l39 -46 63 5 c35 2 174 4 309 5 206 0 308 -4 487 -17 14 -1 51
|
||||
27 117 90 84 80 114 117 89 111 -9 -2 -162 11 -203 17 -77 12 -683 28 -693 19z"/>
|
||||
<path d="M1756 5455 c-20 -53 6 -134 63 -197 45 -50 113 -95 206 -135 l50 -21
|
||||
6 21 c7 31 -23 136 -55 190 -44 77 -137 138 -230 153 -25 4 -35 1 -40 -11z"/>
|
||||
<path d="M4990 5430 c-48 -26 -93 -67 -123 -115 -28 -45 -64 -151 -54 -161 9
|
||||
-9 94 47 139 91 50 49 80 114 76 163 l-3 40 -35 -18z"/>
|
||||
<path d="M3383 5142 l-123 -3 1 -32 c0 -18 10 -66 23 -107 l22 -75 84 -1 c82
|
||||
-2 120 7 120 26 0 5 11 33 24 62 49 108 56 128 43 129 -34 3 -83 4 -194 1z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.3 KiB |
19
static/img/favicon/site.webmanifest
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
15
theme.toml
Normal file
@ -0,0 +1,15 @@
|
||||
name = "fabinfra"
|
||||
license = "MIT"
|
||||
licenselink = ""
|
||||
description = "Theme for the FabInfra Project"
|
||||
homepage = "https://gitlab.com/fabinfra/fabinfra-theme"
|
||||
tags = []
|
||||
features = []
|
||||
min_version = "0.35"
|
||||
|
||||
[author]
|
||||
name = "TheJoKlLa"
|
||||
|
||||
[original]
|
||||
name = "Nate Day"
|
||||
homepage = "https://natedayta.com"
|