Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
HidegonSan committed Nov 26, 2023
1 parent 1279c1a commit b773122
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions content/posts/my-blog-tweaks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ License: MIT

[Mermaid](https://mermaid.js.org/) is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create complex diagrams.

```mermaid
{{< mermaid >}}
sequenceDiagram
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
Alice-)John: See you later!
```
{{< /mermaid >}}

License: MIT

Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/_markup/render-codeblock-mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
{{- $result.Wrapped | safeHTML -}}
</div>

{{- .Page.Scratch.Set "hasMermaid" true -}}
{{- .Page.Store.Set "hasMermaid" true -}}
2 changes: 1 addition & 1 deletion layouts/_default/_markup/render-codeblock.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
{{- $result.Wrapped -}}
{{- end -}}

{{- .Page.Scratch.Set "hasCodeblock" true -}}
{{- .Page.Store.Set "hasCodeblock" true -}}
2 changes: 1 addition & 1 deletion layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
{{/* end of local resources */}}
{{- end -}}

{{- .Page.Scratch.Set "hasImage" true -}}
{{- .Page.Store.Set "hasImage" true -}}

<!-- Cf. https://gohugo.io/content-management/image-processing/ -->
3 changes: 2 additions & 1 deletion layouts/partials/head/css/chroma_css.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{/* chroma css */}}

{{- if .Page.Scratch.Get "hasCodeblock" -}}
{{/* {{- if .Page.Store.Get "hasCodeblock" -}} */}}
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search")) -}}

{{/* bundle chroma css */}}
{{- $chroma_dark := (resources.Get "css/chroma/chroma_dark.css") -}}
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/head/css/image_modal_css.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{/* image modal css */}}

{{- if .Page.Scratch.Get "hasImage" -}}
{{/* {{- if .Page.Store.Get "hasImage" -}} */}}
{{- if true -}}
<style>
{{- with resources.Get "css/custom/image_modal.css" | toCSS | minify -}}
{{- .Content | safeCSS -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/head/mermaid.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (.Page.Scratch.Get "hasMermaid") (.HasShortcode "mermaid") -}}
{{- if or (.Page.Store.Get "hasMermaid") (.HasShortcode "mermaid") -}}

{{- $mermaid_license_body := "/*\nSPDX-License-Identifier: MIT\nLicensed under the MIT license.\nhttps://github.com/mermaid-js/mermaid/blob/develop/LICENSE\nhttps://opensource.org/license/mit/\n*/\n" -}}
{{- $mermaid_license_js := $mermaid_license_body | resources.FromString "js/mermaid_license.js" -}}
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/header/image_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

*/}}

{{- if .Page.Scratch.Get "hasImage" -}}
{{/* {{- if .Page.Store.Get "hasImage" -}} */}}
{{- if true -}}
<div id="image_modal" class="image_modal" onclick="close_image_modal()">
<button class="image_modal_close" onclick="close_image_modal()">close</button>
<div class="image_modal_content" onclick="close_image_modal()">
Expand Down

0 comments on commit b773122

Please sign in to comment.