Update design to single page layout for my portfolio
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div class="copyright">
|
||||
<span>© {{ now.Year }} Powered by <a href="http://gohugo.io">Hugo</a></span>
|
||||
{{ end }}
|
||||
<span>:: Theme made by <a href="https://twitter.com/panr">panr</a></span>
|
||||
<span>:: Theme originally by <a href="https://twitter.com/panr">panr</a> and extended by <a href="/">yours truly</a>.</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
28
layouts/partials/section.html
Normal file
28
layouts/partials/section.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{{ if eq .Params.Layout "post" }}
|
||||
{{ if .Params.Cover }}
|
||||
<img src="{{ .Params.Cover | absURL }}" class="section-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
{{ end }}
|
||||
<div class="post-content">
|
||||
{{- with .Content -}}
|
||||
<div>
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if in "2col-left 2col-right" .Params.Layout }}
|
||||
<div class="section-2col section-{{ .Params.Layout | plainify }}">
|
||||
<div>
|
||||
<img src="{{ .Params.Cover | absURL }}" class="section-cover" alt="{{ .Title | plainify | default " " }}" />
|
||||
</div>
|
||||
<div class="section-2col-content post-content">
|
||||
{{- with .Content -}}
|
||||
<div>
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user