[ADD] Theme2
This commit is contained in:
parent
f5bbd6ea8a
commit
03bcd0ad74
65
README.md
65
README.md
@ -2,63 +2,14 @@
|
|||||||
|
|
||||||
The source files for the <https://chaoszone.cz> website.
|
The source files for the <https://chaoszone.cz> website.
|
||||||
|
|
||||||
## Dependencies
|
# hugo
|
||||||
|
|
||||||
This site is built using [Hakyll](https://jaspervdj.be/hakyll).
|
- hugo is a static site generator
|
||||||
To be able to build and run this, you need to install the following:
|
- to start the development server
|
||||||
|
- with docker: ```docker run --rm -p 1313:1313 -v ./:/src hugomods/hugo:exts-non-root server -D```
|
||||||
|
- local: ```hugo server```
|
||||||
|
- to build the website
|
||||||
|
- with docker: ```docker run --rm -v ./:/src hugomods/hugo:exts-non-root build```
|
||||||
|
- local: ```hugo```
|
||||||
|
|
||||||
* ghc
|
|
||||||
* cabal-install
|
|
||||||
* alex
|
|
||||||
* happy
|
|
||||||
* zlib1g-dev
|
|
||||||
|
|
||||||
## New post
|
|
||||||
|
|
||||||
To write new posts just invoke `newpost.sh`. This will guide you through the
|
|
||||||
process.
|
|
||||||
|
|
||||||
After you have written and saved the new post, add the post (you can find it in
|
|
||||||
`site/posts/`) to the repo, commit and push it.
|
|
||||||
|
|
||||||
## Build and deploy
|
|
||||||
|
|
||||||
### NixOS
|
|
||||||
|
|
||||||
After cloning the repo and changing into the repo directory,
|
|
||||||
you can invoke
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix-shell shell.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
to build a shell with
|
|
||||||
all dependencies in it. After that, you invoke
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cabal new-run -- chaoszone build && cabal new-run -- chaoszone deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
to build the static sites and eploy them in one step.
|
|
||||||
|
|
||||||
### Other \*nix
|
|
||||||
|
|
||||||
After cloning the repo, you change into the directory and invoke
|
|
||||||
|
|
||||||
```
|
|
||||||
cabal new-update
|
|
||||||
```
|
|
||||||
|
|
||||||
to initialize your cabal package repository list. After that you can run
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cabal new-run -- chaoszone build && cabal new-run -- chaoszone deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
to build the static sites and eploy them in one step.
|
|
||||||
|
|
||||||
## Altering building process
|
|
||||||
|
|
||||||
For altering the building process, you may edit the `src/Main.hs` file. To
|
|
||||||
actually see your results, contact me at <nek0@nek0.eu> so I can rebuild the
|
|
||||||
executable for the static site generator.
|
|
||||||
|
|||||||
21
themes/zone2/LICENSE
Normal file
21
themes/zone2/LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) [year] [fullname]
|
||||||
|
|
||||||
|
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
themes/zone2/README.md
Normal file
7
themes/zone2/README.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Theme Name
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
## Configuration
|
||||||
5
themes/zone2/archetypes/default.md
Normal file
5
themes/zone2/archetypes/default.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
+++
|
||||||
|
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||||
|
date = {{ .Date }}
|
||||||
|
draft = true
|
||||||
|
+++
|
||||||
22
themes/zone2/assets/css/main.css
Normal file
22
themes/zone2/assets/css/main.css
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
body {
|
||||||
|
color: #222;
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin: 1rem;
|
||||||
|
max-width: 768px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
border-bottom: 1px solid #222;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
border-top: 1px solid #222;
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #00e;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
1
themes/zone2/assets/js/main.js
Normal file
1
themes/zone2/assets/js/main.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
console.log('This site was generated by Hugo.');
|
||||||
28
themes/zone2/hugo.toml
Normal file
28
themes/zone2/hugo.toml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
baseURL = 'https://example.org/'
|
||||||
|
languageCode = 'en-us'
|
||||||
|
title = 'My New Hugo Site'
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Home'
|
||||||
|
pageRef = '/'
|
||||||
|
weight = 10
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Members'
|
||||||
|
pageRef = ''
|
||||||
|
weight = 20
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Projects'
|
||||||
|
pageRef = ''
|
||||||
|
weight = 20
|
||||||
|
|
||||||
|
[[menus.main]]
|
||||||
|
name = 'Events'
|
||||||
|
pageRef = ''
|
||||||
|
weight = 20
|
||||||
|
|
||||||
|
[module]
|
||||||
|
[module.hugoVersion]
|
||||||
|
extended = false
|
||||||
|
min = "0.116.0"
|
||||||
9
themes/zone2/layouts/404.html
Normal file
9
themes/zone2/layouts/404.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<h1>Page Not Found</h1>
|
||||||
|
|
||||||
|
<p>This page doesn't exist.</p>
|
||||||
|
|
||||||
|
<p><a href="/">Go back to the home page</a></p>
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
18
themes/zone2/layouts/_default/list.html
Normal file
18
themes/zone2/layouts/_default/list.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ range.Data.Pages }}
|
||||||
|
<article class="post-snippet">
|
||||||
|
<h3>
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
</h3>
|
||||||
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{ .Date.Format "January 2, 2006" }}
|
||||||
|
</time>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
7
themes/zone2/layouts/_default/single.html
Normal file
7
themes/zone2/layouts/_default/single.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
29
themes/zone2/layouts/index.html
Normal file
29
themes/zone2/layouts/index.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
|
||||||
|
<main class="content">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3
themes/zone2/layouts/partials/footer.html
Normal file
3
themes/zone2/layouts/partials/footer.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<footer>
|
||||||
|
<p>©{{ dateFormat "2006" now }} {{ .Site.Title }}</p>
|
||||||
|
</footer>
|
||||||
11
themes/zone2/layouts/partials/header.html
Normal file
11
themes/zone2/layouts/partials/header.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
|
<title>{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/style.css" type="text/css" media="all" />
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/img/Chaoszone.svg" />
|
||||||
|
|
||||||
|
{{ with .OutputFormats.Get "rss" -}} {{ printf `
|
||||||
|
<link rel="%s" type="%s" href="%s" title="%s" />
|
||||||
|
` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}}
|
||||||
12
themes/zone2/layouts/partials/nav.html
Normal file
12
themes/zone2/layouts/partials/nav.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<nav class="site-nav">
|
||||||
|
<a class="logo" href="{{ .Site.BaseURL }}">
|
||||||
|
<img src="/img/Chaoszone.svg" />
|
||||||
|
</a>
|
||||||
|
<ul class="main-menu">
|
||||||
|
{{ range.Site.Menus.main }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
70
themes/zone2/static/css/style.css
Normal file
70
themes/zone2/static/css/style.css
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
:root {
|
||||||
|
--bg-color: #841205;
|
||||||
|
--hl-color: #A72119;
|
||||||
|
--menu-font-color: white;
|
||||||
|
--font-color: #430C08;
|
||||||
|
--box-bg: #ece2d5;
|
||||||
|
--main-font: 'Cubellan';
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Cubellan';
|
||||||
|
src: url('../font/Cubellan.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
color: var(--font-color);
|
||||||
|
font-family: var(--main-font);
|
||||||
|
font-size: 20pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
*, *::before, *::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.site-nav {
|
||||||
|
border-right: 2px solid var(--box-bg);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
display: block;
|
||||||
|
padding: clamp(1em, 3vw, 3em);
|
||||||
|
border-bottom: 2px solid var(--box-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-menu {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-menu > li {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-menu > li > a {
|
||||||
|
display: block;
|
||||||
|
padding: clamp(0.5em, 1.5vw, 1.5em);
|
||||||
|
color: var(--menu-font-color);
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 2px solid var(--box-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin-top: 3rem;
|
||||||
|
border-top: 2px solid var(--box-bg);
|
||||||
|
padding: clamp(1em, 3vw, 3em);
|
||||||
|
background-color: var(--box-bg);
|
||||||
|
}
|
||||||
BIN
themes/zone2/static/favicon.ico
Normal file
BIN
themes/zone2/static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
themes/zone2/static/font/Cubellan.ttf
Normal file
BIN
themes/zone2/static/font/Cubellan.ttf
Normal file
Binary file not shown.
54
themes/zone2/static/img/Chaoszone.svg
Normal file
54
themes/zone2/static/img/Chaoszone.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 20 KiB |
BIN
themes/zone2/static/img/Chaoszone_crest.png
Normal file
BIN
themes/zone2/static/img/Chaoszone_crest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 180 KiB |
31
themes/zone2/theme.toml
Normal file
31
themes/zone2/theme.toml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name = 'Theme name'
|
||||||
|
license = 'MIT'
|
||||||
|
licenselink = 'https://github.com/owner/repo/LICENSE'
|
||||||
|
description = 'Theme description'
|
||||||
|
|
||||||
|
# The home page of the theme, where the source can be found
|
||||||
|
homepage = 'https://github.com/owner/repo'
|
||||||
|
|
||||||
|
# If you have a running demo of the theme
|
||||||
|
demosite = 'https://owner.github.io/repo'
|
||||||
|
|
||||||
|
# Taxonomy terms
|
||||||
|
tags = ['blog', 'company']
|
||||||
|
features = ['some', 'awesome', 'features']
|
||||||
|
|
||||||
|
# If the theme has multiple authors
|
||||||
|
authors = [
|
||||||
|
{name = 'Name of author', homepage = 'Website of author'},
|
||||||
|
{name = 'Name of author', homepage = 'Website of author'}
|
||||||
|
]
|
||||||
|
|
||||||
|
# If the theme has a single author
|
||||||
|
[author]
|
||||||
|
name = 'Your name'
|
||||||
|
homepage = 'Your website'
|
||||||
|
|
||||||
|
# If porting an existing theme
|
||||||
|
[original]
|
||||||
|
author = 'Name of original author'
|
||||||
|
homepage = 'Website of original author'
|
||||||
|
repo = 'https://github.com/owner/repo'
|
||||||
Loading…
x
Reference in New Issue
Block a user