Fix styling and chart
This commit is contained in:
parent
1e59d2d9bd
commit
c009060884
|
@ -1,14 +1,74 @@
|
||||||
# Binaries for programs and plugins
|
|
||||||
*.exe
|
|
||||||
*.dll
|
|
||||||
*.so
|
|
||||||
*.dylib
|
|
||||||
|
|
||||||
# Test binary, build with `go test -c`
|
# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,windows
|
||||||
*.test
|
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,windows
|
||||||
|
|
||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
### Linux ###
|
||||||
*.out
|
*~
|
||||||
|
|
||||||
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
.glide/
|
.fuse_hidden*
|
||||||
|
|
||||||
|
# KDE directory preferences
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# Linux trash folder which might appear on any partition or disk
|
||||||
|
.Trash-*
|
||||||
|
|
||||||
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
|
.nfs*
|
||||||
|
|
||||||
|
### macOS ###
|
||||||
|
# General
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Icon must end with two \r
|
||||||
|
Icon
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear in the root of a volume
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
|
|
||||||
|
### Windows ###
|
||||||
|
# Windows thumbnail cache files
|
||||||
|
Thumbs.db
|
||||||
|
Thumbs.db:encryptable
|
||||||
|
ehthumbs.db
|
||||||
|
ehthumbs_vista.db
|
||||||
|
|
||||||
|
# Dump file
|
||||||
|
*.stackdump
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
[Dd]esktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Windows Installer files
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# Windows shortcuts
|
||||||
|
*.lnk
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/linux,macos,windows
|
||||||
|
|
18
README.md
18
README.md
|
@ -57,12 +57,12 @@ access_token = "<your_access_token>"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- [x] Pagination
|
- [x] Pagination
|
||||||
- [x] Search
|
- [x] Search
|
||||||
- [x] Charts
|
- [x] Charts
|
||||||
- [x] Maps
|
- [x] Maps
|
||||||
- [x] Diagrams
|
- [x] Diagrams
|
||||||
- [x] Analytics
|
- [x] Analytics
|
||||||
- [x] Comments
|
- [x] Comments
|
||||||
- [x] Categories
|
- [x] Categories
|
||||||
- [ ] Social Links
|
- [x] Social Links
|
||||||
|
|
|
@ -10,7 +10,7 @@ taxonomies = [
|
||||||
{ name = "tags", fees = true, paginate_by = 10 },
|
{ name = "tags", fees = true, paginate_by = 10 },
|
||||||
]
|
]
|
||||||
languages = []
|
languages = []
|
||||||
compile_sass = false
|
compile_sass = true
|
||||||
build_search_index = true
|
build_search_index = true
|
||||||
ignored_content = []
|
ignored_content = []
|
||||||
extra_syntaxes = []
|
extra_syntaxes = []
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -9,30 +9,13 @@ tags = ["theme", "zola"]
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
toc = true
|
toc = true
|
||||||
comments = false
|
comments = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
DeepThought theme provides multiple shortcodes on top of built-in ones in Zola.
|
DeepThought theme provides multiple shortcodes on top of built-in ones in Zola.
|
||||||
|
|
||||||
<!-- more -->
|
<!-- more -->
|
||||||
|
|
||||||
# Quote
|
|
||||||
|
|
||||||
To put a quote in your post use the below snippet
|
|
||||||
**Code**
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
{%/* quote(author="Winston Churchill") */%}
|
|
||||||
Success is not final, failure is not fatal: it is the courage to continue that counts.
|
|
||||||
{%/* end */%}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Output**
|
|
||||||
|
|
||||||
{% quote(author="Winston Churchill") %}
|
|
||||||
Success is not final, failure is not fatal: it is the courage to continue that counts.
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
# Mermaid
|
# Mermaid
|
||||||
|
|
||||||
[mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
|
[mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
|
||||||
|
@ -40,6 +23,7 @@ Success is not final, failure is not fatal: it is the courage to continue that c
|
||||||
## Flowchart
|
## Flowchart
|
||||||
|
|
||||||
To put a flowchart in your post use below snippet
|
To put a flowchart in your post use below snippet
|
||||||
|
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -64,6 +48,7 @@ C-->D;
|
||||||
## Sequence Diagram
|
## Sequence Diagram
|
||||||
|
|
||||||
To put a sequence diagram in your post use below snippet
|
To put a sequence diagram in your post use below snippet
|
||||||
|
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -100,6 +85,7 @@ Bob-->>John: Jolly good!
|
||||||
## Gantt diagram
|
## Gantt diagram
|
||||||
|
|
||||||
To put a gantt diagram in your post use below snippet
|
To put a gantt diagram in your post use below snippet
|
||||||
|
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -132,8 +118,9 @@ Future task : des3, after des2, 5d
|
||||||
Future task2 : des4, after des3, 5d
|
Future task2 : des4, after des3, 5d
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
## Class diagram - exclamation experimental
|
## Class diagram - experimental
|
||||||
To put a class diagram in your post use below snippet
|
To put a class diagram in your post use below snippet
|
||||||
|
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -173,8 +160,9 @@ Class01 : int gorilla
|
||||||
Class08 <--> C2: Cool label
|
Class08 <--> C2: Cool label
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
## Git graph - exclamation experimental
|
## Git graph - experimental
|
||||||
To put a git graph in your post use below snippet
|
To put a git graph in your post use below snippet
|
||||||
|
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -218,7 +206,7 @@ commit
|
||||||
merge newbranch
|
merge newbranch
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
## Entity Relationship Diagram - exclamation experimental
|
## Entity Relationship Diagram - experimental
|
||||||
To put an ER diagram in your post use below snippet
|
To put an ER diagram in your post use below snippet
|
||||||
**Code**
|
**Code**
|
||||||
|
|
||||||
|
@ -289,17 +277,33 @@ Sit down: 5: Me
|
||||||
```markdown
|
```markdown
|
||||||
{%/* chart() */%}
|
{%/* chart() */%}
|
||||||
{
|
{
|
||||||
"type": "bar",
|
"type": "bar",
|
||||||
"data": {
|
"data": {
|
||||||
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
||||||
"datasets": [{
|
"datasets": [
|
||||||
"label": "# of Votes",
|
{
|
||||||
"data": [12, 19, 3, 5, 8, 3],
|
"label": "# of Votes",
|
||||||
"backgroundColor": ["rgba(255, 99, 132, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(255, 206, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(255, 159, 64, 0.2)"],
|
"data": [12, 19, 3, 5, 8, 3],
|
||||||
"borderColor": ["rgba(255, 99, 132, 1)", "rgba(54, 162, 235, 1)", "rgba(255, 206, 86, 1)", "rgba(75, 192, 192, 1)", "rgba(153, 102, 255, 1)", "rgba(255, 159, 64, 1)"],
|
"backgroundColor": [
|
||||||
"borderWidth": 1
|
"rgba(255, 99, 132, 0.2)",
|
||||||
}]
|
"rgba(54, 162, 235, 0.2)",
|
||||||
}
|
"rgba(255, 206, 86, 0.2)",
|
||||||
|
"rgba(75, 192, 192, 0.2)",
|
||||||
|
"rgba(153, 102, 255, 0.2)",
|
||||||
|
"rgba(255, 159, 64, 0.2)"
|
||||||
|
],
|
||||||
|
"borderColor": [
|
||||||
|
"rgba(255, 99, 132, 1)",
|
||||||
|
"rgba(54, 162, 235, 1)",
|
||||||
|
"rgba(255, 206, 86, 1)",
|
||||||
|
"rgba(75, 192, 192, 1)",
|
||||||
|
"rgba(153, 102, 255, 1)",
|
||||||
|
"rgba(255, 159, 64, 1)"
|
||||||
|
],
|
||||||
|
"borderWidth": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{%/* end */%}
|
{%/* end */%}
|
||||||
```
|
```
|
||||||
|
@ -307,16 +311,32 @@ Sit down: 5: Me
|
||||||
**Output**
|
**Output**
|
||||||
{% chart() %}
|
{% chart() %}
|
||||||
{
|
{
|
||||||
"type": "bar",
|
"type": "bar",
|
||||||
"data": {
|
"data": {
|
||||||
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
||||||
"datasets": [{
|
"datasets": [
|
||||||
"label": "# of Votes",
|
{
|
||||||
"data": [12, 19, 3, 5, 8, 3],
|
"label": "# of Votes",
|
||||||
"backgroundColor": ["rgba(255, 99, 132, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(255, 206, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(255, 159, 64, 0.2)"],
|
"data": [12, 19, 3, 5, 8, 3],
|
||||||
"borderColor": ["rgba(255, 99, 132, 1)", "rgba(54, 162, 235, 1)", "rgba(255, 206, 86, 1)", "rgba(75, 192, 192, 1)", "rgba(153, 102, 255, 1)", "rgba(255, 159, 64, 1)"],
|
"backgroundColor": [
|
||||||
"borderWidth": 1
|
"rgba(255, 99, 132, 0.2)",
|
||||||
}]
|
"rgba(54, 162, 235, 0.2)",
|
||||||
}
|
"rgba(255, 206, 86, 0.2)",
|
||||||
|
"rgba(75, 192, 192, 0.2)",
|
||||||
|
"rgba(153, 102, 255, 0.2)",
|
||||||
|
"rgba(255, 159, 64, 0.2)"
|
||||||
|
],
|
||||||
|
"borderColor": [
|
||||||
|
"rgba(255, 99, 132, 1)",
|
||||||
|
"rgba(54, 162, 235, 1)",
|
||||||
|
"rgba(255, 206, 86, 1)",
|
||||||
|
"rgba(75, 192, 192, 1)",
|
||||||
|
"rgba(153, 102, 255, 1)",
|
||||||
|
"rgba(255, 159, 64, 1)"
|
||||||
|
],
|
||||||
|
"borderWidth": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{% end %}
|
{% end %}
|
||||||
|
|
|
@ -83,10 +83,6 @@ We have them!
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## BlockQuotes
|
|
||||||
{% quote(author="Noam Chomsky") %}Language is a process of free creation; its laws and principles are fixed, but the manner in which the principles of generation are used is free and infinitely varied. Even the interpretation and use of words involves a process of free creation.
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
## Youtube
|
## Youtube
|
||||||
|
|
||||||
with `youtube(id="the_id_here")`
|
with `youtube(id="the_id_here")`
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
@import "https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;515;600;700&display=swap";
|
||||||
|
|
||||||
|
$font-stack: "Fira Code", monospace;
|
||||||
|
|
||||||
|
$link: #363636;
|
||||||
|
$link-hover: #2d96bd;
|
||||||
|
|
||||||
|
$read-more: #2d96bd;
|
||||||
|
$read-more-hover: #ef3982;
|
||||||
|
|
||||||
|
body {
|
||||||
|
font: 100% $font-stack;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.center {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.link {
|
||||||
|
color: $link;
|
||||||
|
&:hover {
|
||||||
|
color: $link-hover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.read-more {
|
||||||
|
color: $read-more;
|
||||||
|
&:hover {
|
||||||
|
color: $read-more-hover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$breakpoint-mobile: 768px;
|
||||||
|
@media (max-width: $breakpoint-mobile) {
|
||||||
|
body {
|
||||||
|
font: 85% $font-stack;
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -1 +0,0 @@
|
||||||
@import "https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;515;600;700&display=swap";body{font:100% "Fira Code",monospace;display:flex;flex-direction:column;min-height:100vh}main{flex:1}.center{display:flex;justify-content:center;align-items:center}.link{color:#363636}.link:hover{color:#2d96bd}.read-more{color:#2d96bd}.read-more:hover{color:#ef3982}
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,22 @@
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const $navbarBurgers = Array.prototype.slice.call(
|
||||||
|
document.querySelectorAll(".navbar-burger"),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($navbarBurgers.length > 0) {
|
||||||
|
$navbarBurgers.forEach((el) => {
|
||||||
|
el.addEventListener("click", () => {
|
||||||
|
const target = el.dataset.target;
|
||||||
|
const $target = document.getElementById(target);
|
||||||
|
|
||||||
|
el.classList.toggle("is-active");
|
||||||
|
$target.classList.toggle("is-active");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function debounce(func, wait) {
|
function debounce(func, wait) {
|
||||||
var timeout;
|
var timeout;
|
||||||
|
|
||||||
|
@ -24,7 +43,7 @@ function makeTeaser(body, terms) {
|
||||||
});
|
});
|
||||||
var termFound = false;
|
var termFound = false;
|
||||||
var index = 0;
|
var index = 0;
|
||||||
var weighted = []; // contains elements of ["word", weight, index_in_document]
|
var weighted = []; // contains elements of ['word', weight, index_in_document]
|
||||||
|
|
||||||
// split in sentences, then words
|
// split in sentences, then words
|
||||||
var sentences = body.toLowerCase().split(". ");
|
var sentences = body.toLowerCase().split(". ");
|
||||||
|
@ -113,13 +132,13 @@ function makeTeaser(body, terms) {
|
||||||
|
|
||||||
function formatSearchResultItem(item, terms) {
|
function formatSearchResultItem(item, terms) {
|
||||||
return (
|
return (
|
||||||
`<article class="box">` +
|
`<article class='box'>` +
|
||||||
`<h1 class="title is-4">` +
|
`<h1 class='title is-4'>` +
|
||||||
`<a class="link" class="link" href="${item.ref}">${item.doc.title}</a>` +
|
`<a class='link' class='link' href='${item.ref}'>${item.doc.title}</a>` +
|
||||||
`</h1>` +
|
`</h1>` +
|
||||||
`<div class="content mt-2">` +
|
`<div class='content mt-2'>` +
|
||||||
`${makeTeaser(item.doc.body, terms)}` +
|
`${makeTeaser(item.doc.body, terms)}` +
|
||||||
`<a class="read-more" href="${item.ref}">` +
|
`<a class='read-more' href='${item.ref}'>` +
|
||||||
`Read More` +
|
`Read More` +
|
||||||
`</a>` +
|
`</a>` +
|
||||||
`</div>` +
|
`</div>` +
|
||||||
|
@ -203,7 +222,7 @@ document
|
||||||
modal.classList.remove("is-active");
|
modal.classList.remove("is-active");
|
||||||
html.classList.remove("is-clipped");
|
html.classList.remove("is-clipped");
|
||||||
});
|
});
|
||||||
|
|
||||||
document.querySelector(".delete").addEventListener("click", function (e) {
|
document.querySelector(".delete").addEventListener("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
modal.classList.remove("is-active");
|
modal.classList.remove("is-active");
|
|
@ -1,28 +1,28 @@
|
||||||
{% extends "base.html" %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<main class="hero">
|
<main class='hero'>
|
||||||
<div class="hero-body">
|
<div class='hero-body'>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<div class="columns">
|
<div class='columns'>
|
||||||
<div class="column is-three-fifths is-offset-one-fifth">
|
<div class='column is-three-fifths is-offset-one-fifth'>
|
||||||
<figure class="image center mb-2">
|
<figure class='image center mb-2'>
|
||||||
<img class="is-rounded card" src="{{config.extra.author.avatar}}" style="max-width: 150px">
|
<img class='is-rounded card' src='{{config.extra.author.avatar}}' style='max-width: 150px'>
|
||||||
</figure>
|
</figure>
|
||||||
<div class="has-text-centered">
|
<div class='has-text-centered'>
|
||||||
<h1 class="title">
|
<h1 class='title'>
|
||||||
HTTP 404
|
HTTP 404
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="subtitle">
|
<h2 class='subtitle'>
|
||||||
It seems you are looking for something that I don't have.
|
It seems you are looking for something that I don't have.
|
||||||
</h2>
|
</h2>
|
||||||
<p class="is-size-4">
|
<p class='is-size-4'>
|
||||||
{{ macros:: social_links( social_config=config.extra.social) }}
|
{{ macros:: social_links( social_config=config.extra.social) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<p class="has-text-centered">
|
<p class='has-text-centered'>
|
||||||
<a class="link" href="{{ config.base_url }}">
|
<a class='link' href='{{ config.base_url }}'>
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,56 +1,65 @@
|
||||||
{% import "macros.html" as macros %}
|
{% import 'macros.html' as macros %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset='utf-8'>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||||
|
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name='theme-color' content='#ffffff'>
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<meta name='msapplication-TileColor' content='#da532c'>
|
||||||
<link rel="manifest" href="{{config.extra.favicon.webmanifest}}">
|
<link rel='manifest' href='{{config.extra.favicon.webmanifest}}'>
|
||||||
<link rel="mask-icon" href="{{config.extra.favicon.safari_pinned_tab}}" color="#5bbad5" />
|
<link rel='mask-icon' href='{{config.extra.favicon.safari_pinned_tab}}' color='#5bbad5' />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="{{config.extra.favicon.favicon_16x16}}" />
|
<link rel='icon' type='image/png' sizes='16x16' href='{{config.extra.favicon.favicon_16x16}}' />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="{{config.extra.favicon.favicon_32x32}}" />
|
<link rel='icon' type='image/png' sizes='32x32' href='{{config.extra.favicon.favicon_32x32}}' />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{config.extra.favicon.apple_touch_icon}}" />
|
<link rel='apple-touch-icon' sizes='180x180' href='{{config.extra.favicon.apple_touch_icon}}' />
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.0/css/bulma.min.css" />
|
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bulma@0.9.0/css/bulma.min.css' />
|
||||||
<link rel="stylesheet" href="{{ get_url(path="css/style.min.css") }}" />
|
<link rel='stylesheet' href='{{ get_url(path='site.css') }}' />
|
||||||
|
|
||||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||||
|
|
||||||
{{ macros::google_analytics(gtag=config.extra.analytics.google) }}
|
{% if config.extra.analytics.google %}
|
||||||
|
<script src='https://www.googletagmanager.com/gtag/js?id={{ config.extra.analytics.google }}' async></script>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag() { dataLayer.push(arguments); }
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', '{{ config.extra.analytics.google }}');
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="site">
|
<body class='site'>
|
||||||
{% block nav %}
|
{% block nav %}
|
||||||
<nav class="navbar is-light" role="navigation" aria-label="main navigation">
|
<nav class='navbar is-light' role='navigation' aria-label='main navigation'>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<div class="navbar-brand">
|
<div class='navbar-brand'>
|
||||||
<a class="navbar-item has-text-weight-bold" href="/">{{ config.title }}</a>
|
<a class='navbar-item has-text-weight-bold' href='/'>{{ config.title }}</a>
|
||||||
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
|
<a role='button' class='navbar-burger burger' aria-label='menu' aria-expanded='false'
|
||||||
data-target="navMenu">
|
data-target='navMenu'>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden='true'></span>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden='true'></span>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden='true'></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="navMenu" class="navbar-menu">
|
<div id='navMenu' class='navbar-menu'>
|
||||||
<div class="navbar-end">
|
<div class='navbar-end'>
|
||||||
{% for item in config.extra.navbar_items %}
|
{% for item in config.extra.navbar_items %}
|
||||||
<a href="{{ item.url | replace(from="$BASE_URL", to=config.base_url) }}" class="navbar-item">
|
<a href='{{ item.url | replace(from='$BASE_URL', to=config.base_url) }}' class='navbar-item'>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div class="navbar-item">
|
<div class='navbar-item'>
|
||||||
<div class="field has-addons">
|
<div class='field has-addons'>
|
||||||
<div class="control">
|
<div class='control'>
|
||||||
<input id="search-dialog" class="input is-small" type="search" placeholder="Search">
|
<input id='search-dialog' class='input is-small' type='search' placeholder='Search'>
|
||||||
</div>
|
</div>
|
||||||
<div class="control">
|
<div class='control'>
|
||||||
<a class="button is-small">
|
<a class='button is-small'>
|
||||||
<span class="icon"><i class="fas fa-search"></i></span>
|
<span class='icon'><i class='fas fa-search'></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,30 +70,34 @@
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<div class="modal">
|
<section class="section">
|
||||||
<div class="modal-background"></div>
|
<div class="container">
|
||||||
<div class="modal-card">
|
<div class='modal'>
|
||||||
<header class="modal-card-head">
|
<div class='modal-background'></div>
|
||||||
<p class="modal-card-title">Search</p>
|
<div class='modal-card'>
|
||||||
<button class="delete" aria-label="close"></button>
|
<header class='modal-card-head'>
|
||||||
</header>
|
<p class='modal-card-title'>Search</p>
|
||||||
<section class="modal-card-body">
|
<button class='delete' aria-label='close'></button>
|
||||||
|
</header>
|
||||||
|
<section class='modal-card-body'>
|
||||||
|
|
||||||
<div class="field">
|
<div class='field'>
|
||||||
<p class="control has-icons-right">
|
<p class='control has-icons-right'>
|
||||||
<input id="search" class="input" type="search" placeholder="🔎 Search the website">
|
<input id='search' class='input' type='search' placeholder='🔎 Search the website'>
|
||||||
<span class="icon is-small is-right">
|
<span class='icon is-small is-right'>
|
||||||
<i class="fas fa-search"></i>
|
<i class='fas fa-search'></i>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='search-results'>
|
||||||
|
<div class='search-results__items'>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-results">
|
</div>
|
||||||
<div class="search-results__items">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -93,51 +106,27 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
<footer class="footer py-4">
|
<footer class='footer py-4'>
|
||||||
<div class="has-text-centered">
|
<div class='has-text-centered'>
|
||||||
<p>
|
<p>
|
||||||
Built with <span class="icon"><i class="fas fa-code"></i></span> code and <span class="icon">
|
Built with <span class='icon'><i class='fas fa-code'></i></span> code and <span class='icon'>
|
||||||
<i class="fas fa-heart"></i></span> love
|
<i class='fas fa-heart'></i></span> love
|
||||||
<br />
|
<br />
|
||||||
<span class="has-text-weight-bold">
|
<span class='has-text-weight-bold'>
|
||||||
Powered By <span class="icon"><i class="fas fa-power-off"></i></span> Zola
|
Powered By <span class='icon'><i class='fas fa-power-off'></i></span> Zola
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<script src="https://kit.fontawesome.com/201b8d5e05.js" crossorigin="anonymous"></script>
|
<script src='https://kit.fontawesome.com/201b8d5e05.js' crossorigin='anonymous'></script>
|
||||||
<script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") }}"></script>
|
<script type='text/javascript' src='{{ get_url(path='elasticlunr.min.js') }}'></script>
|
||||||
<script type="text/javascript" src="{{ get_url(path="search_index.en.js") }}"></script>
|
<script type='text/javascript' src='{{ get_url(path='search_index.en.js') }}'></script>
|
||||||
<script type="text/javascript" src="{{ get_url(path="js/search.js") }}"></script>
|
<script type='text/javascript' src='{{ get_url(path='js/site.js') }}'></script>
|
||||||
<script type="text/javascript">
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
|
|
||||||
// Get all "navbar-burger" elements
|
{% block custom_javascript %}
|
||||||
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
{% endblock %}
|
||||||
|
|
||||||
// Check if there are any navbar burgers
|
|
||||||
if ($navbarBurgers.length > 0) {
|
|
||||||
|
|
||||||
// Add a click event on each of them
|
|
||||||
$navbarBurgers.forEach(el => {
|
|
||||||
el.addEventListener('click', () => {
|
|
||||||
|
|
||||||
// Get the target from the "data-target" attribute
|
|
||||||
const target = el.dataset.target;
|
|
||||||
const $target = document.getElementById(target);
|
|
||||||
|
|
||||||
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
|
||||||
el.classList.toggle('is-active');
|
|
||||||
$target.classList.toggle('is-active');
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -1,23 +1,23 @@
|
||||||
{% extends "base.html" %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<main class="hero">
|
<main class='hero'>
|
||||||
<div class="hero-body">
|
<div class='hero-body'>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<div class="columns">
|
<div class='columns'>
|
||||||
<div class="column is-three-fifths is-offset-one-fifth">
|
<div class='column is-three-fifths is-offset-one-fifth'>
|
||||||
<figure class="image center mb-2">
|
<figure class='image center mb-2'>
|
||||||
<img class="is-rounded card" src="{{config.extra.author.avatar}}" style="max-width: 150px">
|
<img class='is-rounded card' src='{{config.extra.author.avatar}}' style='max-width: 150px'>
|
||||||
</figure>
|
</figure>
|
||||||
<div class="has-text-centered">
|
<div class='has-text-centered'>
|
||||||
<h1 class="title is-size-4">{{ section.title }}</h1>
|
<h1 class='title is-size-4'>{{ section.title }}</h1>
|
||||||
<h2 class="subtitle">{{ section.description }}</h2>
|
<h2 class='subtitle'>{{ section.description }}</h2>
|
||||||
<p class="is-size-4">
|
<p class='is-size-4'>
|
||||||
{{ macros:: social_links( social_config=config.extra.social) }}
|
{{ macros:: social_links( social_config=config.extra.social) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="content has-text-justified">
|
<div class='content has-text-justified'>
|
||||||
{{section.content | safe}}
|
{{section.content | safe}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,89 +1,96 @@
|
||||||
{% macro social_links(social_config) %}
|
{% macro social_links(social_config) %}
|
||||||
{% if social_config.facebook %}
|
{% if social_config.facebook %}
|
||||||
<a class="link" href="https://facebook.com/{{social_config.facebook}}" target="_blank">
|
<a class="link" href='https://facebook.com/{{social_config.facebook}}' target='_blank'>
|
||||||
<i class="fab fa-facebook"></i>
|
<span class='icon'>
|
||||||
|
<i class='fab fa-facebook'></i>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if social_config.twitter %}
|
{% if social_config.twitter %}
|
||||||
<a class="link" href="https://twitter.com/{{social_config.twitter}}" target="_blank">
|
<a class="link" href='https://twitter.com/{{social_config.twitter}}' target='_blank'>
|
||||||
<i class="fab fa-twitter"></i>
|
<span class='icon'>
|
||||||
|
<i class='fab fa-twitter'></i>
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if social_config.linkedin %}
|
{% if social_config.linkedin %}
|
||||||
<a class="link" href="https://www.linkedin.com/in/{{social_config.linkedin}}" target="_blank"><i
|
<a class="link" href='https://www.linkedin.com/in/{{social_config.linkedin}}' target='_blank'>
|
||||||
class="fab fa-linkedin"></i></i></a>
|
<span class='icon'>
|
||||||
|
<i class='fab fa-linkedin'></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if social_config.github %}
|
{% if social_config.github %}
|
||||||
<a class="link" href="https://github.com/{{social_config.github}}" target="_blank"><i class="fab fa-github"></i></a>
|
<a class="link" href='https://github.com/{{social_config.github}}' target='_blank'>
|
||||||
|
<span class='icon'>
|
||||||
|
<i class='fab fa-github'></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if social_config.stackoverflow %}
|
{% if social_config.stackoverflow %}
|
||||||
<a class="link" href="https://stackoverflow.com/users/{{social_config.stackoverflow}}" target="_blank"><i
|
<a class="link" href='https://stackoverflow.com/users/{{social_config.stackoverflow}}' target='_blank'>
|
||||||
class="fab fa-stack-overflow"></i></i></a>
|
<span class='icon'>
|
||||||
|
<i class='fab fa-stack-overflow'></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if social_config.keybase %}
|
{% if social_config.keybase %}
|
||||||
<a class="link" href="https://keybase.io/{{social_config.keybase}}" target="_blank"><i class="fab fa-keybase"></i></a>
|
<a class="link" href='https://keybase.io/{{social_config.keybase}}' target='_blank'>
|
||||||
|
<span class='icon'>
|
||||||
|
<i class='fab fa-keybase'></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% macro page_publish_metadata(page) %}
|
{% macro page_publish_metadata(page) %}
|
||||||
<p class="has-text-grey">
|
<p class='has-text-grey'>
|
||||||
<i class="fas fa-user"></i>
|
<span class='icon'>
|
||||||
|
<i class='fas fa-user'></i>
|
||||||
|
</span>
|
||||||
{{ config.extra.author.name }}
|
{{ config.extra.author.name }}
|
||||||
published on
|
published on
|
||||||
<i class="far fa-calendar-alt"></i>
|
<span class='icon'>
|
||||||
<time datetime="{{page.date}}">{{ page.date | date(format="%B %d, %Y") }}</time>
|
<i class='far fa-calendar-alt'></i>
|
||||||
|
</span>
|
||||||
|
<time datetime='{{page.date}}'>{{ page.date | date(format='%B %d, %Y') }}</time>
|
||||||
</p>
|
</p>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro page_content_metadata(page) %}
|
{% macro page_content_metadata(page) %}
|
||||||
<p class="has-text-grey">
|
<p class='has-text-grey'>
|
||||||
<i class="far fa-clock"></i>
|
<span class='icon'>
|
||||||
|
<i class='far fa-clock'></i>
|
||||||
|
</span>
|
||||||
{{page.reading_time}} min,
|
{{page.reading_time}} min,
|
||||||
<i class="fas fa-pencil-alt"></i>
|
<span class='icon'>
|
||||||
|
<i class='fas fa-pencil-alt'></i>
|
||||||
|
</span>
|
||||||
{{page.word_count}} words
|
{{page.word_count}} words
|
||||||
</p>
|
</p>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% macro render_categories(categories) %}
|
{% macro render_categories(categories) %}
|
||||||
Categories:
|
<p>
|
||||||
{% for category in categories %}
|
<span class="has-text-black has-text-weight-normal">Categories:</span>
|
||||||
<a class="link" href="{{ get_taxonomy_url(kind="categories", name=category) }}">
|
{% for category in categories %}
|
||||||
<span class="icon"><i class="fas fa-folder"></i></span>{{ category }}{% if not loop.last %},{% endif %}
|
<a class='link has-text-weight-light' href='{{ get_taxonomy_url(kind='categories', name=category) }}'>
|
||||||
</a>
|
<span class='icon is-small'><i class='fas fa-folder fa-xs'></i></span>{{ category }}
|
||||||
{% endfor %}
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
|
||||||
{% macro render_tags(tags) %}
|
{% macro render_tags(tags) %}
|
||||||
Tags:
|
<p>
|
||||||
{% for tag in tags %}
|
<span class="has-text-black has-text-weight-normal">Tags:</span>
|
||||||
<a class="link" href="{{ get_taxonomy_url(kind="tags", name=tag) }}">
|
{% for tag in tags %}
|
||||||
<span class="icon"><i class="fas fa-tag"></i></span>{{ tag }}{% if not loop.last %},{% endif %}
|
<a class='link has-text-weight-light' href='{{ get_taxonomy_url(kind='tags', name=tag) }}'>
|
||||||
</a>
|
<span class='icon is-small'><i class='fas fa-tag fa-xs'></i></span>{{ tag }}
|
||||||
{% endfor %}
|
</a>
|
||||||
{% endmacro %}
|
{% endfor %}
|
||||||
|
</p>
|
||||||
{% macro google_analytics(gtag) %}
|
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ gtag }}"></script>
|
|
||||||
<script>
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
|
||||||
function gtag() { dataLayer.push(arguments); }
|
|
||||||
gtag('js', new Date());
|
|
||||||
|
|
||||||
gtag('config', '{{ gtag }}');
|
|
||||||
</script>
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro hyvor_talk(id) %}
|
|
||||||
<div id="hyvor-talk-view"></div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var HYVOR_TALK_WEBSITE = {{ id }}; // DO NOT CHANGE THIS
|
|
||||||
var HYVOR_TALK_CONFIG = {
|
|
||||||
url: window.location.href,
|
|
||||||
id: window.btoa(encodeURIComponent(escape(window.location.href)))
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed"></script>
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
|
@ -1,40 +1,47 @@
|
||||||
{% extends "base.html" %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block title %}{{ config.title }} | {{ page.title }}{% endblock title %}
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<main class="section">
|
<main class='section'>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<div class="columns">
|
<div class='columns'>
|
||||||
<div class="column is-three-fifths is-offset-one-fifth">
|
<div class='column is-three-fifths is-offset-one-fifth'>
|
||||||
<article>
|
<article>
|
||||||
<h1 class="title">{{ page.title }}</h1>
|
<h1 class='title'>{{ page.title }}</h1>
|
||||||
<h2 class="subtitle">{{ page.description }}</h2>
|
<h2 class='subtitle'>{{ page.description }}</h2>
|
||||||
|
|
||||||
<p>{{ macros::page_content_metadata(page=page) }}</p>
|
{{ macros::page_content_metadata(page=page) }}
|
||||||
<p>{{ macros::page_publish_metadata(page=page) }}</p>
|
{{ macros::page_publish_metadata(page=page) }}
|
||||||
|
|
||||||
{% if page.taxonomies.categories %}
|
<br />
|
||||||
<p>{{ macros::render_categories(categories=page.taxonomies.categories) }}</p>
|
|
||||||
{% endif %}
|
<div class='columns'>
|
||||||
{% if page.taxonomies.tags %}
|
<div class='column'>
|
||||||
<p>{{ macros::render_tags(tags=page.taxonomies.tags) }}</p>
|
{% if page.taxonomies.categories %}
|
||||||
{% endif %}
|
{{ macros::render_categories(categories=page.taxonomies.categories) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class='column'>
|
||||||
|
{% if page.taxonomies.tags %}
|
||||||
|
{{ macros::render_tags(tags=page.taxonomies.tags) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if page.extra.toc %}
|
{% if page.extra.toc %}
|
||||||
<hr />
|
<hr />
|
||||||
<div class="content">
|
<div class='content'>
|
||||||
<p class="has-text-weight-bold">Table of Contents</p>
|
<p class='has-text-weight-bold'>Table of Contents</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for h1 in page.toc %}
|
{% for h1 in page.toc %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{h1.permalink | safe}}">{{ h1.title }}</a>
|
<a href='{{h1.permalink | safe}}'>{{ h1.title }}</a>
|
||||||
{% if h1.children %}
|
{% if h1.children %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for h2 in h1.children %}
|
{% for h2 in h1.children %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{h2.permalink | safe}}">{{ h2.title }}</a>
|
<a href='{{h2.permalink | safe}}'>{{ h2.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -46,44 +53,44 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div class="content has-text-justified">
|
<div class='content has-text-justified'>
|
||||||
{{ page.content | safe }}
|
{{ page.content | safe }}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<hr />
|
<hr />
|
||||||
{% if page.earlier or page.later or page.lighter or page.heavier %}
|
{% if page.earlier or page.later or page.lighter or page.heavier %}
|
||||||
<nav class="level mt-2">
|
<nav class='level mt-2'>
|
||||||
{% if page.later %}
|
{% if page.later %}
|
||||||
<div class="level-item has-text-centered">
|
<div class='level-item has-text-centered'>
|
||||||
<a href="{{ page.later.permalink }}" class="button is-black is-outlined">
|
<a href='{{ page.later.permalink }}' class='button is-black is-outlined'>
|
||||||
<span class="icon mr-2"><i
|
<span class='icon mr-2'><i
|
||||||
class="fas fa-arrow-circle-left"></i></span>{{ page.later.title }}
|
class='fas fa-arrow-circle-left'></i></span>{{ page.later.title }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.earlier %}
|
{% if page.earlier %}
|
||||||
<div class="level-item has-text-centered">
|
<div class='level-item has-text-centered'>
|
||||||
<a href="{{ page.earlier.permalink }}" class="button is-black is-outlined">
|
<a href='{{ page.earlier.permalink }}' class='button is-black is-outlined'>
|
||||||
{{ page.earlier.title }}<span class="icon ml-2"><i
|
{{ page.earlier.title }}<span class='icon ml-2'><i
|
||||||
class="fas fa-arrow-circle-right"></i></span>
|
class='fas fa-arrow-circle-right'></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.heavier %}
|
{% if page.heavier %}
|
||||||
<div class="level-item has-text-centered">
|
<div class='level-item has-text-centered'>
|
||||||
<a href="{{ page.heavier.permalink }}" class="button is-black is-outlined">
|
<a href='{{ page.heavier.permalink }}' class='button is-black is-outlined'>
|
||||||
<span class="icon mr-2"><i
|
<span class='icon mr-2'><i
|
||||||
class="fas fa-arrow-circle-left"></i></span>{{ page.heavier.title }}
|
class='fas fa-arrow-circle-left'></i></span>{{ page.heavier.title }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.lighter %}
|
{% if page.lighter %}
|
||||||
<div class="level-item has-text-centered">
|
<div class='level-item has-text-centered'>
|
||||||
<a href="{{ page.lighter.permalink }}" class="button is-black is-outlined">
|
<a href='{{ page.lighter.permalink }}' class='button is-black is-outlined'>
|
||||||
{{ page.lighter.title }}<span class="icon ml-2"><i
|
{{ page.lighter.title }}<span class='icon ml-2'><i
|
||||||
class="fas fa-arrow-circle-right"></i></span>
|
class='fas fa-arrow-circle-right'></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -93,10 +100,23 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.extra.comments and config.extra.commenting.hyvor %}
|
{% if page.extra.comments and config.extra.commenting.hyvor %}
|
||||||
<hr />
|
<hr />
|
||||||
{{ macros::hyvor_talk(id=config.extra.commenting.hyvor) }}
|
<section id='hyvor-talk-view'></section>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{% endblock main %}
|
{% endblock main %}
|
||||||
|
|
||||||
|
{% block custom_javascript %}
|
||||||
|
{% if page.extra.comments and config.extra.commenting.hyvor %}
|
||||||
|
<script async type='text/javascript' src='https://talk.hyvor.com/web-api/embed'></script>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
var HYVOR_TALK_WEBSITE = {{ config.extra.commenting.hyvor }};
|
||||||
|
var HYVOR_TALK_CONFIG = {
|
||||||
|
url: window.location.href,
|
||||||
|
id: window.btoa(encodeURIComponent(escape(window.location.href)))
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
|
@ -1,12 +1,14 @@
|
||||||
{% extends "base.html" %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}{{ config.title }} | {{ section.title }}{% endblock title %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
<header class="hero">
|
<header class='hero'>
|
||||||
<div class="hero-body">
|
<div class='hero-body'>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<div class="has-text-centered">
|
<div class='has-text-centered'>
|
||||||
<h1 class="title">{{ section.title }}</h1>
|
<h1 class='title'>{{ section.title }}</h1>
|
||||||
<h2 class="subtitle">{{ section.description }}</h2>
|
<h2 class='subtitle'>{{ section.description }}</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,54 +16,60 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<main class="section pt-0">
|
<main class='section pt-0'>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<div class="columns">
|
<div class='columns'>
|
||||||
<div class="column is-8 is-offset-2">
|
<div class='column is-8 is-offset-2'>
|
||||||
{% if paginator %}
|
{% if paginator %}
|
||||||
{% set pages = paginator.pages %}
|
{% set pages = paginator.pages %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set pages = section.pages %}
|
{% set pages = section.pages %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for page in pages %}
|
{% for page in pages %}
|
||||||
<article class="box">
|
<article class='box'>
|
||||||
<h1 class="title is-4">
|
<h1 class='title is-4'>
|
||||||
<a class="link" class="link" href="{{ page.permalink }}">
|
<a class='link' class='link' href='{{ page.permalink }}'>
|
||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="subtitle is-6">{{ page.description }}</h2>
|
<h2 class='subtitle is-6'>{{ page.description }}</h2>
|
||||||
<p>{{ macros::page_publish_metadata(page=page) }}</p>
|
<p>{{ macros::page_publish_metadata(page=page) }}</p>
|
||||||
<div class="content mt-2">
|
<div class='content mt-2'>
|
||||||
{{ page.summary | safe }}
|
{{ page.summary | safe }}
|
||||||
<a class="read-more" href="{{ page.permalink }}">
|
<a class='read-more' href='{{ page.permalink }}'>
|
||||||
Read More
|
Read More
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if page.taxonomies.categories %}
|
<div class='columns'>
|
||||||
<p>{{ macros::render_categories(categories=page.taxonomies.categories) }}</p>
|
<div class='column'>
|
||||||
{% endif %}
|
{% if page.taxonomies.categories %}
|
||||||
{% if page.taxonomies.tags %}
|
{{ macros::render_categories(categories=page.taxonomies.categories) }}
|
||||||
<p>{{ macros::render_tags(tags=page.taxonomies.tags) }}</p>
|
{% endif %}
|
||||||
{% endif %}
|
</div>
|
||||||
|
<div class='column'>
|
||||||
|
{% if page.taxonomies.tags %}
|
||||||
|
{{ macros::render_tags(tags=page.taxonomies.tags) }}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if paginator.previous or paginator.next %}
|
{% if paginator.previous or paginator.next %}
|
||||||
<nav class="level">
|
<nav class='level'>
|
||||||
{% if paginator.previous %}
|
{% if paginator.previous %}
|
||||||
<div class="level-item has-text-centered">
|
<div class='level-item has-text-centered'>
|
||||||
<a href="{{ paginator.previous }}" class="button is-black is-outlined">
|
<a href='{{ paginator.previous }}' class='button is-black is-outlined'>
|
||||||
<span class="icon mr-2"><i class="fas fa-arrow-circle-left"></i></span> Previous Page
|
<span class='icon mr-2'><i class='fas fa-arrow-circle-left'></i></span> Previous Page
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if paginator.next %}
|
{% if paginator.next %}
|
||||||
<div class="level-item has-text-centered">
|
<div class='level-item has-text-centered'>
|
||||||
<a href="{{ paginator.next }}" class="button is-black is-outlined">
|
<a href='{{ paginator.next }}' class='button is-black is-outlined'>
|
||||||
Next Page <span class="icon ml-2"><i class="fas fa-arrow-circle-right"></i></span>
|
Next Page <span class='icon ml-2'><i class='fas fa-arrow-circle-right'></i></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<canvas id="myChart" max-height="400px"></canvas>
|
<canvas id="myChart" max-height="400px"></canvas>
|
||||||
|
<div id="chart-data" style="display: none">{{body | safe }}</div>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
|
||||||
<script>
|
<script type='text/javascript'>
|
||||||
|
var chartData = document.getElementById('chart-data').textContent;
|
||||||
var chartData = {{body | safe }};
|
|
||||||
var ctx = document.getElementById('myChart').getContext('2d');
|
var ctx = document.getElementById('myChart').getContext('2d');
|
||||||
var myChart = new Chart(ctx, chartData);
|
var chart = new Chart(ctx, JSON.parse(chartData));
|
||||||
</script>
|
</script>
|
|
@ -1,6 +0,0 @@
|
||||||
<blockquote>
|
|
||||||
{{body}}<br />
|
|
||||||
{% if author %}
|
|
||||||
-- {{ author }}
|
|
||||||
{% endif %}
|
|
||||||
</blockquote>
|
|
Loading…
Reference in New Issue