commit
d9b7678e64
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-chart-histogram"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 3v18h18" /><path d="M20 18v3" /><path d="M16 16v5" /><path d="M12 13v8" /><path d="M8 16v5" /><path d="M3 11c6 0 5 -5 9 -5s3 5 9 5" /></svg>
|
After Width: | Height: | Size: 468 B |
110
exampleSiteMultilingual/content/posts/demo-diagram/index.zh.md
Normal file
110
exampleSiteMultilingual/content/posts/demo-diagram/index.zh.md
Normal file
@ -0,0 +1,110 @@
|
||||
+++
|
||||
author = "Hugo Authors"
|
||||
title = "Demo - Support for Diagrams"
|
||||
date = "2024-05-06"
|
||||
description = "Guide to advanced usage of Anubis2"
|
||||
tags = [
|
||||
"emoji",
|
||||
]
|
||||
+++
|
||||
|
||||
Feel free to switch between the light and dark themes to see how the diagram adapts its colors accordingly.
|
||||
|
||||
## Mermaid Diagrams
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title A Gantt Diagram
|
||||
dateFormat YYYY-MM-DD
|
||||
section Section
|
||||
A task :a1, 2014-01-01, 30d
|
||||
Another task :after a1, 20d
|
||||
section Another
|
||||
Task in Another :2014-01-12, 12d
|
||||
another task :24d
|
||||
|
||||
```
|
||||
|
||||
Get more examples at [About Mermaid](https://mermaid.js.org/intro/)
|
||||
|
||||
<!--more-->
|
||||
|
||||
```mermaid
|
||||
gitGraph:
|
||||
commit "Ashish"
|
||||
branch newbranch
|
||||
checkout newbranch
|
||||
commit id:"1111"
|
||||
commit tag:"test"
|
||||
checkout main
|
||||
commit type: HIGHLIGHT
|
||||
commit
|
||||
merge newbranch
|
||||
commit
|
||||
branch b2
|
||||
commit
|
||||
```
|
||||
|
||||
|
||||
|
||||
```mermaid
|
||||
stateDiagram
|
||||
[*] --> Still
|
||||
Still --> [*]
|
||||
|
||||
Still --> Moving
|
||||
Moving --> Still
|
||||
Moving --> Crash
|
||||
Crash --> [*]
|
||||
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sankey-beta
|
||||
|
||||
Pumped heat,"Heating and cooling, ""homes""",193.026
|
||||
Pumped heat,"Heating and cooling, ""commercial""",70.672
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
loop Daily query
|
||||
Alice->>Bob: Hello Bob, how are you?
|
||||
alt is sick
|
||||
Bob->>Alice: Not so good :(
|
||||
else is well
|
||||
Bob->>Alice: Feeling fresh like a daisy
|
||||
end
|
||||
|
||||
opt Extra response
|
||||
Bob->>Alice: Thanks for asking
|
||||
end
|
||||
end
|
||||
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts <br/>prevail!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
## GoAT
|
||||
|
||||
```goat
|
||||
. . . .--- 1 .-- 1 / 1
|
||||
/ \ | | .---+ .-+ +
|
||||
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
|
||||
+ + | | | | ---+ ---+ +
|
||||
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
|
||||
/ \ / \ | | | | | | | | '---+ '-+ +
|
||||
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
|
||||
```
|
@ -3,11 +3,13 @@ languageCode = "en-us"
|
||||
defaultContentLanguage = "en"
|
||||
title = "Anubis2 Demo Site"
|
||||
theme = "anubis2"
|
||||
paginate = 5
|
||||
|
||||
disqusShortname = ""
|
||||
|
||||
[author]
|
||||
[pagination]
|
||||
pagerSize = 5
|
||||
|
||||
|
||||
[params.author]
|
||||
name = "Junyi"
|
||||
email = "me@junyi.dev"
|
||||
location = "Singapore"
|
||||
|
@ -12,9 +12,27 @@
|
||||
<link>{{ .RelPermalink }}</link>
|
||||
<description>{{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<language>{{.}}</language>{{end}}
|
||||
{{ with .Site.Params.author }}
|
||||
{{ with .email }}
|
||||
<managingEditor>{{.}}
|
||||
{{ with $.Site.Params.author.name }}
|
||||
({{.}})
|
||||
{{end}}
|
||||
</managingEditor>
|
||||
{{end}}
|
||||
|
||||
{{ with .Site.Params.author.email }}
|
||||
<webMaster>
|
||||
{{.}}
|
||||
{{ with $.Site.Params.author.name }}
|
||||
({{.}})
|
||||
{{end}}
|
||||
</webMaster>
|
||||
{{end}}
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
@ -25,7 +43,7 @@
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .RelPermalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
{{ with .Site.Params.author.email }}<author>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .RelPermalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
|
@ -23,8 +23,8 @@
|
||||
</article>
|
||||
|
||||
{{ $readNextPosts := 3}}
|
||||
{{ if isset .Site.Params "readnextposts" }}
|
||||
{{ $readNextPosts = .Site.Params.readNextPosts }}
|
||||
{{ if site.Params.readNextPosts }}
|
||||
{{ $readNextPosts = site.Params.readNextPosts }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt $readNextPosts 0 }}
|
||||
@ -56,7 +56,7 @@
|
||||
{{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/load-mermaid.js") }}
|
||||
|
||||
{{ $colorTheme := "light" }}
|
||||
{{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }}
|
||||
{{ if and (site.Params.colortheme) (ne site.Params.colortheme "") }}
|
||||
{{ $colorTheme = site.Params.colortheme | lower }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ if .Site.Config.Services.Disqus.Shortname }}
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ end }}
|
||||
|
||||
|
@ -5,23 +5,23 @@
|
||||
{{ end }}
|
||||
|
||||
<div class="common-footer-bottom">
|
||||
{{ if .Site.Menus.footer }}
|
||||
{{ if site.Menus.footer }}
|
||||
{{ $currentPage := . }}
|
||||
<ul class="footer-menu">
|
||||
{{ range .Site.Menus.footer }}
|
||||
{{ range site.Menus.footer }}
|
||||
<li><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
<div style="display: flex; align-items: center; gap:8px">
|
||||
© {{ if isset .Site.Author "name"}}{{ .Site.Author.name }}, {{end}}{{ now.Year }}
|
||||
{{ if .Site.Params.UmamiAnalytics.shareUrl }}
|
||||
<a aria-label="Check statistics data" style="display: flex; align-items: center; border-bottom: none; cursor: pointer; color: var(--pagination-link-color)" href="{{ .Site.Params.UmamiAnalytics.shareUrl }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-report-analytics"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /><path d="M9 17v-5" /><path d="M12 17v-1" /><path d="M15 17v-3" /></svg></a>
|
||||
© {{ if site.Params.Author.name }} {{ site.Params.Author.name }}, {{end}} {{ now.Year }}
|
||||
{{ if site.Params.UmamiAnalytics.shareUrl }}
|
||||
<a aria-label="Check statistics data" style="display: flex; align-items: center; border-bottom: none; cursor: pointer; color: var(--pagination-link-color)" href="{{ site.Params.UmamiAnalytics.shareUrl }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-report-analytics"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2" /><path d="M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z" /><path d="M9 17v-5" /><path d="M12 17v-1" /><path d="M15 17v-3" /></svg></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div style="display:flex;align-items: center">
|
||||
{{ $police := .Site.Params.police }}
|
||||
{{ $police := site.Params.police }}
|
||||
{{ $info := "info" }}
|
||||
{{ $pattern := "[0-9]+" }}
|
||||
{{ $matches := findRE $pattern $police }}
|
||||
@ -29,11 +29,11 @@
|
||||
{{ $firstNumber := index $matches 0 }}
|
||||
{{ $info = print $firstNumber }}
|
||||
<img src="https://beian.mps.gov.cn/img/logo01.dd7ff50e.png" alt="备案图标" style="width: 1em;height: 1em;object-fit: contain;">
|
||||
<a target="_blank" href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{$info}}">{{ .Site.Params.police }}</a>
|
||||
<a target="_blank" href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{$info}}">{{ site.Params.police }}</a>
|
||||
|
||||
{{ end }}
|
||||
{{ if .Site.Params.icp }}
|
||||
<a target="_blank" href="https://beian.miit.gov.cn/">{{ .Site.Params.icp }}</a>
|
||||
{{ if site.Params.icp }}
|
||||
<a target="_blank" href="https://beian.miit.gov.cn/">{{ site.Params.icp }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div>
|
||||
|
@ -1,7 +1,24 @@
|
||||
<article class="post-list h-feed post-card">
|
||||
<div class="post-header">
|
||||
<header>
|
||||
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " | markdownify }}</a></h1>
|
||||
{{ $random := (md5 .Title) }}
|
||||
{{ $iconPath := printf "%sicon.svg" .File.Dir }}
|
||||
{{ if fileExists $iconPath }}
|
||||
<style>
|
||||
.post-icon-{{ $random }}::before {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
background: url("/{{ $iconPath }}");
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
background-size: auto 100%;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
</style>
|
||||
{{ end }}
|
||||
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}} {{ if fileExists $iconPath}}post-icon-{{$random}}{{end}}">
|
||||
<a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " | markdownify }}</a>
|
||||
</h1>
|
||||
</header>
|
||||
{{ partial "post-language-switcher.html" . }}
|
||||
</div>
|
||||
@ -11,6 +28,7 @@
|
||||
{{ .Summary | safeHTML }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if and (.Truncated) (.Site.Params.readMore) }}
|
||||
<div class="read-more">
|
||||
<a class="u-url" href="{{ .RelPermalink }}">{{ i18n "readMore" }}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user