aboutsummaryrefslogtreecommitdiff
path: root/www/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'www/layouts')
-rw-r--r--www/layouts/_default/baseof.html7
-rw-r--r--www/layouts/_default/list.html2
-rw-r--r--www/layouts/_default/single.html2
-rw-r--r--www/layouts/index.html6
-rw-r--r--www/layouts/partials/highlight.html6
-rw-r--r--www/layouts/partials/nav.html2
-rw-r--r--www/layouts/shortcodes/link-group.html25
-rw-r--r--www/layouts/shortcodes/mono.html3
-rw-r--r--www/layouts/shortcodes/todo.html1
9 files changed, 43 insertions, 11 deletions
diff --git a/www/layouts/_default/baseof.html b/www/layouts/_default/baseof.html
index 55954d3..621aea1 100644
--- a/www/layouts/_default/baseof.html
+++ b/www/layouts/_default/baseof.html
@@ -9,11 +9,14 @@
<title>{{ block "title" . }}
{{ .Site.Title }}
{{ end }}</title>
- {{ partial "js.html" "color-scheme.ts" }}
+ {{ partial "js.html" "res/js/color-scheme.ts" }}
{{ partial "css-res.html" (partial "highlight.html" dict) }}
- {{ partial "css.html" "base-style.css" }}
+ {{ partial "css.html" "res/css/base.css" }}
{{ block "head" . }}
{{ end }}
+ {{ range .Params.css }}
+ {{ partial "css.html" (printf "res/css/%s.css" .) }}
+ {{ end }}
</head>
<body>
<div id="slogan">
diff --git a/www/layouts/_default/list.html b/www/layouts/_default/list.html
index ddc3942..c7c6cce 100644
--- a/www/layouts/_default/list.html
+++ b/www/layouts/_default/list.html
@@ -1,5 +1,5 @@
{{ define "head"}}
- {{ partial "css.html" "partials/preview/article.css" }}
+ {{ partial "css.html" "res/css/article.css" }}
{{ end }}
{{ define "content" }}
diff --git a/www/layouts/_default/single.html b/www/layouts/_default/single.html
index 1f267eb..cd0e9c5 100644
--- a/www/layouts/_default/single.html
+++ b/www/layouts/_default/single.html
@@ -1,5 +1,5 @@
{{ define "head"}}
- {{ partial "css.html" "single.css" }}
+ {{ partial "css.html" "res/css/single.css" }}
{{ end }}
{{ define "title" }}
diff --git a/www/layouts/index.html b/www/layouts/index.html
index 55e49ff..7b33a6a 100644
--- a/www/layouts/index.html
+++ b/www/layouts/index.html
@@ -1,6 +1,6 @@
{{ define "head"}}
- {{ partial "css.html" "home.css" }}
- {{ partial "css.html" "partials/preview/article.css" }}
+ {{ partial "css.html" "res/css/home.css" }}
+ {{ partial "css.html" "res/css/article.css" }}
{{ end }}
{{ define "friend" }}
@@ -10,7 +10,7 @@
<img class="friend-avatar" alt="Friend {{.name}}'s avatar" src="{{.avatar}}" width="80"
height="80" /><br />{{.name}}</a>
<a rel="noopener noreferrer" href="{{ $gh_url }}">
- {{- with resources.Get "github-mark.png" -}}
+ {{- with resources.Get "res/img/gh.png" -}}
<img class="friend-github" src="{{ .RelPermalink }}" />
{{- end -}}
</a><br />
diff --git a/www/layouts/partials/highlight.html b/www/layouts/partials/highlight.html
index 06ab047..28c510e 100644
--- a/www/layouts/partials/highlight.html
+++ b/www/layouts/partials/highlight.html
@@ -1,6 +1,6 @@
-{{ $light := resources.Get "catppuccin-latte.css" }}
-{{ $dark := resources.Get "catppuccin-mocha.css" }}
+{{ $light := resources.Get "res/css/catppuccin-latte.css" }}
+{{ $dark := resources.Get "res/css/catppuccin-mocha.css" }}
{{ $dark_wrapper_before := resources.FromString "highlight-dark-wapper-before.css" `html[data-theme="dark"] {`}}}
{{ $dark_wrapper_after := resources.FromString "highlight-dark-wapper-after.css" "}"}}
-{{ $highlight := slice $light $dark_wrapper_before $dark $dark_wrapper_after | resources.Concat "highlight.css" }}
+{{ $highlight := slice $light $dark_wrapper_before $dark $dark_wrapper_after | resources.Concat "res/css/highlight.css" }}
{{ return $highlight }}
diff --git a/www/layouts/partials/nav.html b/www/layouts/partials/nav.html
index 42c9ad1..4ecf622 100644
--- a/www/layouts/partials/nav.html
+++ b/www/layouts/partials/nav.html
@@ -2,5 +2,5 @@
{{ range .Ancestors.Reverse }}
<a class="mono-link" href="{{ .RelPermalink }}">{{ lower .Title }}</a> >
{{ end }}
- this
+ this: {{.Title}}
</nav>
diff --git a/www/layouts/shortcodes/link-group.html b/www/layouts/shortcodes/link-group.html
new file mode 100644
index 0000000..b16c2bc
--- /dev/null
+++ b/www/layouts/shortcodes/link-group.html
@@ -0,0 +1,25 @@
+<div class="mono link-group">
+ {{ $self := . }}
+ {{ $lines := slice }}
+ {{ range split .Inner "\n" }}
+ {{ if strings.ContainsNonSpace . }}
+ {{ $lines = $lines | append (strings.TrimSpace .) }}
+ {{ end }}
+ {{ end }}
+ {{ $notitle := false }}
+ {{ if .IsNamedParams }}
+ {{ $notitle = .Get "notitle" }}
+ {{ else }}
+ {{ $notitle = in .Params "notitle" }}
+ {{ end }}
+ {{ if not $notitle }}
+ {{ $title := index $lines 0 }}
+ <div class="link-group-title">{{ $title | $self.Page.RenderString }}</div>
+ {{ $lines = $lines | after 1 }}
+ {{ end }}
+ <div class="link-group-list">
+ {{ range $lines }}
+ <div class="link-group-item">{{ . | $self.Page.RenderString }}</div>
+ {{ end }}
+ </div>
+</div>
diff --git a/www/layouts/shortcodes/mono.html b/www/layouts/shortcodes/mono.html
new file mode 100644
index 0000000..ab183a5
--- /dev/null
+++ b/www/layouts/shortcodes/mono.html
@@ -0,0 +1,3 @@
+<div class="mono-container">
+ {{ .Inner | .Page.RenderString }}
+</div>
diff --git a/www/layouts/shortcodes/todo.html b/www/layouts/shortcodes/todo.html
new file mode 100644
index 0000000..1327b31
--- /dev/null
+++ b/www/layouts/shortcodes/todo.html
@@ -0,0 +1 @@
+<span class="todo {{ .Get "state" }}">{{ .Get "name" }}</span> \ No newline at end of file