-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
70 changed files
with
9,709 additions
and
1,110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
## 该目录用于映射到网站的/assets路径 | ||
## 该目录用于映射到网站的/assets路径 | ||
|
||
### 14px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,3 @@ | |
</div> | ||
</article> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
{{range slice .PostArr 1}} | ||
{{range $idx, $val := (slice .Contents 1) }} | ||
{{if eq $val.Type "post"}} | ||
<div class="post"> | ||
<a data-id="{{ .Cid }}" href="/archives/{{.Cid}}" title="{{.Title}}"> | ||
<img class="cover" width="680" height="440" src="/usr/uploads{{.GetCoverList}}" alt="illustration"> | ||
<a data-id="{{ $val.Cid }}" href="/archives/{{$val.Cid}}" title="{{$val.Title}}"> | ||
<img class="cover" width="680" height="440" src="/usr/uploads{{(index $.Fields $idx).StrValue}}" alt="illustration"> | ||
</a> | ||
<div class="else"> | ||
<p>{{ .UnixToStr }}</p> | ||
<h3><a data-id="{{ .Cid }}" class="posttitle" href="/archives/{{ .Cid }}">{{ .Title }}</a></h3> | ||
<p>{{ $val.UnixToStr }}</p> | ||
<h3><a data-id="{{ .Cid }}" class="posttitle" href="/archives/{{ $val.Cid }}">{{ $val.Title }}</a></h3> | ||
<div class="abstract"> | ||
<p>{{- .MDSub -}}...</p> | ||
<p>{{- $val.MDSub -}}...</p> | ||
</div> | ||
<div class="here"> | ||
<span class="icon-letter"></span> | ||
<p>{{ .MDCount }}</p> | ||
<p>{{ $val.MDCount }}</p> | ||
<span class="icon-view"></span> | ||
<p>{{ .Views }}</p> | ||
<p>{{ $val.Views }}</p> | ||
<span class="icon-like"></span> | ||
<p>{{ .Likes }}</p> | ||
<p>{{ $val.Likes }}</p> | ||
</div> | ||
</div> | ||
</div> | ||
{{- end }} | ||
{{if ne .HaveNext 0}} | ||
<div id="pager"> | ||
<a href="/page/{{.HaveNext}}" data-url="/page/{{.HaveNext}}" class="more">加载更多</a> | ||
</div> | ||
{{end}} | ||
{{end}} | ||
{{end}} | ||
{{if ge (len .Contents) 5}} | ||
{{if eq (index .Contents 5).Type "post"}} | ||
<div id="pager"> | ||
<a href="/page/2" class="more">加载更多</a> | ||
</div> | ||
<script> | ||
// 获取当前页面URL | ||
const url = window.location.pathname; | ||
// 正则匹配提取页码 | ||
const pageMatch = url.match(/\/page\/(\d+)/); | ||
|
||
// 拼接新的链接 | ||
const newUrl = `/page/${pageMatch}`; | ||
|
||
document.querySelector('.more').href = newUrl; | ||
</script> | ||
{{end}} | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.