initial commit
This commit is contained in:
commit
d4097e8b0e
46 changed files with 525 additions and 0 deletions
0
layouts/404.html
Normal file
0
layouts/404.html
Normal file
28
layouts/_default/baseof.html
Normal file
28
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Pagination -->
|
||||
<nav aria-label="Page navigation .pagination-lg">
|
||||
<ul class="pagination justify-content-center">
|
||||
{{ block "pagination" . }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
</div>
|
||||
|
||||
{{ partial "after-content-js.html" . }}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
0
layouts/_default/list.html
Normal file
0
layouts/_default/list.html
Normal file
0
layouts/_default/single.html
Normal file
0
layouts/_default/single.html
Normal file
39
layouts/index.html
Normal file
39
layouts/index.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{{ define "main" }}
|
||||
<div class="container bodycontainer">
|
||||
{{ range .Paginator.Pages }}
|
||||
{{ partial "row.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "pagination" }}
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub .Paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub .Paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ $current_num := .Paginator.PageNumber }}
|
||||
{{ range (seq 1 .Paginator.TotalPages) }}
|
||||
{{ if (eq $current_num .)}}
|
||||
<li class="page-item active"><a class="page-link" href="{{$.Site.BaseURL}}/{{.}}">{{.}}</a></li>
|
||||
{{ else }}
|
||||
<li class="page-item"><a class="page-link" href="{{$.Site.BaseURL}}/{{.}}">{{.}}</a></li>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{ add .Paginator.PageNumber 1 }}">Next</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{ add .Paginator.PageNumber 1 }}">Next</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
12
layouts/partials/after-content-js.html
Normal file
12
layouts/partials/after-content-js.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!-- Like button -->
|
||||
<script>
|
||||
$("i").click(function(){
|
||||
if ($(this).attr("red") == 'true'){
|
||||
$(this).animate({color:"#808080"});
|
||||
$(this).attr("red", false);
|
||||
} else {
|
||||
$(this).animate({color:"#ff0000"});
|
||||
$(this).attr("red", true);
|
||||
}
|
||||
});
|
||||
</script>
|
5
layouts/partials/footer.html
Normal file
5
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<footer class="footer mt-auto py-3">
|
||||
<div class="container footcontainer">
|
||||
<div class="text-muted">Powered by <a href="https://www.hugo.io">Hugo</a> | Theme <a href="hhttps://github.com/FarseaSH/hugo-theme-moments">Moments</a></div>
|
||||
</div>
|
||||
</footer>
|
35
layouts/partials/head.html
Normal file
35
layouts/partials/head.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- 点赞 -->
|
||||
<link href="https://cdn.bootcss.com/font-awesome/5.8.2/css/all.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||
|
||||
<!-- favicon -->
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/favicon/manifest.json">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- the Moments style css file -->
|
||||
<link rel="stylesheet" type="text/css" href="/css/style.css">
|
||||
|
||||
<!-- website title -->
|
||||
<title>{{ .Site.Params.title }}</title>
|
7
layouts/partials/header.html
Normal file
7
layouts/partials/header.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="jumbotron jumbotron-fluid" style="background-image: url({{ .Site.Params.cover }});
|
||||
background-position: center center;background-size: cover; min-height: 200px; text-align: center">
|
||||
<div class="container">
|
||||
<h1 class="display-4 text-secondary">{{ .Site.Params.title }}</h1>
|
||||
<p class="lead text-black-50">{{ .Site.Params.signature }}</p>
|
||||
</div>
|
||||
</div>
|
12
layouts/partials/link-block.html
Normal file
12
layouts/partials/link-block.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="share-link-block">
|
||||
<table class="link-table">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="\link-logos\default_link_logo.png" class="link-logo">
|
||||
</td>
|
||||
<td style="padding-left: 20px">
|
||||
<a href="{{ .a }}">{{.word}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
33
layouts/partials/pic_set.html
Normal file
33
layouts/partials/pic_set.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<!-- START -->
|
||||
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
{{range $num,$a := .pic_set}}
|
||||
{{if eq $num 0 }}
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
|
||||
{{ else }}
|
||||
<li data-target="#carouselExampleIndicators" data-slide-to="{{$num}}"></li>
|
||||
{{ end }}
|
||||
{{end}}
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
{{range $num,$a := .pic_set}}
|
||||
{{if eq $num 0 }}
|
||||
<div class="carousel-item active">
|
||||
<img src="{{$a}}" class="d-block w-100 pic-in-set" alt="{{add $num 1}}">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="carousel-item">
|
||||
<img src="{{$a}}" class="d-block w-100 pic-in-set" alt="{{add $num 1}}">
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
|
||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
|
||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
84
layouts/partials/row.html
Normal file
84
layouts/partials/row.html
Normal file
|
@ -0,0 +1,84 @@
|
|||
<div class="row">
|
||||
<!-- 时间 -->
|
||||
<div class="col-sm-4 time">
|
||||
<h2>{{ .Date.Format "Jan 2"}}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}</h2>
|
||||
<h4>{{ .Date.Format "2006"}}</h4>
|
||||
</div>
|
||||
|
||||
<!-- 正文 -->
|
||||
<div class="col-sm-8">
|
||||
<!-- 抬头 -->
|
||||
<!-- 头像前面margin2px -->
|
||||
<div style="margin-top: 2px;">
|
||||
{{ with .Params.avatar }}
|
||||
<img src='{{ . }}' class="avatar">
|
||||
{{ else }}
|
||||
<img src='{{ .Site.Params.avatar}}' class="avatar">
|
||||
{{ end }}
|
||||
<div class="intro">
|
||||
{{ with .Params.name }}
|
||||
<h4 class="text-primary name">{{ . }}</h4>
|
||||
{{ else }}
|
||||
<h4 class="text-primary name">{{ .Site.Params.name }}</h4>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ $tags_filtered := slice}}
|
||||
{{ with .Params.tags }}
|
||||
{{ range . }}
|
||||
{{ with .}}
|
||||
{{ $tags_filtered = $tags_filtered | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with $tags_filtered }}
|
||||
{{ range . }}<span class="tag text-muted">{{ . }}</span>{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 抬头后面内容右平移5px,与头像兼容显得自然 -->
|
||||
<div style="padding-left: 5px; padding-right: 5px;">
|
||||
<!-- 文字 -->
|
||||
<div class="context">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<!-- 图片 -->
|
||||
{{ with .Params.pic }}
|
||||
<img src="{{ . }}" class="img-fluid pic1" alt="Responsive image"></img>
|
||||
{{ end }}
|
||||
|
||||
<!-- 图片集 -->
|
||||
{{ $pic_set_filtered := slice}}
|
||||
{{ with .Params.pic_set }}
|
||||
{{ range . }}
|
||||
{{ with .}}
|
||||
{{ $pic_set_filtered = $pic_set_filtered | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $pic_set_filtered }}
|
||||
{{ partial "pic_set.html" (dict "pic_set" .) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $link_link := .Params.link }}
|
||||
{{ $link_logo := .Params.link_logo }}
|
||||
{{ $link_text := .Params.link_text }}
|
||||
|
||||
{{ with .Params.link }}
|
||||
{{ partial "link-block.html" (dict "logo" $link_logo "a" $link_link "word" $link_text)}}
|
||||
{{ end }}
|
||||
|
||||
<!-- 附注信息 -->
|
||||
<div>
|
||||
<p class="text-black-50 note">
|
||||
{{ .Date.Format "15:04" }} {{ .Params.note }}
|
||||
</p>
|
||||
<i class="far fa-heart" style="float: right; margin-right: 5px; color:#808080"></i>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 分隔线 -->
|
||||
<hr style="clear: both">
|
||||
</div>
|
||||
</div>
|
12
layouts/shortcodes/link.html
Normal file
12
layouts/shortcodes/link.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div class="share-link-block">
|
||||
<table class="link-table">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="\logo\{{ .Get "logo" }}" class="link-logo" >
|
||||
</td>
|
||||
<td style="padding-left: 20px">
|
||||
<a href="{{ .Get "a" }}">{{.Inner}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue