added partial cached and new notice on elemnt page

This commit is contained in:
somratpro 2021-06-01 14:04:53 +06:00
parent 4685e0da58
commit e31a93dbd3
4 changed files with 12 additions and 4 deletions

View file

@ -94,6 +94,10 @@ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam nihil enim maxime
This is a simple info.
{{< /notice >}}
{{< notice warning >}}
This is a simple warning.
{{< /notice >}}
<hr>
#### Tab

View file

@ -94,6 +94,10 @@ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam nihil enim maxime
This is a simple info.
{{< /notice >}}
{{< notice warning >}}
This is a simple warning.
{{< /notice >}}
<hr>
#### Tab

View file

@ -7,18 +7,18 @@
{{ "<!-- header -->" | safeHTML }}
<header class="banner {{if .Site.Params.banner.bg_image}}overlay bg-cover{{else}}bg-primary{{end}}" data-background="{{ .Site.Params.banner.bg_image | absURL }}">
{{ partial "navigation.html" . }}
{{ partial "banner.html" . }}
{{ partialCached "banner.html" . }}
</header>
{{ "<!-- /header -->" | safeHTML }}
{{ else }}
{{ "<!-- header -->" | safeHTML }}
<header class="shadow-bottom sticky-top bg-white">
{{ partial "navigation.html" . }}
{{ partialCached "navigation.html" . }}
</header>
{{ "<!-- /header -->" | safeHTML }}
{{ end }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
{{ partialCached "footer.html" . }}
</body>
</html>

View file

@ -1,3 +1,3 @@
{{ $_hugo_config := `{ "version": 1 }` }}
<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}><p>{{ .Inner | markdownify }}</p></div>
<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}><p>{{ .Inner | markdownify }}</p></div>