1
0
Fork 0

feat: use latex hugo template

This commit is contained in:
Youwen Wu 2025-06-21 02:30:42 -07:00
parent 1d12f5614d
commit 9004c27ceb
Signed by untrusted user: youwen
GPG key ID: 865658ED1FE61EC3
56 changed files with 1666 additions and 2 deletions

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
{{- if site.Params.darkmode -}}
<body class="latex-dark">
{{- else if site.Params.lightmode -}}
<body>
{{- else -}}
<body class="latex-dark-auto">
{{- end -}}
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View file

@ -0,0 +1,29 @@
{{ define "main" }}
<div class="container" role="main">
<div class="posts-list">
{{ if .IsHome }}
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ else }}
{{ $pag := .Paginator.Pages }}
{{ end }}
{{ range .Paginator.Pages }}
{{ partial "preview.html" . }}
{{ end }}
</div>
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<ul class="pager">
{{ if .Paginator.HasPrev }}
<li class="previous">
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">&larr; Newer</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">Older &rarr;</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
{{ end }}

View file

@ -0,0 +1,25 @@
{{ define "main" }}
<div class="container" role="main">
<article class="article" class="blog-post">
<div class="postmeta">
{{ partial "postmeta.html" . }}
</div>
<br>
{{ partial "toc.html" . }}
{{ if .Params.tags }}
<div class="blog-tags">
{{ range .Params.tags }}
<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}
</article>
{{ if and (gt .WordCount 400) (.Param "backtotop") }}
{{ partial "backtotop.html" . }}
<button onclick="topFunction()" id="backtotopButton">
<i class="fa fa-angle-up"></i>
</button>
{{ end }}
</div>
{{ end }}

View file

@ -0,0 +1,16 @@
{{ define "main" }}
<div class="container" role="main">
<article class="post-preview">
{{ range .Data.Terms.Alphabetical }}
<div class="terms">
<h4 class="term-name" >
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a>
<span class="badge">{{ .Count }}</span>
</h4>
</div>
{{ end }}
</article>
</div>
{{ end }}