完工所有页面

This commit is contained in:
小赵同学 committed 2024-07-11 16:41:31 +08:00
1 parent a216eeb04b
commit 1ccca963f2
5 files changed
+192 -21

No files matched your search

+5
View File
@@ -48,6 +48,11 @@ name = "links"
weight = 20
url = "/links"
[[menu.main]]
name = "archives"
weight = 20
url = "/archives"
# 模块配置
[module]
# Hugo 版本要求
@@ -0,0 +1,42 @@
{{ define "main" }}
<div id="pjax-container">
{{/* <h1 class="post-title">{{ .Title }}</h1> */}}
<div class="post-content" style="list-style-type: none;">
{{ $currentYear := 0 }}
{{ $currentMonth := 0 }}
{{ range .Site.RegularPages }}
{{ if eq .Type "post" }}
{{ $year := .Date.Year }}
{{ $month := .Date.Month }}
{{ if ne $year $currentYear }}
{{ with $currentYear }} {{ if ne $currentYear 0 }} </div> {{ end }} {{ end }}
<div class="link-title a-title" uk-scrollspy="cls: uk-animation-slide-left-medium; repeat: false">
<span>{{ $year }}</span>
</div>
{{ $currentYear = $year }}
{{ $currentMonth = 0 }}
{{ end }}
{{ if ne $month $currentMonth }}
{{ with $currentMonth }} {{ if ne $currentMonth 0 }}
</div> {{ end }} {{ end }}
<h3 class="diy-h3" uk-scrollspy="cls: uk-animation-slide-right-medium; repeat: false" data-toggle="collapse"
data-target="#collapse{{ $year }}{{ printf " %02d" $month }}" aria-expanded="false"
aria-controls="collapse{{ $year }}{{ printf " %02d" $month }}">
{{ $month | printf "%02d" }}月
</h3>
<div class="collapse" id="collapse{{ $year }}{{ printf " %02d" $month }}"
uk-scrollspy="cls: uk-animation-slide-right-medium; repeat: false">
{{ $currentMonth = $month }}
{{ end }}
<li data-date="{{ $year }}{{ printf " %02d" $month }}{{ .Date.Day }}">
<span class="articles_date_time">{{ .Date.Format "01/02" }}</span>
<a class="a-archives" uk-scrollspy="cls: uk-animation-slide-left-medium; repeat: false"
href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
{{ end }}
{{ if ne $currentMonth 0 }}
</div> {{ end }}
</div>
</div>
{{ end }}
+27 -2
View File
@@ -1422,12 +1422,36 @@ font-size: 14px;
flex-wrap: wrap
}
.link-list a {
/* .link-list a {
display: block;
width: 47%;
padding: 8px
} */
/* 基本样式 */
.link-list a {
display: block;
width: 47%;
padding: 8px;
box-sizing: border-box; /* 包括padding和border在内计算宽度 */
}
/* 移动端样式调整 */
@media (max-width: 768px) {
.link-list a {
width: 100%; /* 在小屏幕上占据整个宽度 */
padding: 12px; /* 在小屏幕上增加内边距 */
}
}
/* 更小屏幕的样式调整 */
@media (max-width: 480px) {
.link-list a {
padding: 15px; /* 在更小的屏幕上增加内边距 */
}
}
.link-list .inner {
display: flex;
flex-direction: column;
@@ -1436,7 +1460,8 @@ font-size: 14px;
border: 1px solid #eceff2;
padding: 0 23px;
height: 100px;
transition: color,background .2s ease-in-out
transition: color,background .2s ease-in-out;
box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
}
.link-list .inner:hover {