feat: implement barebone zola templates
This commit is contained in:
parent
9c20f5ed2e
commit
f99a9ae2ac
198 changed files with 2434 additions and 227991 deletions
2
themes/emily_zola_theme/.gitignore
vendored
Normal file
2
themes/emily_zola_theme/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/public
|
||||
/*.css
|
||||
21
themes/emily_zola_theme/LICENSE
Normal file
21
themes/emily_zola_theme/LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Kyohei Uto
|
||||
|
||||
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.
|
||||
2
themes/emily_zola_theme/Makefile
Normal file
2
themes/emily_zola_theme/Makefile
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
tw:
|
||||
railwind && cp railwind.css ./static/main.css && cp railwind.css ./public/main.css
|
||||
50
themes/emily_zola_theme/README.md
Normal file
50
themes/emily_zola_theme/README.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# emily_zola_theme
|
||||
|
||||

|
||||
|
||||
|
||||
A KISS theme for Zola (static site generator written in Rust).
|
||||
|
||||
Features:
|
||||
- simple & clean
|
||||
- mobile-friendly
|
||||
- MathJax support
|
||||
|
||||
Demo site is [here](https://emily-zola-theme.netlify.app/).
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
cd YOUR_SITE_DIRECTORY/themes
|
||||
git clone https://github.com/kyoheiu/emily_zola_theme.git
|
||||
```
|
||||
|
||||
and set the theme-name in `config.toml` to `emily_zola_theme`.
|
||||
|
||||
```
|
||||
theme = "emily_zola_theme"
|
||||
```
|
||||
|
||||
## example articles
|
||||
|
||||
In `YOUR_SITE_DIRECTORY/themes/emily_zola_theme/content`.
|
||||
|
||||
## MathJax support
|
||||
|
||||
To use MathJax, add the following lines to the front matter in `.md` file. `[extra]` is mandatory:
|
||||
|
||||
```
|
||||
[extra]
|
||||
math = true
|
||||
```
|
||||
|
||||
## How to customize
|
||||
In addition to default values, you can customize following parts easily:
|
||||
|
||||
- author name (appears in footer)
|
||||
- header icon (appears in header)
|
||||
- favicon
|
||||
- header icon size (default width: 70px)
|
||||
- number of posts in `index.html` (default 5)
|
||||
|
||||
Set your own in `themes/emily_zola_theme/theme.toml`, or to overwrite, copy `[extra]` block, paste it into your `config.toml` and edit.
|
||||
81
themes/emily_zola_theme/config.toml
Normal file
81
themes/emily_zola_theme/config.toml
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# The URL the site will be built for
|
||||
base_url = "https://emily-zola-theme.netlify.app/"
|
||||
|
||||
# Set theme
|
||||
#theme = ""
|
||||
|
||||
# The site title and description; used in feeds by default.
|
||||
title = "site title"
|
||||
description = ""
|
||||
|
||||
# The default language; used in feeds.
|
||||
default_language = "en"
|
||||
|
||||
# Whether to automatically compile all Sass files in the sass directory
|
||||
compile_sass = true
|
||||
|
||||
# The taxonomies to be rendered for the site and their configuration.
|
||||
# Example:
|
||||
# taxonomies = [
|
||||
# {name = "tags", feed = true}, # each tag will have its own feed
|
||||
# {name = "tags", lang = "fr"}, # you can have taxonomies with the same name in multiple languages
|
||||
# {name = "categories", paginate_by = 5}, # 5 items per page for a term
|
||||
# {name = "authors"}, # Basic definition: no feed or pagination
|
||||
# ]
|
||||
taxonomies = [
|
||||
{name = "categories", rss = false},
|
||||
{name = "tags", rss = false},
|
||||
]
|
||||
|
||||
# The additional languages for the site.
|
||||
# Example:
|
||||
# languages = [
|
||||
# {code = "fr", feed = true}, # there will be a feed for French content
|
||||
# {code = "fr", search = true}, # there will be a Search Index for French content
|
||||
# {code = "it"}, # there won't be a feed for Italian content
|
||||
# ]
|
||||
#
|
||||
# languages = []
|
||||
|
||||
[markdown]
|
||||
# When set to "true", all code blocks are highlighted.
|
||||
highlight_code = false
|
||||
|
||||
# The theme to use for code highlighting.
|
||||
# See below for list of allowed values.
|
||||
# highlight_theme = ""
|
||||
|
||||
# When set to "true", emoji aliases translated to their corresponding
|
||||
# Unicode emoji equivalent in the rendered Markdown files. (e.g.: :smile: => 😄)
|
||||
render_emoji = false
|
||||
|
||||
[search]
|
||||
# Whether to include the title of the page/section in the index
|
||||
include_title = false
|
||||
# Whether to include the description of the page/section in the index
|
||||
include_description = false
|
||||
# Whether to include the rendered content of the page/section in the index
|
||||
include_content = false
|
||||
|
||||
[extra]
|
||||
# Author name, appears in footer.
|
||||
emily_author = "author name"
|
||||
|
||||
# Path to the header icon / favicon image.
|
||||
# Please save image to static/images
|
||||
emily_icon = "/images/logo.png"
|
||||
|
||||
emily_favicon = "/images/favicon.png"
|
||||
|
||||
# header icon width.
|
||||
# height will be automatically rendered.
|
||||
emily_iconsize = 70
|
||||
|
||||
# number of posts in index.html.
|
||||
emily_indexposts = 5
|
||||
|
||||
# switch to dark-theme
|
||||
emily_dark_mode = true
|
||||
|
||||
# show theme-toggler
|
||||
emily_theme_toggler = true
|
||||
12
themes/emily_zola_theme/content/about/index.md
Normal file
12
themes/emily_zola_theme/content/about/index.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
+++
|
||||
title = "about this site and author"
|
||||
date = 2020-01-01
|
||||
template = "post-page.html"
|
||||
+++
|
||||
|
||||
### about this site
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
### about author
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
7
themes/emily_zola_theme/content/post/_index.md
Normal file
7
themes/emily_zola_theme/content/post/_index.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
+++
|
||||
sort_by = "date"
|
||||
template = "post.html"
|
||||
page_template = "post-page.html"
|
||||
[extra]
|
||||
math = false
|
||||
+++
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
+++
|
||||
title = "Markdown Syntax Guide"
|
||||
date = 2021-01-02
|
||||
[taxonomies]
|
||||
categories = ["code"]
|
||||
tags = ["markdown"]
|
||||
+++
|
||||
|
||||
### Headings
|
||||
The following HTML `<h1>—<h6>` elements represent six levels of section headings. `<h1>` is the highest section level while `<h6>` is the lowest.
|
||||
|
||||
# H1
|
||||
## H2
|
||||
### H3
|
||||
#### H4
|
||||
##### H5
|
||||
###### H6
|
||||
|
||||
### Paragraph
|
||||
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
|
||||
|
||||
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
|
||||
|
||||
### Blockquotes
|
||||
> Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur?
|
||||
|
||||
### Code
|
||||
|
||||
`inline code block`
|
||||
|
||||
```rust
|
||||
use std::io;
|
||||
|
||||
fn main() {
|
||||
println!("Guess the number!");
|
||||
|
||||
println!("Please input your guess.");
|
||||
|
||||
let mut guess = String::new();
|
||||
|
||||
io::stdin()
|
||||
.read_line(&mut guess)
|
||||
.expect("Failed to read line");
|
||||
|
||||
println!("You guessed: {}", guess);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Tables
|
||||
|
||||
First Header | Second Header
|
||||
------------ | -------------
|
||||
Content from cell 1 | Content from cell 2
|
||||
Content in the first column | Content in the second column
|
||||
|
||||
### List Types
|
||||
#### Ordered List
|
||||
1. First item
|
||||
2. Second item
|
||||
3. Third item
|
||||
|
||||
#### Unordered List
|
||||
- List item
|
||||
- Another item
|
||||
- And another item
|
||||
- orange
|
||||
- apple
|
||||
- banana
|
||||
- watermelon
|
||||
30
themes/emily_zola_theme/content/post/mathjax_support.md
Normal file
30
themes/emily_zola_theme/content/post/mathjax_support.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
+++
|
||||
title = "MathJax Support"
|
||||
date = 2021-01-03
|
||||
[taxonomies]
|
||||
categories = ["math"]
|
||||
tags = ["Euler's identity"]
|
||||
[extra]
|
||||
math = true
|
||||
+++
|
||||
|
||||
**Please add the following lines in the front matter when using MathJax.**
|
||||
|
||||
```
|
||||
[extra]
|
||||
math = true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
#### Euler's identity
|
||||
|
||||
$e^{i\pi }+1=0$
|
||||
|
||||
#### Geometric interpretation
|
||||
|
||||
Any complex number $z=x+iy$ can be represented by the point $(x,y)$ on the complex plane. This point can also be represented in polar coordinates as $(r,\theta )$, where $r$ is the absolute value of $z$ (distance from the origin), and $\theta$ is the argument of $z$ (angle counterclockwise from the positive x-axis). By the definitions of sine and cosine, this point has cartesian coordinates of $(r\cos \theta ,r\sin \theta )$, implying that $z=r(\cos \theta +i\sin \theta )$. According to Euler's formula, this is equivalent to saying $z=re^{i\theta}$.
|
||||
|
||||
Euler's identity says that $-1=e^{i\pi }$. Since $e^{i\pi }$ is $re^{i\theta }$ for $r$ = 1 and $\theta =\pi$ , this can be interpreted as a fact about the number −1 on the complex plane: its distance from the origin is 1, and its angle from the positive x-axis is $\pi$ radians.
|
||||
|
||||
[Euler's identity \- Wikipedia](https://en.wikipedia.org/wiki/Euler%27s_identity)
|
||||
9
themes/emily_zola_theme/content/post/welcome_to_emily.md
Normal file
9
themes/emily_zola_theme/content/post/welcome_to_emily.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
+++
|
||||
title = "Welcome to emily, a KISS theme for Zola"
|
||||
date = 2020-12-31
|
||||
[taxonomies]
|
||||
categories = ["code"]
|
||||
tags = ["rust"]
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
6
themes/emily_zola_theme/railwind.config.ron
Normal file
6
themes/emily_zola_theme/railwind.config.ron
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(
|
||||
content: [
|
||||
"index.html", "base.html", "post.html", "post-page.html", "sample.html"
|
||||
],
|
||||
extend_collection_options: None,
|
||||
)
|
||||
71
themes/emily_zola_theme/sass/typography.scss
Normal file
71
themes/emily_zola_theme/sass/typography.scss
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
$sky:#bae6fd;
|
||||
$slate200: #e2e8f0;
|
||||
$slate900: #0f172a;
|
||||
|
||||
a {
|
||||
color: $sky;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
border-bottom: 1px solid $slate200;
|
||||
}
|
||||
|
||||
img, video {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
pre {
|
||||
border: 1px solid;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
margin: 0.25rem;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
:not(pre)>code {
|
||||
font-size: 0.875rem;
|
||||
padding: 0.0625rem 0.125rem;
|
||||
color: $slate900;
|
||||
background-color: $slate200;
|
||||
border-radius: 0.375rem;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 0.125rem solid;
|
||||
padding-left: 0.25rem;
|
||||
margin-left: 1rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin: 0 auto;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
table th {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
table th,
|
||||
td {
|
||||
border: 1px #666;
|
||||
border-style: solid none;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: inside;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
BIN
themes/emily_zola_theme/screenshot.png
Normal file
BIN
themes/emily_zola_theme/screenshot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
1
themes/emily_zola_theme/static/foundation.min.css
vendored
Normal file
1
themes/emily_zola_theme/static/foundation.min.css
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#eee;color:#000}.hljs-addition,.hljs-attribute,.hljs-emphasis,.hljs-link{color:#070}.hljs-emphasis{font-style:italic}.hljs-deletion,.hljs-string,.hljs-strong{color:#d14}.hljs-strong{font-weight:700}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-section,.hljs-title{color:#900}.hljs-class .hljs-title,.hljs-title.class_,.hljs-type{color:#458}.hljs-template-variable,.hljs-variable{color:#369}.hljs-bullet{color:#970}.hljs-meta{color:#34b}.hljs-code,.hljs-keyword,.hljs-literal,.hljs-number,.hljs-selector-tag{color:#099}.hljs-regexp{background-color:#fff0ff;color:#808}.hljs-symbol{color:#990073}.hljs-name,.hljs-selector-class,.hljs-selector-id,.hljs-tag{color:#070}
|
||||
684
themes/emily_zola_theme/static/highlight.min.js
vendored
Normal file
684
themes/emily_zola_theme/static/highlight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
themes/emily_zola_theme/static/images/favicon.png
Normal file
BIN
themes/emily_zola_theme/static/images/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 529 KiB |
BIN
themes/emily_zola_theme/static/images/logo.png
Normal file
BIN
themes/emily_zola_theme/static/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 529 KiB |
BIN
themes/emily_zola_theme/static/images/ss01.png
Normal file
BIN
themes/emily_zola_theme/static/images/ss01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 121 KiB |
157
themes/emily_zola_theme/static/main.css
Normal file
157
themes/emily_zola_theme/static/main.css
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
.text-slate-200 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(226 232 240 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-sm {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.no-underline {
|
||||
-webkit-text-decoration-line: none;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
.text-sky-200 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(186 230 253 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-xl {
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.text-slate-50 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(248 250 252 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.w-5 {
|
||||
width: 1.25rem;
|
||||
}
|
||||
|
||||
.h-5 {
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.leading-relaxed {
|
||||
line-height: 1.625;
|
||||
}
|
||||
|
||||
.text-base {
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
.mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.mt-2 {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.w-11\/12 {
|
||||
width: 91.666667%;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.sm\:w-2\/3 {
|
||||
width: 66.666667%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.sm\:max-w-lg {
|
||||
max-width: 32rem;
|
||||
}
|
||||
}
|
||||
|
||||
.font-sans {
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
||||
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
|
||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
|
||||
"Noto Color Emoji";
|
||||
}
|
||||
|
||||
.bg-slate-900 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(15 23 42 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.items-start {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.border-slate-50 {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(248 250 252 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.rounded-full {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.ml-auto {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.justify-end {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.items-baseline {
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.border-amber-200 {
|
||||
--tw-border-opacity: 1;
|
||||
border-color: rgb(253 230 138 / var(--tw-border-opacity));
|
||||
}
|
||||
|
||||
.my-4 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.underline {
|
||||
-webkit-text-decoration-line: underline;
|
||||
text-decoration-line: underline;
|
||||
}
|
||||
|
||||
.text-indigo-200 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(199 210 254 / var(--tw-text-opacity));
|
||||
}
|
||||
|
||||
.text-3xl {
|
||||
font-size: 1.875rem;
|
||||
line-height: 2.25rem;
|
||||
}
|
||||
|
||||
.mb-2 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.mb-4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
56
themes/emily_zola_theme/templates/base.html
Normal file
56
themes/emily_zola_theme/templates/base.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" class="leading-relaxed text-base mx-auto mt-2 w-11/12 sm:w-2/3 sm:max-w-lg font-sans bg-slate-900 text-slate-50 no-underline">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{% block title %}
|
||||
<title>{{ config.title }}</title>
|
||||
{% endblock %}
|
||||
<link rel="shortcut icon" type="image/png" href="{{ config.extra.emily_favicon }}">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link id="stylesheet" rel="stylesheet" type="text/css" href="/main.css">
|
||||
<link id="stylesheet" rel="stylesheet" type="text/css" href="/typography.css">
|
||||
<link rel="stylesheet" href="/foundation.min.css">
|
||||
<script src="/highlight.min.js"></script>
|
||||
<script defer>hljs.highlightAll();</script>
|
||||
</head>
|
||||
|
||||
<div class="flex items-start border-slate-50">
|
||||
<a href="/">
|
||||
<div class="rounded-full">
|
||||
<img class="rounded-full" width="60" height="auto" src="{{ config.extra.emily_icon }}" alt="{{ config.title }}">
|
||||
</div>
|
||||
</a>
|
||||
<div class="ml-auto">
|
||||
<a class="no-underline text-slate-50" href="/">{{ config.title }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<a class="flex items-start text-slate-50" href="/about">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
|
||||
<path fill-rule="evenodd"
|
||||
d="M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
about</a>
|
||||
</div>
|
||||
<hr class="border-amber-200" />
|
||||
|
||||
<body onload="getTheme()">
|
||||
<section>
|
||||
<div>
|
||||
{% block content %} {% endblock %}
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
<div class="flex justify-end my-4">
|
||||
<div class="flex flex-col">
|
||||
<div><a class="underline text-slate-50" href="/">{{ config.title }}</a> © {{ config.extra.emily_author }}
|
||||
</div>
|
||||
<div>powered by <a class="text-slate-50" href="https://www.getzola.org/">zola</a>, theme <a class="text-slate-50"
|
||||
href="https://github.com/kyoheiu/emily_zola_theme">emily</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
18
themes/emily_zola_theme/templates/categories/list.html
Normal file
18
themes/emily_zola_theme/templates/categories/list.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>Categories</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Categories]</p>
|
||||
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li>
|
||||
<a href="{{ term.permalink }}">/{{ term.name }}</a>
|
||||
({{ term.pages | length }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
21
themes/emily_zola_theme/templates/categories/single.html
Normal file
21
themes/emily_zola_theme/templates/categories/single.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>{{ term.name }} | {{ config.title }}</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>[Category: {{ term.name }}]</p>
|
||||
|
||||
{% for page in term.pages %}
|
||||
<p>
|
||||
<div class="date">
|
||||
{{ page.date }}
|
||||
</div>
|
||||
<div>
|
||||
<a class="no-underline text-sky-200 text-xl" href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
||||
</div>
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock content %}
|
||||
36
themes/emily_zola_theme/templates/index.html
Normal file
36
themes/emily_zola_theme/templates/index.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set section = get_section(path="post/_index.md") %}
|
||||
{% for page in section.pages %}
|
||||
{% if loop.index0 == config.extra.emily_indexposts %}{% break %}{% endif %}
|
||||
<p>
|
||||
<div class="text-slate-200 text-sm">
|
||||
{{ page.date }}
|
||||
</div>
|
||||
<a class="no-underline text-sky-200 text-xl" href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
||||
<div>
|
||||
{% if page.taxonomies.categories %}
|
||||
{% for category in page.taxonomies.categories %}
|
||||
 <a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if page.taxonomies.tags %}
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
 <a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
<p>
|
||||
<a class="no-underline text-slate-50 flex items-start" href="/post">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
|
||||
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM6.75 9.25a.75.75 0 000 1.5h4.59l-2.1 1.95a.75.75 0 001.02 1.1l3.5-3.25a.75.75 0 000-1.1l-3.5-3.25a.75.75 0 10-1.02 1.1l2.1 1.95H6.75z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
archives</a>
|
||||
</p>
|
||||
|
||||
{% endblock content %}
|
||||
45
themes/emily_zola_theme/templates/post-page.html
Normal file
45
themes/emily_zola_theme/templates/post-page.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>{{ page.title }} | {{ config.title }}</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
<div class="text-3xl">{{ page.title }}</div>
|
||||
</p>
|
||||
<p>
|
||||
<div class="text-sm mb-2 text-right">{{ page.date }}</div>
|
||||
<div class="text-right">
|
||||
{% if page.taxonomies.categories %}
|
||||
{% for category in page.taxonomies.categories %}
|
||||
 <a class="text-slate-50" href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if page.taxonomies.tags %}
|
||||
{% for tag in page.taxonomies.tags %}
|
||||
 <a class="text-slate-50" href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ page.content | safe }}
|
||||
</p>
|
||||
<hr class="mb-4 border-amber-200" />
|
||||
|
||||
{% if page.extra.math %}
|
||||
<script>
|
||||
MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" async
|
||||
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% endblock content %}
|
||||
54
themes/emily_zola_theme/templates/post.html
Normal file
54
themes/emily_zola_theme/templates/post.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2 class="text-indigo-200">
|
||||
Categories & Tags
|
||||
</h2>
|
||||
<p>
|
||||
{% set categories = get_taxonomy(kind="categories") %}
|
||||
{% for term in categories.items %}
|
||||
<a class="no-underline text-slate-50" href="{{ term.permalink }}">/{{ term.name }}
|
||||
({{ term.pages | length }})</a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{% set tags = get_taxonomy(kind="tags") %}
|
||||
{% for term in tags.items %}
|
||||
<a class="no-underline text-slate-50" href="{{ term.permalink }}">#{{ term.name }}
|
||||
({{ term.pages | length }})</a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
{% for year, posts in section.pages | group_by(attribute="year") %}
|
||||
<h3 class="text-indigo-200">{{ year }}</h3>
|
||||
|
||||
{% for post in posts %}
|
||||
<p>
|
||||
<div>
|
||||
{{ post.date }}
|
||||
</div>
|
||||
<div>
|
||||
<a class="text-sky-200 no-underline text-xl" href="{{ post.permalink }}">{{ post.title }}</a>
|
||||
</div>
|
||||
<div>
|
||||
{% if post.taxonomies.categories %}
|
||||
{% for category in post.taxonomies.categories %}
|
||||
 <a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if post.taxonomies.tags %}
|
||||
{% for tag in post.taxonomies.tags %}
|
||||
 <a class="no-underline text-slate-50" href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endblock content %}
|
||||
18
themes/emily_zola_theme/templates/tags/list.html
Normal file
18
themes/emily_zola_theme/templates/tags/list.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>Tags</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p class="archive_title">[Tags]</p>
|
||||
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li>
|
||||
<a href="{{ term.permalink }}">#{{ term.name }}</a>
|
||||
({{ term.pages | length }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock content %}
|
||||
21
themes/emily_zola_theme/templates/tags/single.html
Normal file
21
themes/emily_zola_theme/templates/tags/single.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>{{ term.name }} | {{ config.title }}</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p class="archive_title">[Tag: {{ term.name }}]</p>
|
||||
|
||||
{% for page in term.pages %}
|
||||
<p>
|
||||
<div class="date">
|
||||
{{ page.date }}
|
||||
</div>
|
||||
<div class="archive_title">
|
||||
<a class="no-underline text-sky-200 text-xl" href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
||||
</div>
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock content %}
|
||||
23
themes/emily_zola_theme/theme.toml
Normal file
23
themes/emily_zola_theme/theme.toml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name = "emily_zola_theme"
|
||||
description = "a KISS theme for Zola"
|
||||
license = "MIT"
|
||||
min_version = "0.14.1"
|
||||
homepage = "https://github.com/kyoheiu/emily_zola_theme"
|
||||
demo = "https://emily-zola-theme.netlify.app/"
|
||||
|
||||
[extra]
|
||||
# Author name, appears in footer.
|
||||
emily_author = "author name"
|
||||
|
||||
# Path to the header icon / favicon image.
|
||||
# Please save image to static/images
|
||||
emily_icon = "/images/logo.png"
|
||||
|
||||
emily_favicon = "/images/favicon.png"
|
||||
|
||||
# number of posts in index.html.
|
||||
emily_indexposts = 5
|
||||
|
||||
[author]
|
||||
homepage = "https://github.com/kyoheiu"
|
||||
name = "Kyohei Uto"
|
||||
Loading…
Add table
Add a link
Reference in a new issue