Merge branch 'master' into allow-relative-bigimg-paths

This commit is contained in:
Kevin Sookocheff 2018-10-30 10:44:50 -06:00
commit 638f3972fe
31 changed files with 1060 additions and 145 deletions

View file

@ -6,7 +6,8 @@
$ mkdir themes
$ cd themes
$ git clone https://github.com/halogenica/beautifulhugo.git beautifulhugo
$ git submodule add https://github.com/halogenica/beautifulhugo.git beautifulhugo
See [the Hugo documentation](https://gohugo.io/themes/installing/) for more information.

View file

@ -129,3 +129,9 @@ id = "telegram"
url = "https://telegram.me/%s"
title = "Telegram"
icon = "fa-telegram"
[[social_icons]]
id = "500px"
url = "https://500px.com/%s"
title = "500px"
icon = "fa-500px"

View file

@ -25,6 +25,8 @@ pygmentsCodefencesGuessSyntax = true
readingTime = true
useHLJS = true
socialShare = true
delayDisqus = true
showRelatedPosts = true
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic"
#[[Params.bigimg]]
@ -63,6 +65,7 @@ pygmentsCodefencesGuessSyntax = true
vk = "username"
paypal = "username"
telegram = "username"
500px = "username"
[[menu.main]]
name = "Blog"

View file

@ -62,3 +62,13 @@
translation: "Seu email"
- id: yourWebsite
translation: "Seu website"
# Delayed Disqus
- id: show
translation: "Mostrar"
- id: comments
translation: "comentários"
# Related posts
- id: seeAlso
translation: "Veja também"

View file

@ -49,18 +49,26 @@
# Staticman
- id: noComment
translation: "No comment"
translation: "Kein Kommentar"
- id: oneComment
translation: "comment"
translation: "Kommentar"
- id: moreComment
translation: "comments"
translation: "Kommentare"
- id: useMarkdown
translation: "You can use Markdown syntax"
translation: "Sie können Markdown-Syntax verwenden"
- id: yourName
translation: "Your name"
translation: "Irh Name"
- id: yourEmail
translation: "Your email address"
translation: "Ihre Emailadresse"
- id: yourWebsite
translation: "You website"
translation: "Ihre Website"
# Delayed Disqus
- id: show
translation: "Zeige"
- id: comments
translation: "Kommentare"
# Related posts
- id: seeAlso
translation: "Siehe auch"

View file

@ -63,4 +63,12 @@
- id: yourWebsite
translation: "You website"
# Delayed Disqus
- id: show
translation: "Show"
- id: comments
translation: "comments"
# Related posts
- id: seeAlso
translation: "See also"

View file

@ -62,3 +62,13 @@
translation: "Via retpoŝtadreso"
- id: yourWebsite
translation: "Via retpaĝaro"
# Delayed Disqus
- id: show
translation: "Montru"
- id: comments
translation: "komentoj"
# Related posts
- id: seeAlso
translation: "Vidu ankaŭ"

View file

@ -49,19 +49,26 @@
# Staticman
- id: noComment
translation: "No comment"
translation: "Sin comentarios"
- id: oneComment
translation: "comment"
translation: "comentario"
- id: moreComment
translation: "comments"
translation: "comentarios"
- id: useMarkdown
translation: "You can use Markdown syntax"
translation: "Puedes usar la sintaxis de Markdown"
- id: yourName
translation: "Your name"
translation: "Tu nombre"
- id: yourEmail
translation: "Your email address"
translation: "Tu correo electrónico"
- id: yourWebsite
translation: "You website"
translation: "Tu sitio web"
# Delayed Disqus
- id: show
translation: "Mostrar"
- id: comments
translation: "comentarios"
# Related posts
- id: seeAlso
translation: "Ver también"

View file

@ -29,7 +29,7 @@
# 404 page
- id: pageNotFound
translation: "Ourp, cette page n'existe pas. (erreur 404)"
translation: "Oups, cette page n'existe pas. (erreur 404)"
# Footer
- id: poweredBy # Accepts HTML
@ -62,3 +62,13 @@
translation: "Votre addresse mail"
- id: yourWebsite
translation: "Votre site web"
# Delayed Disqus
- id: show
translation: "Afficher"
- id: comments
translation: "commentaires"
# Related posts
- id: seeAlso
translation: "Voir également"

View file

@ -63,4 +63,12 @@
- id: yourWebsite
translation: "Il tuo website"
# Delayed Disqus
- id: show
translation: "Mostra"
- id: comments
translation: "commenti"
# Related posts
- id: seeAlso
translation: "Guarda anche"

View file

@ -38,6 +38,8 @@
# Navigation
- id: toggleNavigation
translation: "メニューを切り替え"
- id: languageSwitcherLabel
translation: "言語"
- id: gcseLabelShort
translation: "検索"
- id: gcseLabelLong
@ -61,6 +63,12 @@
- id: yourWebsite
translation: "You website"
# Delayed Disqus
- id: show
translation: "ショー"
- id: comments
translation: "コメント"
# Related posts
- id: seeAlso
translation: "も参照してください"

View file

@ -63,4 +63,12 @@
- id: yourWebsite
translation: "Din webside"
# Delayed Disqus
- id: show
translation: "Vis"
- id: comments
translation: "kommentarer"
# Related posts
- id: seeAlso
translation: "Se også"

View file

@ -62,3 +62,13 @@
translation: "Jouw e-mailadres"
- id: yourWebsite
translation: "Jouw website"
# Delayed Disqus
- id: show
translation: "Laat"
- id: comments
translation: "reacties zien"
# Related posts
- id: seeAlso
translation: "Zie ook"

View file

@ -49,19 +49,26 @@
# Staticman
- id: noComment
translation: "No comment"
translation: "Bez komentarza"
- id: oneComment
translation: "comment"
translation: "komentarz"
- id: moreComment
translation: "comments"
translation: "komentarzy"
- id: useMarkdown
translation: "You can use Markdown syntax"
translation: "Możesz użyć składni Markdown"
- id: yourName
translation: "Your name"
translation: "Twoje imię"
- id: yourEmail
translation: "Your email address"
translation: "Twój adres email"
- id: yourWebsite
translation: "You website"
translation: "Twoja strona internetowa"
# Delayed Disqus
- id: show
translation: "Pokaż"
- id: comments
translation: "komentarzy"
# Related posts
- id: seeAlso
translation: "Zobacz też"

View file

@ -49,20 +49,26 @@
# Staticman
- id: noComment
translation: "No comment"
translation: "Без комментариев"
- id: oneComment
translation: "comment"
translation: "комментарий"
- id: moreComment
translation: "comments"
translation: "комментарии"
- id: useMarkdown
translation: "You can use Markdown syntax"
translation: "Вы можете использовать синтаксис Markdown"
- id: yourName
translation: "Your name"
translation: "Ваше имя"
- id: yourEmail
translation: "Your email address"
translation: "Ваш адрес электронной почты"
- id: yourWebsite
translation: "You website"
translation: "Ваш сайт"
# Delayed Disqus
- id: show
translation: "Показать"
- id: comments
translation: "комментариев"
# Related posts
- id: seeAlso
translation: "Смотрите также"

View file

@ -49,19 +49,26 @@
# Staticman
- id: noComment
translation: "No comment"
translation: "没有意见"
- id: oneComment
translation: "comment"
translation: "评论"
- id: moreComment
translation: "comments"
translation: "评论"
- id: useMarkdown
translation: "You can use Markdown syntax"
translation: "您可以使用Markdown语法"
- id: yourName
translation: "Your name"
translation: "你的名字"
- id: yourEmail
translation: "Your email address"
translation: "您的电子邮件地址"
- id: yourWebsite
translation: "You website"
translation: "你的网页"
# Delayed Disqus
- id: show
translation: "显示"
- id: comments
translation: "条评论"
# Related posts
- id: seeAlso
translation: "也可以看看"

View file

@ -4,7 +4,7 @@
<div class="text-center">
<h1>{{ i18n "pageNotFound" }}</h1>
<br/>
<img src="{{ .Site.BaseURL }}/img/404-southpark.jpg" />
<img src="{{ "img/404-southpark.jpg" | absURL }}" />
</div>
</div>
{{ end }}

View file

@ -1,6 +1,9 @@
<!DOCTYPE html>
<html lang="{{ .Lang }}">
{{ partial "head.html" . }}
<head>
{{ partial "head.html" . }}
{{ partial "site-schema.html" . }}
</head>
<body>
{{ partial "nav.html" . }}
{{ block "header" . }}{{ partial "header.html" . }}{{ end }}

View file

@ -21,6 +21,18 @@
</ul>
</section>
{{ end }}
{{ if .Site.Params.showRelatedPosts }}
{{ $related := .Site.RegularPages.Related . | first 3 }}
{{ with $related }}
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</article>
{{ if ne .Type "page" }}
@ -41,9 +53,23 @@
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }}
{{ if .Site.DisqusShortname }}
{{ if .Site.Params.delayDisqus }}
<div class="disqus-comments">
<button id="show-comments" class="btn btn-default" type="button">{{ i18n "show" }} <span class="disqus-comment-count" data-disqus-url="{{ trim .Permalink "/" }}">{{ i18n "comments" }}</span></button>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_config = function () {
this.page.url = '{{ trim .Permalink "/" }}';
};
</script>
</div>
{{ else }}
<div class="disqus-comments">
{{ template "_internal/disqus.html" . }}
</div>
{{ end }}
{{ end }}
{{ if .Site.Params.staticman }}
<div class="staticman-comments">

View file

@ -49,12 +49,12 @@
<ul class="pager main-pager">
{{ if .Paginator.HasPrev }}
<li class="previous">
<a href="{{ .Paginator.Prev.URL | absURL }}">&larr; {{ i18n "newerPosts" }}</a>
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}/">&larr; {{ i18n "newerPosts" }}</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .Paginator.Next.URL | absURL }}">{{ i18n "olderPosts" }} &rarr;</a>
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}/">{{ i18n "olderPosts" }} &rarr;</a>
</li>
{{ end }}
</ul>

View file

@ -39,8 +39,12 @@
{{ end }}
{{ end }}
&nbsp;&bull;&nbsp;
{{ .Site.LastChange.Format "2006" }}
&nbsp;&bull;&nbsp;&copy;
{{ if .Site.Params.since }}
{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}
{{ else }}
{{ .Site.LastChange.Format "2006" }}
{{ end }}
{{ if .Site.Title }}
&nbsp;&bull;&nbsp;
@ -112,4 +116,28 @@
<!-- End Piwik Code -->
{{ end }}
{{ if (.Site.Params.delayDisqus) (and .Site.DisqusShortname) }}
<!-- Delayed Disqus -->
<script type="text/javascript">
$(function(){
$('#show-comments').on('click', function(){
var disqus_shortname = '{{ .Site.DisqusShortname }}';
(function() {
var disqus = document.createElement('script');
disqus.type = 'text/javascript';
disqus.async = true;
disqus.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(disqus);
})();
$(this).hide();
});
});
</script>
<script id="dsq-count-scr" src="//{{ .Site.DisqusShortname }}.disqus.com/count.js" async></script>
<!-- End Delayed Disqus -->
{{ end }}
{{- partial "footer_custom.html" . }}

View file

@ -1,14 +1,38 @@
<head>
{{- if eq .Kind "taxonomyTerm" }}
{{- range $key, $value := .Data.Terms.ByCount }}
{{- $.Scratch.Add "most_used" (slice $value.Name) }}
{{- end }}
{{- if not ($.Scratch.Get "most_used") }}
{{- $description := printf "A full overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular | truncate 180 }}
{{- $.Scratch.Set "Description" $description }}
{{- else }}
{{- $description := printf "A full overview of all pages with %s, ordered by %s, such as: %s" .Data.Plural .Data.Singular ( delimit ( $.Scratch.Get "most_used" ) ", " ", and " ) | truncate 180 }}
{{- $.Scratch.Set "Description" $description }}
{{- end }}
{{- $title := printf "Overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular }}
{{- $.Scratch.Set "Title" $title }}
{{- else if eq .Kind "taxonomy" }}
{{- $description := printf "Overview of all pages with the %s #%s, such as: %s" .Data.Singular $.Title ( index .Pages 0).Title | truncate 160 }}
{{- $.Scratch.Set "Description" $description }}
{{- $title := printf "Overview of all pages with the %s #%s" .Data.Singular $.Title }}
{{- $.Scratch.Set "Title" $title }}
{{- else }}
{{- $.Scratch.Set "Description" ( .Description | default .Params.subtitle | default .Summary ) }}
{{- $.Scratch.Set "Title" ( .Title | default .Site.Title ) }}
{{- end }}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Title, Description, Author, and Favicon -->
{{- with .Title | default .Site.Title }}
<title>{{ . }}</title>
{{- with ($.Scratch.Get "Title") }}
<title>{{ . }} - {{ $.Site.Title }}</title>
<meta property="og:title" content="{{ . }}" />
<meta name="twitter:title" content="{{ . | truncate 70 }}" />
{{- end }}
{{- with .Description | default .Params.subtitle | default .Summary }}
{{- with ($.Scratch.Get "Description") }}
<meta name="description" content="{{ . }}">
<meta property="og:description" content="{{ . }}">
<meta name="twitter:description" content="{{ . | truncate 200 }}">
@ -36,12 +60,7 @@
<!-- Hugo Version number -->
{{ .Hugo.Generator -}}
<!-- Links and stylesheets -->
<link rel="canonical" href="{{ .URL | absLangURL }}" />
{{- if .RSSLink }}
<link rel="alternate" href="{{ .RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
{{- else }}
<link rel="alternate" href="{{ .Site.RSSLink }}" type="application/rss+xml" title="{{ .Site.Title }}">
{{- end }}
<link rel="alternate" href="{{ "index.xml" | absLangURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" integrity="sha384-wITovz90syo1dJWVh32uuETPVEtGigN07tkttEqPv+uR2SE/mbQcG7ATL28aI9H0" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
@ -67,4 +86,3 @@
{{- partial "head_custom.html" . }}
{{ template "_internal/google_analytics_async.html" . }}
</head>

View file

@ -15,7 +15,7 @@
{{ range .Site.Menus.main.ByWeight }}
{{ if .HasChildren }}
<li class="navlinks-container">
<a class="navlinks-parent" href="javascript:void(0)">{{ .Name }}</a>
<a class="navlinks-parent">{{ .Name }}</a>
<div class="navlinks-children">
{{ range .Children }}
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
@ -32,7 +32,7 @@
{{ if .Site.IsMultiLingual }}
{{ if ge (len .Site.Languages) 3 }}
<li class="navlinks-container">
<a class="navlinks-parent" href="javascript:void(0)">{{ i18n "languageSwitcherLabel" }}</a>
<a class="navlinks-parent">{{ i18n "languageSwitcherLabel" }}</a>
<div class="navlinks-children">
{{ range .Site.Languages }}
{{ if not (eq .Lang $.Site.Language.Lang) }}

View file

@ -1,75 +1,53 @@
<!-- Social Share Button HTML -->
<!-- Twitter -->
<li>
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Author.twitter }}"
target="_blank" alt="" title="Share on Twitter">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- Google Plus -->
<li>
<a href="//plus.google.com/share?url={{ .Permalink }}" target="_blank" title="Share on Google Plus">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-google-plus fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- Facebook -->
<li>
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- Reddit -->
<li>
<a href="//reddit.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on Reddit">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-reddit fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- LinkedIn -->
<li>
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank"
title="Share on LinkedIn">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- StumbleUpon -->
<li>
<a href="//www.stumbleupon.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank"
title="Share on StumbleUpon">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-stumbleupon fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- Pinterest -->
<li>
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank"
title="Share on Pinterest">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-pinterest fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<div class="share-box" aria-hidden="true">
<ul class="share">
<!-- Twitter -->
<li>
<a href="//twitter.com/share?url={{ .Permalink }}&amp;text={{ .Title }}&amp;via={{ .Site.Author.twitter }}" target="_blank" title="Share on Twitter">
<i class="fa fa-twitter"></i>
</a>
</li>
<!-- Google Plus -->
<li>
<a href="//plus.google.com/share?url={{ .Permalink }}" target="_blank" title="Share on Google Plus">
<i class="fa fa-google-plus"></i>
</a>
</li>
<!-- Facebook -->
<li>
<a href="//www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" title="Share on Facebook">
<i class="fa fa-linkedin"></i>
</a>
</li>
<!-- Reddit -->
<li>
<a href="//reddit.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on Reddit">
<i class="fa fa-reddit"></i>
</a>
</li>
<!-- LinkedIn -->
<li>
<a href="//www.linkedin.com/shareArticle?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on LinkedIn">
<i class="fa fa-linkedin"></i>
</a>
</li>
<!-- StumbleUpon -->
<li>
<a href="//www.stumbleupon.com/submit?url={{ .Permalink }}&amp;title={{ .Title }}" target="_blank" title="Share on StumbleUpon">
<i class="fa fa-stumbleupon"></i>
</a>
</li>
<!-- Pinterest -->
<li>
<a href="//www.pinterest.com/pin/create/button/?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="Share on Pinterest">
<i class="fa fa-pinterest"></i>
</a>
</li>
</ul>
</div>

View file

@ -0,0 +1,73 @@
{{ if .IsHome -}}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "{{ .Site.BaseURL }}",
{{ if .Site.Author.name -}}
"author": {
"@type": "Person",
"name": "{{ .Site.Author.name }}"
},
{{- end }}
{{ if .Site.Params.description -}}
"description": "{{ .Site.Params.description }}",
{{- end }}
{{ if .Site.Params.logo -}}
"image": "{{ .Site.Params.logo | absURL }}",
{{- end }}
{{ with .Site.Copyright -}}
"license": "{{ . }}",
{{- end }}
"name": "{{ .Site.Title }}"
}
</script>
{{- else if .IsPage -}}
<script type="application/ld+json"> {
"@context" : "http://schema.org",
"@type" : "BlogPosting",
{{ if .Params.categories }}{{ range .Params.categories }}"articleSection" : "{{ . }}",{{ end }}{{ end }}
"name" : "{{ .Title | safeJS }}",
"headline" : "{{ .Title | safeJS }}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Permalink }}"
},
"description" : "{{ if .Description }}{{ .Description | plainify }}{{ else }}{{if .IsPage}}{{ .Summary | plainify }}{{ end }}{{ end }}",
"inLanguage" : "{{ .Lang }}",
{{ if .Params.author -}}
"author": {
"@type": "Person",
"name": "{{ .Params.author }}"
},
{{- else if .Site.Author.name -}}
"author": {
"@type": "Person",
"name": "{{ .Site.Author.name }}"
},
{{- end }}
"copyrightYear" : "{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}",
{{ if not .PublishDate.IsZero -}}
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
{{- else if not .Date.IsZero -}}
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
{{- end }}
{{ with .Lastmod -}}
"dateModified": "{{ .Format "2006-01-02T15:04:05-07:00" | safeHTML }}",
{{- end }}
"url" : "{{ .Permalink }}",
"wordCount" : "{{ .WordCount }}",
"image" : "{{ .Site.Params.logo | absURL }}",
"keywords" : [ "{{ range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}" ],
"publisher" : {
"@type": "Organization",
"name" : "{{ .Site.BaseURL }}",
"logo" : {
"@type" : "ImageObject",
"url" : "{{ .Site.Params.logo | absURL }}",
"height" : 60 ,
"width" : 60
}
}
} </script>
{{ end }}

View file

@ -0,0 +1,7 @@
<link href="{{"css/mermaid.css" | relURL}}" type="text/css" rel="stylesheet"/>
<script defer src="{{"js/mermaid.js" | relURL}}">
mermaid.initialize({startOnLoad:true});
</script>
<div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}" >
{{ safeHTML .Inner }}
</div>

View file

@ -1,9 +1,33 @@
/* --- Code blocks --- */
.chroma .ln {
margin-right: 0.8em;
padding: 0 0.4em 0 0.4em;
.chroma .ln {
margin-right: 0.8em;
padding: 0 0.4em 0 0.4em;
}
pre code.hljs {
padding: 9.5px;
}
.highlight tr, .highlight pre {
border: none;
}
.highlight div:first-child {
border-radius: 4px;
}
.highlight td:first-child pre, .highlight pre {
border-top-left-radius: 4px;
border-top-right-radius: unset;
border-bottom-left-radius: 4px;
border-bottom-right-radius: unset;
overflow: hidden;
}
.highlight td:last-child pre, .highlight pre {
border-radius: unset;
}
.highlight td:last-child pre code, .highlight pre code {
white-space: pre;
}

View file

@ -725,20 +725,87 @@ div.splitbox {width:100%; overflow:auto;}
div.splitbox div.left {
width:48%;
display:inline-block;
float:left;}
div.splitbox div.right {
width:48%;
display:inline-block;
float:right;}
@media only screen and (max-width: 600px) {
div.splitbox div.left {
width:100%;
display:inline-block;
float:left;}
div.splitbox div.right {
width:100%;
display:inline-block;
float:left;}
}
/* Delayed Disqus */
.disqus-comments button {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
text-transform: uppercase;
font-size: 14px;
font-weight: 800;
letter-spacing: 1px;
padding: 10px 5px;
background: #FFF;
border-radius: 0;
color: #404040;
}
@media only screen and (min-width: 768px) {
.disqus-comments button {
padding: 15px 25px;
}
}
.disqus-comments button:hover,
.disqus-comments button:focus {
color: #FFF;
background: #0085a1;
border: 1px solid #0085a1;
}
/* Related posts */
h4.see-also {
margin-top: 20px;
}
/*************************************************
* Sharing
**************************************************/
.share-box {
float: right;
}
ul.share {
display: flex;
flex-direction: row;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
}
ul.share li {
display: inline-flex;
margin-right: 5px;
}
ul.share li:last-of-type {
margin-right: 0;
}
ul.share li .fa {
display: block;
width: 30px;
height: 30px;
line-height: 30px;
font-size: 16px;
text-align: center;
transition: all 150ms ease-in-out;
color: #fff;
}
ul.share li a {
background-color: #b5c6ce;
display: block;
border-radius: 50%;
text-decoration: none !important;
margin: 0;
}
ul.share li:hover .fa {
transform: scale(1.4)
}

271
static/css/mermaid.css Normal file
View file

@ -0,0 +1,271 @@
/* Flowchart variables */
/* Sequence Diagram variables */
/* Gantt chart variables */
.mermaid .label {
color: #333;
}
.node rect,
.node circle,
.node ellipse,
.node polygon {
fill: #ECECFF;
stroke: #CCCCFF;
stroke-width: 1px;
}
.edgePath .path {
stroke: #333333;
}
.edgeLabel {
background-color: #e8e8e8;
}
.cluster rect {
fill: #ffffde !important;
rx: 4 !important;
stroke: #aaaa33 !important;
stroke-width: 1px !important;
}
.cluster text {
fill: #333;
}
.actor {
stroke: #CCCCFF;
fill: #ECECFF;
}
text.actor {
fill: black;
stroke: none;
}
.actor-line {
stroke: grey;
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #333;
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
stroke: #333;
}
#arrowhead {
fill: #333;
}
#crosshead path {
fill: #333 !important;
stroke: #333 !important;
}
.messageText {
fill: #333;
stroke: none;
}
.labelBox {
stroke: #CCCCFF;
fill: #ECECFF;
}
.labelText {
fill: black;
stroke: none;
}
.loopText {
fill: black;
stroke: none;
}
.loopLine {
stroke-width: 2;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #CCCCFF;
}
.note {
stroke: #aaaa33;
fill: #fff5ad;
}
.noteText {
fill: black;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
/** Section styling */
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: rgba(102, 102, 255, 0.49);
}
.section2 {
fill: #fff400;
}
.section1,
.section3 {
fill: white;
opacity: 0.2;
}
.sectionTitle0 {
fill: #333;
}
.sectionTitle1 {
fill: #333;
}
.sectionTitle2 {
fill: #333;
}
.sectionTitle3 {
fill: #333;
}
.sectionTitle {
text-anchor: start;
font-size: 11px;
text-height: 14px;
}
/* Grid and axis */
.grid .tick {
stroke: lightgrey;
opacity: 0.3;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: red;
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-size: 11px;
}
.taskTextOutsideRight {
fill: black;
text-anchor: start;
font-size: 11px;
}
.taskTextOutsideLeft {
fill: black;
text-anchor: end;
font-size: 11px;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: white;
}
.task0,
.task1,
.task2,
.task3 {
fill: #8a90dd;
stroke: #534fbc;
}
.taskTextOutside0,
.taskTextOutside2 {
fill: black;
}
.taskTextOutside1,
.taskTextOutside3 {
fill: black;
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: #bfc7ff;
stroke: #534fbc;
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: black !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: grey;
fill: lightgrey;
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: black !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: #ff8888;
fill: red;
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: #ff8888;
fill: #bfc7ff;
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: #ff8888;
fill: lightgrey;
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: black !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: black !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: black;
}
/*
*/
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
background: #ffffde;
border: 1px solid #aaaa33;
border-radius: 2px;
pointer-events: none;
z-index: 100;
}

273
static/css/mermaid.dark.css Normal file
View file

@ -0,0 +1,273 @@
/* Flowchart variables */
/* Sequence Diagram variables */
/* Gantt chart variables */
.mermaid .label {
color: #323D47;
}
.node rect,
.node circle,
.node ellipse,
.node polygon {
fill: #BDD5EA;
stroke: #81B1DB;
stroke-width: 1px;
}
.edgePath .path {
stroke: lightgrey;
}
.edgeLabel {
background-color: #e8e8e8;
}
.cluster rect {
fill: #6D6D65 !important;
rx: 4 !important;
stroke: rgba(255, 255, 255, 0.25) !important;
stroke-width: 1px !important;
}
.cluster text {
fill: #F9FFFE;
}
.actor {
stroke: #81B1DB;
fill: #BDD5EA;
}
text.actor {
fill: black;
stroke: none;
}
.actor-line {
stroke: lightgrey;
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: lightgrey;
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: "2 2";
stroke: lightgrey;
}
#arrowhead {
fill: lightgrey !important;
}
#crosshead path {
fill: lightgrey !important;
stroke: lightgrey !important;
}
.messageText {
fill: lightgrey;
stroke: none;
}
.labelBox {
stroke: #81B1DB;
fill: #BDD5EA;
}
.labelText {
fill: #323D47;
stroke: none;
}
.loopText {
fill: lightgrey;
stroke: none;
}
.loopLine {
stroke-width: 2;
stroke-dasharray: "2 2";
marker-end: "url(#arrowhead)";
stroke: #81B1DB;
}
.note {
stroke: rgba(255, 255, 255, 0.25);
fill: #fff5ad;
}
.noteText {
fill: black;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
/** Section styling */
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: rgba(255, 255, 255, 0.3);
}
.section2 {
fill: #EAE8B9;
}
.section1,
.section3 {
fill: white;
opacity: 0.2;
}
.sectionTitle0 {
fill: #F9FFFE;
}
.sectionTitle1 {
fill: #F9FFFE;
}
.sectionTitle2 {
fill: #F9FFFE;
}
.sectionTitle3 {
fill: #F9FFFE;
}
.sectionTitle {
text-anchor: start;
font-size: 11px;
text-height: 14px;
}
/* Grid and axis */
.grid .tick {
stroke: rgba(255, 255, 255, 0.3);
opacity: 0.3;
shape-rendering: crispEdges;
}
.grid .tick text {
fill: lightgrey;
opacity: 0.5;
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: #DB5757;
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 1;
}
.taskText {
text-anchor: middle;
font-size: 11px;
}
.taskTextOutsideRight {
fill: #323D47;
text-anchor: start;
font-size: 11px;
}
.taskTextOutsideLeft {
fill: #323D47;
text-anchor: end;
font-size: 11px;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: #323D47;
}
.task0,
.task1,
.task2,
.task3 {
fill: #BDD5EA;
stroke: rgba(255, 255, 255, 0.5);
}
.taskTextOutside0,
.taskTextOutside2 {
fill: lightgrey;
}
.taskTextOutside1,
.taskTextOutside3 {
fill: lightgrey;
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: #81B1DB;
stroke: rgba(255, 255, 255, 0.5);
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: #323D47 !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
fill: lightgrey;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: #323D47 !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: #E83737;
fill: #E83737;
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: #E83737;
fill: #81B1DB;
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: #E83737;
fill: lightgrey;
stroke-width: 1;
cursor: pointer;
shape-rendering: crispEdges;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: lightgrey !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: #323D47 !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: lightgrey;
}
/*
*/
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-size: 12px;
background: #6D6D65;
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 2px;
pointer-events: none;
z-index: 100;
}

30
static/js/mermaid.js Normal file

File diff suppressed because one or more lines are too long