setup the basic thing atleast

main
Abhishek Anil Deshmukh 11 months ago
parent c0809eafc9
commit 717160cec8

@ -0,0 +1,16 @@
Uses zola, to convert markdown to the final static site.
For testing
```
$ zola serve
```
- [x] Basic site
- [ ] Test post
- [ ] Images
- [ ] Code
- [ ] Video
- [ ] Migrate old posts
- [ ] Support for indian languages
- [ ] Automate deployment whenever I push code
- [ ] Pagination

@ -0,0 +1,61 @@
# The URL the site will be built for
base_url = "https://thoughts.abhishek-home.com"
# The site title
title = "Abhishek's thoughts"
description = "A compilation of things I think about in a blog format."
author = "Abhishek Anil Deshmukh"
# Whether to automatically compile all Sass files in the sass directory
theme = "anatole-zola"
compile_sass = false
minify_html = true
generate_feeds = false
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = true
default_language = "en"
[languages.en.translations]
language_name = "English"
about = "About"
home = "Home"
tags = "Tags"
archive = "Archive"
links = "Links"
date_format = "%Y-%m-%d"
next_page = "Next Page"
last_page = "Last Page"
[languages.de.translations]
language_name = "Deutsch"
about = "Info"
home = "Home"
tags = "Kategorien"
archive = "Archiv"
links = "Links"
date_format = "%d-%m-%Y"
next_page = "Nächste Seite"
last_page = "Vorherige Seite"
[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true
render_emoji = true
lazy_async_image = true
bottom_footnotes = true
[slugify]
path_keep_dates = true
# [search]
# include_path = true
# include_date = true
# include_description = true
# include_content = true
# index_format = "fuse_json"
[extra]
# Put all your custom variables here

@ -0,0 +1,8 @@
+++
title = "index"
template = "index.html"
transparent = true
sort_by = "date"
paginate_by = 10
+++

@ -0,0 +1,8 @@
+++
title = "index"
template = "index.html"
transparent = true
sort_by = "date"
paginate_by = 10
+++

@ -0,0 +1,7 @@
+++
title = "About"
template = "about.html"
paginate_by = 0
+++
About this site

@ -0,0 +1,7 @@
+++
title = "About"
template = "about.html"
paginate_by = 0
+++
About this site

@ -0,0 +1,4 @@
+++
title = "archive"
template = "archive.html"
+++

@ -0,0 +1,4 @@
+++
title = "archive"
template = "archive.html"
+++

@ -0,0 +1,26 @@
+++
title = "Test post"
template = "page.html"
date = 2020-05-09
+++
# Test post
The content of the post
There should be a image below this.
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.
```cpp
void main (int[] args) {
cout << "Checking code syntax" << endl;
}
```

@ -0,0 +1,11 @@
; http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

@ -0,0 +1,4 @@
public/
.idea
.DS_Store
./**/.DS_Store

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
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 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.
For more information, please refer to <https://unlicense.org>

@ -0,0 +1,230 @@
# Anatole Theme for Zola
*[Anatole theme for Farbox](https://github.com/hi-caicai/farbox-theme-Anatole) ported to Zola*
___
[Zola Homepage](https://www.getzola.org/themes/anatole-zola/) | [Demo with customizations](https://longfangsong.github.io/)
___
![screenshot](./screenshot.png)
![screenshot-mobile](./screenshot-mobile.png)
![screenshot-dark](./screenshot-dark.png)
![screenshot-mobile-dark](./screenshot-mobile-dark.png)
## Installation
First download this theme to your `themes` directory:
```bash
$ cd themes
$ git clone https://github.com/longfangsong/anatole-zola.git
```
and then enable it in your `config.toml`:
```toml
theme = "anatole-zola"
```
And copy the `content/about`, `content/archive`, `content/_index.md` in the theme folder to your own content folder. And edit the `_index.md` in `about` folder to edit the content of your `about` page.
## Options
### Basic
Add `title`, `description` and `base_url`:
```toml
title = "Anatole"
description = "A other zola theme"
base_url = "https://example.com"
```
### Mode
Though the origin theme only support light mode, we added a dark mode option here.
You can either
- set the `extra.mode` field in `config.toml` to use the dark/light mode
- or set the `extra.default_mode` field in `config.toml` to read the dark/light mode from `localStorage` (the key is `'mode'`), and use some Javascript to control the theme each reader is using
- or do nothing, we'll use light mode by default
### Language
Currently, we have English, Chinese, German and Swedish translations, set the `default_language` if necessary:
```toml
# 如果你想要中文
default_language = "zh"
```
If there are complications, you can copy this snippet to your `config.toml`:
```toml
[languages.en.translations]
language_name = "English"
about = "About"
home = "Home"
tags = "Tags"
archive = "Archive"
links = "Links"
date_format = "%Y-%m-%d"
next_page = "Next Page"
last_page = "Last Page"
[languages.zh.translations]
language_name = "中文"
home = "首页"
about = "关于"
tags = "标签"
archive = "归档"
links = "友链"
date_format = "%Y-%m-%d"
next_page = "下一页"
last_page = "上一页"
[languages.de.translations]
language_name = "Deutsch"
about = "Info"
home = "Home"
tags = "Kategorien"
archive = "Archiv"
links = "Links"
date_format = "%d-%m-%Y"
next_page = "Nächste Seite"
last_page = "Vorherige Seite"
[languages.sv.translations]
language_name = "Svenska"
about = "Info"
home = "Hem"
tags = "Etiketter"
archive = "Arkiv"
links = "Länkar"
date_format = "%Y-%m-%d"
next_page = "Nästa Sidan"
last_page = "Sista Sidan"
```
Feel free to create a pull request if you want to translate the theme into other languages!
#### Multilingual
The theme will become multilingual automatically if you specify another language except `default_language`.
You'll see a language-switching button on top right.
### Sections
Tags and links sections are optional.
- If you want to enable the tags page, add
```toml
taxonomies = [
{name = "tags"},
]
[extra.show]
tags = true
```
To your `config.toml`
- If you want to enable the links page, add
```toml
[extra.show]
links = true
```
and copy `content/links` to your own `content` library. And edit the `_index.md` in it to modify its content.
- If you want to add the author's name on each page, add:
```toml
[extra]
author = "John Doe"
```
### Sidebar menu
We support a bunch of social links:
```toml
[extra.social]
github = ""
gitlab = ""
stackoverflow = "" # use user_id
twitter = ""
mastodon = "" # use hostname/@username
facebook = ""
instagram = ""
dribbble = ""
weibo = ""
linkedin = ""
flickr = ""
```
Fill in your username if you want! And the logo won't appear if you leave it empty.
### Comment system
We currently support...
- [Valine](https://valine.js.org/quickstart.html):
```toml
[extra.comment.valine]
appid = "Your appid goes here"
appkey = "Your appkey goes here"
notify = false # true/false: mail notify https://github.com/xCss/Valine/wiki/Valine-%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%8F%90%E9%86%92%E8%AE%BE%E7%BD%AE
verify = false # true/false: verify code
avatar = "mm" # avatar style https://github.com/xCss/Valine/wiki/avatar-setting-for-valine
placeholder = "Say something here"
```
- [Disqus](https://disqus.com/admin/create/), note that Disqus does not work in Mainland China:
```toml
[extra.comment.disqus]
name = "longfangsong"
```
- [Utterances](https://utteranc.es/):
```toml
[extra.comment.utterances]
repo = "Your repo for comments"
issue_term = "pathname"
theme = "github-light"
```
## Customize
There are several options I left in the origin templates for you to customize your site.
### More style
You can create a `blog.scss` or something similiar in the your `sass` folder, add a `templates.html` with following content:
```html
{% extends "anatole-zola/templates/basic.html" %}
{% block extra_head %}
<link rel="stylesheet" href="{{ get_url(path="blog.css") }}">
{% endblock %}
```
### More social links
You can add more social links by adding a `templates.html` with some content added to `more_social_link` block:
```html
{% extends "anatole-zola/templates/basic.html" %}
{% block more_social_link %}
<div id="pirate" data-wordart-src="//cdn.wordart.com/json/685czi4rqil5" style="width: 100%;" data-wordart-show-attribution></div>
{% endblock %}
```
If you want to use some awesome logos, [FontAwesome icons](https://fontawesome.com/icons?d=gallery) are already available.

@ -0,0 +1,98 @@
title = "Anatole"
description = "A other zola theme"
base_url = "https://example.com"
compile_sass = true
highlight_code = true
build_search_index = false
generate_feed = true
highlight_theme = "base16-ocean-light"
default_language = "en"
taxonomies = [
{name = "tags"},
]
[languages.en]
title = "Anatole"
description = "A other zola theme"
generate_feed = true
taxonomies = [
{name = "tags"},
]
[languages.zh]
title = "Anatole"
description = "A other zola theme"
generate_feed = true
taxonomies = [
{name = "tags"},
]
[languages.en.translations]
language_name = "English"
about = "About"
home = "Home"
tags = "Tags"
archive = "Archive"
links = "Links"
date_format = "%Y-%m-%d"
next_page = "Next Page"
last_page = "Last Page"
[languages.zh.translations]
language_name = "中文"
home = "首页"
about = "关于"
tags = "标签"
archive = "归档"
links = "友链"
date_format = "%Y-%m-%d"
next_page = "下一页"
last_page = "上一页"
[languages.de.translations]
language_name = "Deutsch"
about = "Info"
home = "Home"
tags = "Kategorien"
archive = "Archiv"
links = "Links"
date_format = "%d-%m-%Y"
next_page = "Nächste Seite"
last_page = "Vorherige Seite"
[languages.sv.translations]
language_name = "Svenska"
about = "Info"
home = "Hem"
tags = "Etiketter"
archive = "Arkiv"
links = "Länkar"
date_format = "%Y-%m-%d"
next_page = "Nästa Sidan"
last_page = "Sista Sidan"
[languages.ja.translations]
language_name = "日本語"
about = "About"
home = "Home"
tags = "タグ"
archive = "アーカイブ"
links = "リンク"
date_format = "%Y-%m-%d"
next_page = "次頁"
last_page = "前頁"
[extra.social]
github = ""
twitter = "w"
facebook = ""
instagram = "r"
dribbble = "t"
weibo = "y"
linkedin = ""
flickr = ""
[extra.show]
tags = true
links = true

@ -0,0 +1,8 @@
+++
title = "index"
template = "index.html"
transparent = true
sort_by = "date"
paginate_by = 10
+++

@ -0,0 +1,8 @@
+++
title = "index"
template = "index.html"
transparent = true
sort_by = "date"
paginate_by = 10
+++

@ -0,0 +1,8 @@
+++
title = "index"
template = "index.html"
transparent = true
sort_by = "date"
paginate_by = 10
+++

@ -0,0 +1,8 @@
+++
title = "index"
template = "index.html"
transparent = true
sort_by = "date"
paginate_by = 10
+++

@ -0,0 +1,7 @@
+++
title = "About"
template = "about.html"
paginate_by = 0
+++
About this site

@ -0,0 +1,7 @@
+++
title = "About"
template = "about.html"
paginate_by = 0
+++
About this site

@ -0,0 +1,7 @@
+++
title = "About"
template = "about.html"
paginate_by = 0
+++
About this site

@ -0,0 +1,7 @@
+++
title = "About"
template = "about.html"
paginate_by = 0
+++
About this site

@ -0,0 +1,4 @@
+++
title = "archive"
template = "archive.html"
+++

@ -0,0 +1,4 @@
+++
title = "archive"
template = "archive.html"
+++

@ -0,0 +1,4 @@
+++
title = "archive"
template = "archive.html"
+++

@ -0,0 +1,4 @@
+++
title = "archive"
template = "archive.html"
+++

@ -0,0 +1,8 @@
+++
title = "Links"
template = "links.html"
paginate_by = 0
+++
Extern links:
- [Origin theme demo](http://anatole.cai-cai.me)

@ -0,0 +1,8 @@
+++
title = "Links"
template = "links.html"
paginate_by = 0
+++
Extern links:
- [Origin theme demo](http://anatole.cai-cai.me)

@ -0,0 +1,8 @@
+++
title = "Links"
template = "links.html"
paginate_by = 0
+++
Extern links:
- [Origin theme demo](http://anatole.cai-cai.me)

@ -0,0 +1,8 @@
+++
title = "Links"
template = "links.html"
paginate_by = 0
+++
Extern links:
- [Origin theme demo](http://anatole.cai-cai.me)

@ -0,0 +1,139 @@
+++
title = "Basic Markdown syntax"
template = "page.html"
date = 2020-01-02T15:00:00Z
[taxonomies]
tags = ["markdown", "demo"]
[extra]
summary = "Shows how basic Markdown syntax are rendered"
mathjax = "tex-mml"
+++
<!-- more -->
## 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
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
#### Blockquote without attribution
> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use *Markdown syntax* within a blockquote.
#### Blockquote with attribution
> Don't communicate by sharing memory, share memory by communicating.</p>
> — <cite>Rob Pike[^1]</cite>
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
## Tables
Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Name | Age
--------|------
Bob | 27
Alice | 23
#### Inline Markdown within tables
| Inline&nbsp;&nbsp;&nbsp; | Markdown&nbsp;&nbsp;&nbsp; | In&nbsp;&nbsp;&nbsp; | Table |
| ---------- | --------- | ----------------- | ---------- |
| *italics* | **bold** | ~~strikethrough~~&nbsp;&nbsp;&nbsp; | `code` |
## Code Blocks
#### Code block with backticks
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
#### Code block indented with four spaces
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
## List Types
#### Ordered List
1. First item
2. Second item
3. Third item
#### Unordered List
* List item
* Another item
* And another item
#### Nested list
* Item
1. First Sub-item
2. Second Sub-item
* Item
- A
- B
## Other Elements — abbr, sub, sup, kbd, mark
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
## mathjax
$$
\displaylines{x = a + b \\\\ y = b + c}
$$
$$
\require{bussproofs}
\begin{prooftree}
\AxiomC{A}
\AxiomC{B}
\BinaryInfC{D}
\end{prooftree}
$$

@ -0,0 +1,12 @@
+++
title = "Basic Markdown syntax"
template = "page.html"
date = 2020-01-02T15:00:00Z
[taxonomies]
tags = ["markdown", "demo"]
[extra]
summary = "Shows how basic Markdown syntax are rendered"
mathjax = "tex-mml"
+++
可以使用中文!

@ -0,0 +1,7 @@
+++
title = "Post 6"
template = "page.html"
date = 2020-01-01T03:00:00Z
+++
## Post 6

@ -0,0 +1,7 @@
+++
title = "Post 6"
template = "page.html"
date = 2020-01-01T02:00:00Z
+++
## Post 6

@ -0,0 +1,18 @@
+++
title = "Short codes demo"
template = "page.html"
date = 2020-01-01T15:00:00Z
[taxonomies]
tags = ["demo"]
[extra]
summary = "A demo of using short codes"
+++
## Youtube (zola built in)
{{ youtube(id="IwPRu5FhfIQ", autoplay=true) }}
## Asciinema
{{ asciinema(id="pegRHrTsb4pRhkuBJE29kMMQ5") }}
## Bilibili
{{ bilibili(id="BV1tZ4y137qK") }}

@ -0,0 +1,7 @@
+++
title = "Post 3"
template = "page.html"
date = 2020-01-01T10:00:00Z
+++
## Post 3

@ -0,0 +1,7 @@
+++
title = "Post 4"
template = "page.html"
date = 2020-01-01T09:00:00Z
+++
## Post 4

@ -0,0 +1,7 @@
+++
title = "Post 5"
template = "page.html"
date = 2020-01-01T08:00:00Z
+++
## Post 5

@ -0,0 +1,7 @@
+++
title = "Post 6"
template = "page.html"
date = 2020-01-01T07:00:00Z
+++
## Post 6

@ -0,0 +1,7 @@
+++
title = "Post 7"
template = "page.html"
date = 2020-01-01T06:00:00Z
+++
## Post 7

@ -0,0 +1,7 @@
+++
title = "Post 8"
template = "page.html"
date = 2020-01-01T05:00:00Z
+++
## Post 8

@ -0,0 +1,7 @@
+++
title = "Post 6"
template = "page.html"
date = 2020-01-01T04:00:00Z
+++
## Post 6

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1,8 @@
{% extends "basic.html" %}
{% block content %}
<article class="post animated fadeInDown">
<h1><a href="{{ section.permalink }}"> {{ trans(key="about", lang=lang) }} </a></h1>
<div class="post-content">{{ section.content | safe }}</div>
</article>
{% endblock content %}

@ -0,0 +1,32 @@
{% extends "basic.html" %}
{% block content %}
<div class="archive animated fadeInDown">
<ul class="list-with-title">
{% if lang == config.default_language %}
{% set section_item = get_section(path="_index.md") %}
{% else %}
{% set path = "_index." ~ lang ~ ".md"%}
{% set section_item = get_section(path=path) %}
{% endif %}
{% for year, posts in section_item.pages | group_by(attribute="year") %}
{% set language_posts = posts | filter(attribute="lang", value=lang) %}
{% if language_posts | length > 0 %}
<div class="listing-title">{{ year }}</div>
<ul class="listing">
{% for post in language_posts %}
<div class="listing-item">
<div class="listing-post">
<a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title }}</a>
<div class="post-time">
<span class="date">{{ post.date | date(format=trans(key="date_format", lang=lang)) }}</span>
</div>
</div>
</div>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
</div>
{% endblock content %}

@ -0,0 +1,173 @@
<!DOCTYPE html>
<html lang="en" {% if config.extra.mode %} class="theme--{{config.extra.mode}}" {% else %} class="theme--light" {% endif
%}>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, viewport-fit=cover">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ get_url(path="images/apple-touch-icon-144x144.png",
trailing_slash=false) }}" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="{{ get_url(path="images/apple-touch-icon-120x120.png",
trailing_slash=false) }}" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ get_url(path="images/apple-touch-icon-72x72.png",
trailing_slash=false) }}" />
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="{{ get_url(path="images/apple-touch-icon-57x57.png",
trailing_slash=false) }}" />
<link rel="short icon" href="{{ get_url(path="images/favicon.png") }}" type="image/x-icon" />
<link rel="stylesheet" href="{{ get_url(path="style.css") }}">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" rel="stylesheet">
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
{% if config.generate_feed %}
{% block rss %}
<link rel="alternate" type="application/rss+xml" title="{{ config.title }}" href="{{ get_url(path="rss.xml",
trailing_slash=false, lang=lang) }}">
{% endblock rss %}
{% endif %}
{% block extra_head %}
{% endblock extra_head %}
</head>
<body>
<div id="sidebar" class="animated fadeInDown">
<div class="logo-title">
<div class="title">
<img src={{ get_url(path="images/logo@2x.png" ) }} style="width:127px;" alt="logo" />
<h3><a href="{{ get_url(path="@/_index.md", lang=lang) }}">{{ config.title }}</a></h3>
<div class="description">
<p>{{ config.description }}</p>
</div>
</div>
</div>
<ul class="social-links">
{%- if config.extra.social.github -%}
<li><a href="https://github.com/{{ config.extra.social.github }}" aria-label="Go to Github profile page"><i class="fab fa-github"></i></a></li>
{%- endif -%}
{%- if config.extra.social.gitlab -%}
<li><a href="https://gitlab.com/{{ config.extra.social.gitlab }}" aria-label="Go to Gitlab profile page"><i class="fab fa-gitlab"></i></a></li>
{%- endif -%}
{%- if config.extra.social.stackoverflow -%}
<li>
<a href="https://stackoverflow.com/users/{{ config.extra.social.stackoverflow }}" aria-label="Go to StackOverflow profile page">
<i class="fab fa-stack-overflow"></i>
</a>
</li>
{%- endif -%}
{%- if config.extra.social.twitter -%}
<li><a href="https://twitter.com/{{ config.extra.social.twitter }}" aria-label="Go to Twitter profile page"><i class="fab fa-twitter"></i></a></li>
{%- endif -%}
{%- if config.extra.social.mastodon -%}
<li><a rel="me" href="https://{{ config.extra.social.mastodon }}"
aria-label="Go to Mastodon profile page"><i class="fab fa-mastodon"></i></a>
</li>
{%- endif -%}
{% if config.extra.social.facebook -%}
<li><a href="https://www.facebook.com/{{ config.extra.social.facebook }}" aria-label="Go to FaceBook profile page"><i class="fab fa-facebook"></i></a></li>
{%- endif -%}
{%- if config.extra.social.instagram -%}
<li><a href="https://www.instagram.com/{{ config.extra.social.instagram }}" aria-label="Go to Instagram profile page"><i class="fab fa-instagram"></i></a>
</li>
{%- endif -%}
{%- if config.extra.social.dribbble -%}
<li><a href="https://dribbble.com/{{ config.extra.social.dribbble }}" aria-label="Go to Dribbble profile page"><i class="fab fa-dribbble"></i></a></li>
{%- endif -%}
{%- if config.extra.social.weibo -%}
<li><a href="https://weibo.com/{{ config.extra.social.weibo }}" aria-label="Go to weibo profile page"><i class="fab fa-weibo"></i></a></li>
{%- endif -%}
{%- if config.extra.social.linkedin -%}
<li><a href="https://linkedin.com/in/{{ config.extra.social.linkedin }}" aria-label="Go to Linkedin profile page"><i class="fab fa-linkedin"></i></a></li>
{%- endif -%}
{%- if config.extra.social.flickr -%}
<li><a href="https://www.flickr.com/photos/{{ config.extra.social.flickr }}" aria-label="Go to Flickr profile page"><i class="fab fa-flickr"></i></a>
</li>
{%- endif -%}
{% block more_social_link %}
{% endblock more_social_link %}
</ul>
<div class="footer">
{% block footer %}
<span>Designed by </span><a href="https://www.caicai.me">CaiCai</a>
<div class="by_zola"><a href="https://www.getzola.org/" target="_blank">Proudly published with Zola!</a></div>
{% endblock footer %}
</div>
</div>
<div id="main">
<div class="page-top animated fadeInDown">
<div class="nav">
{% set current_url_str = current_url | as_str %}
{% set language_site_base = get_url(path="@/_index.md", lang=lang) | as_str %}
{% set language_site_path_without_prefix = current_url | trim_start_matches(pat=language_site_base) |
trim_end_matches(pat="/") %}
{% set language_site_path = '/' ~ language_site_path_without_prefix %}
<li><a {% if language_site_path=="/" or language_site_path is starting_with("/page/") %}class="current" {% endif
%} href="{{ get_url(path="@/_index.md", lang=lang) }}">{{ trans(key="home", lang=lang) }}</a></li>
<li><a {% if language_site_path is starting_with("/about") %}class="current" {% endif %} href="{{ get_url(path="@/about/_index.md", lang=lang) }}">{{ trans(key="about", lang=lang) }}</a></li>
{%- if config.extra.show.tags -%}
<li><a {% if language_site_path is starting_with("/tags") %}class="current" {% endif %} href="{{ get_url(path="@/_index.md", lang=lang) }}tags">{{ trans(key="tags", lang=lang) }}</a></li>
{%- endif -%}
<li><a {% if language_site_path is starting_with("/archive") %}class="current" {% endif %}
href="{{ get_url(path="@/archive/_index.md", lang=lang) }}">{{ trans(key="archive", lang=lang) }}</a></li>
{%- if config.extra.show.links -%}
<li><a {% if language_site_path is starting_with("/links") %}class="current" {% endif %} href="{{ get_url(path="@/links/_index.md", lang=lang) }}">{{ trans(key="links", lang=lang) }}</a></li>
{%- endif -%}
</div>
<div class="information">
<div class="back_btn">
<a onclick="window.history.go(-1)" {% if language_site_path=="/" %}style="display:none;" {% endif %}><i
class="fas fa-chevron-left"></i></a>
</div>
{% set language_count = 1 %}
{% for language_name, language in config.languages %}
{% set_global language_count = language_count + 1 %}
{% endfor %}
{% if language_count > 1 %}
<div id="language-switch">
<button onclick="showLanguages()" aria-label="show languages"><i class="fas fa-globe"></i></button>
<div id="languages" style="display: none">
{% for language_name, language in config.languages %}
<a onclick="window.location.href='{{ get_url(path="@/about/_index.md", lang=language_name) |
trim_end_matches(pat='about/' )}}'"> {{ trans(key="language_name", lang=language_name) }} </a>
{% endfor %}
</div>
</div>
{% endif %}
<div class="avatar"><img src="{{ get_url(path="images/avatar.jpg") }}"></div>
</div>
</div>
<div class="autopagerize_page_element">
<div class="content">
{% block content %}
{% endblock content %}
</div>
</div>
</div>
{% if config.extra.mode %}
{% elif config.extra.default_mode %}
<script>
window.onload = function () {
const currentTheme = localStorage.getItem('theme');
const element = document.getElementsByTagName("html")[0];
if (currentTheme) {
element.classList.remove('theme--light');
element.classList.add('theme--' + currentTheme);
} else {
localStorage.setItem('theme', '{{config.extra.default_mode}}');
element.classList.remove('theme--light');
element.classList.add('theme--{{config.extra.default_mode}}');
}
}
</script>
{% endif %}
<script>
function showLanguages() {
let currentDisplay = document.getElementById("languages").style.display;
if (currentDisplay == 'none') {
document.getElementById("languages").style.display = 'block';
} else {
document.getElementById("languages").style.display = 'none';
}
}
</script>
</body>
</html>

@ -0,0 +1,42 @@
{% if config.extra.comment.disqus %}
<a id="comments"></a>
<div id="disqus_thread"></div>
<script>
var disqus_shortname = "{{ config.extra.comment.disqus.name }}";
(function() {
var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
})();
</script>
<script id="dsq-count-scr" src="//{{ config.extra.comment.disqus.name }}.disqus.com/count.js" async></script>
{% endif %}
{% if config.extra.comment.valine %}
<a id="comments"></a>
<div id="vcomments" style="margin: 30px;"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//unpkg.com/valine/dist/Valine.min.js"></script>
<script>
var valine = new Valine({
el: "#vcomments",
notify: "{{ config.extra.comment.valine.notify }}" || false,
verify: "{{ config.extra.comment.valine.verify }}" || false,
app_id: "{{ config.extra.comment.valine.appid }}",
app_key: "{{ config.extra.comment.valine.appkey }}",
placeholder: "{{ config.extra.comment.valine.placeholder }}",
path: window.location.pathname,
avatar: "{{ config.extra.comment.valine.avatar }}"
});
</script>
{% endif %}
{% if config.extra.comment.utterances %}
<script src="https://utteranc.es/client.js"
repo="{{ config.extra.comment.utterances.repo }}"
issue-term="{{ config.extra.comment.utterances.issue_term }}"
theme="{{ config.extra.comment.utterances.theme }}"
crossorigin="anonymous"
async>
</script>
{% endif %}

@ -0,0 +1,60 @@
{% extends "basic.html" %}
{% block content %}
{% for page in paginator.pages %}
<section class="post animated fadeInDown">
<div class="post-title">
<h3><a href="{{ page.permalink }}">{{ page.title }}</a></h3>
</div>
<div class="post-content">
<p>
{% if page.extra.summary %}
{{ page.extra.summary | safe | striptags }}
{% else %}
{{ page.content | safe | striptags | truncate(length=100) }}
{% endif %}
</p>
</div>
<div class="post-footer">
<div class="meta">
<div class="info">
{% if page.date %}
<i class="far fa-sun"></i>
<span class="date">
{{ page.date | date(format=trans(key="date_format", lang=lang)) }}
</span>
{% endif %}
{% if config.extra.comment %}
<i class="far fa-comments"></i>
<a href="{{ page.permalink }}#comments">Comments</a>
{% endif %}
{% if page.taxonomies.tags %}
<i class="fas fa-tags"></i>
{% for tag in page.taxonomies.tags %}
<a class="tag" href="{{ get_taxonomy_url(kind="tags", name=tag, lang=page.lang) | safe }}">&nbsp;{{tag}}</a>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</section>
{% endfor %}
<div class="pagination">
<ul class="clearfix">
{% if paginator.next %}
<li class="next pagbuttons">
<a class="btn" role="navigation" href="{{ paginator.next }}" aria-label="{{ trans(key="next_page", lang=lang) }}">
{{ trans(key="next_page", lang=lang) }}
</a>
</li>
{% endif %}
{% if paginator.previous %}
<li class="pre pagbuttons">
<a class="btn" role="navigation" href="{{ paginator.previous }}" aria-label="{{ trans(key="last_page", lang=lang) }}">
{{ trans(key="last_page", lang=lang) }}
</a>
</li>
{% endif %}
</ul>
</div>
{% endblock content %}

@ -0,0 +1,8 @@
{% extends "basic.html" %}
{% block content %}
<article class="post animated fadeInDown">
<h1><a href="{{ section.permalink }}"> {{ trans(key="links", lang=lang) }} </a></h1>
<div class="post-content">{{ section.content | safe }}</div>
</article>
{% endblock content %}

@ -0,0 +1,68 @@
{% extends "basic.html" %}
{% block title %}{{ config.title }} • {{ page.title }}{% endblock title %}
{% block content %}
<article class="post animated fadeInDown">
<h1><a href="{{ page.permalink }}">{{ page.title }}</a></h1>
{% if page.extra.author %}
<div class="info">By {{ page.extra.author }}.</div>
{% endif %}
<div class="post-content">{{ page.content | safe }}</div>
<div class="post-footer">
<div class="meta">
<div class="info">
{% if page.date %}
<i class="far fa-sun"></i><span class="date">{{ page.date | date(format=trans(key="date_format", lang=lang))
}}</span>
{% endif %}
{% if page.taxonomies.tags %}
<i class="fas fa-tags"></i>
{% for tag in page.taxonomies.tags %}
<a class="tag" href="{{ get_url(path="@/_index.md", lang=lang) }}tags/{{tag}}">&nbsp;{{tag}}</a>
{% endfor %}
{% endif %}
</div>
</div>
</div>
</article>
<div class="share">
<div class="weibo">
<a class="fab fa-weibo"
href="javascript:void((function(s,d,e){try{}catch(e){}var f='http://service.weibo.com/share/share.php?',u=d.location.href,p=['url=',e(u),'&title=',e(d.title),'&appkey=2924220432'].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width-620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(screen,document,encodeURIComponent));"></a>
</div>
<div class="twitter">
<a class="fab fa-twitter"
href="http://twitter.com/share?text={{ page.title }}&url={{ page.permalink | trim_end_matches(pat=" /") }}{% if
page.taxonomies.tags %}&hashtags={{ page.taxonomies.tags | join(sep="," ) }}{% endif %}"></a>
</div>
</div>
{% include "comments.html" %}
{% if page.extra.mathjax %}
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script>
MathJax = {
tex: {
displayMath: [['$$', '$$'], ["\\[", "\\]"]],
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/{{ page.extra.mathjax }}-chtml.js">
</script>
{% endif %}
{% if page.extra.tikzjax %}
<link rel="stylesheet" type="text/css" href="https://tikzjax.com/v1/fonts.css">
<style>
.tikz>svg {
overflow: visible;
}
</style>
<script src="{{ get_url(path="js/tikzjax.js", trailing_slash=false) }}"></script>
{% endif %}
{% if page.extra.mermaid %}
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<script>mermaid.initialize({ startOnLoad: true });</script>
{% endif %}
{% endblock content %}

@ -0,0 +1 @@
<script id="asciicast-{{id}}" src="https://asciinema.org/a/{{id}}.js" async></script>

@ -0,0 +1 @@
<iframe src="//player.bilibili.com/player.html?aid=798317579&bvid={{id}}&cid=273252363&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>

@ -0,0 +1,3 @@
<div class="mermaid">
{{ body }}
</div>

@ -0,0 +1,5 @@
<div class="tikz">
<script type="text/tikz">
{{ body | safe }}
</script>
</div>

@ -0,0 +1,5 @@
<div {% if class %}class="{{class}}" {% endif %}>
<iframe src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" webkitallowfullscreen
mozallowfullscreen allowfullscreen>
</iframe>
</div>

@ -0,0 +1,15 @@
{% extends "basic.html" %}
{% block content %}
<div class="archive animated fadeInDown">
<ul class="list-with-title">
<div class="listing-title">{{ trans(key="tags", lang=lang) }}</div>
{% for term in terms %}
<li class="tag-list-item">
<a class="tagname" href="{{ term.permalink }}">{{ term.name }}</a>
<span class="tagcount">{{ term.pages | length }}</span>
</li>
{% endfor %}
</ul>
</div>
{% endblock content %}

@ -0,0 +1,23 @@
{% extends "basic.html" %}
{% block content %}
<div class="archive animated fadeInDown">
<ul class="list-with-title">
<div class="archive">
<div class="listing-title">{{ term.name }}</div>
<ul class="listing">
{% for post in term.pages %}
<div class="listing-item">
<div class="listing-post">
<a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.title }}</a>
<div class="post-time">
<span class="date">{{ post.date | date(format=trans(key="date_format", lang=lang)) }}</span>
</div>
</div>
</div>
{% endfor %}
</ul>
</div>
</ul>
</div>
{% endblock content %}

@ -0,0 +1,22 @@
name = "anatole-zola"
description = "A port of farbox-theme-Anatole for zola"
license = "MIT"
homepage = "https://github.com/longfangsong/anatole-zola"
min_version = "0.4.0"
demo = "https://longfangsong.github.io"
[extra]
# Note the origin design is from https://github.com/hi-caicai/farbox-theme-Anatole
# The author just port the code into zola
# See the [original] section
[author]
name = "longfangsong"
homepage = "https://github.com/longfangsong"
[original]
author = "hi-caicai"
homepage = "http://anatole.cai-cai.me/"
repo = "https://github.com/hi-caicai/farbox-theme-Anatole"
# also thanks the [Hexo Porting](https://github.com/Ben02/hexo-theme-Anatole)
# and [Hugo Porting](https://github.com/lxndrblz/anatole)
Loading…
Cancel
Save