diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ac41f1a..f9ee8a3 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -11,12 +11,12 @@ {{ end }} - - + + {{ block "pagination" . }} {{ end }} - - + + {{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 090f7d0..08f7148 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ {{ define "main" }} - + {{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }} {{ range $paginator.Pages }} {{ partial "row.html" . }} @@ -11,31 +11,28 @@ {{ define "pagination" }} {{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }} {{ if $paginator.HasPrev }} - - Previous - + + + Previous + {{ else }} - - Previous - + Previous {{ end }} {{ $current_num := $paginator.PageNumber }} {{ range (seq 1 $paginator.TotalPages) }} {{ if (eq $current_num .)}} - {{.}} + {{.}} {{ else }} - {{.}} + {{.}} {{ end }} {{end}} {{ if $paginator.HasNext }} - - Next - + + Next + {{ else }} - - Next - + Next {{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f1b14c4..361a026 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,3 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3a89563..4a0b838 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,9 +1,11 @@ - + + + - - @@ -34,5 +36,10 @@ + + + + + {{ .Site.Params.title }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 01b186d..ae12357 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,7 +1,7 @@ - {{ .Site.Params.title }} - {{ .Site.Params.signature }} + {{ .Site.Params.title }} + {{ .Site.Params.signature }} \ No newline at end of file diff --git a/layouts/partials/pic_set.html b/layouts/partials/pic_set.html index 21ca548..7318a2b 100644 --- a/layouts/partials/pic_set.html +++ b/layouts/partials/pic_set.html @@ -1,33 +1,17 @@ - - - {{range $num,$a := .pic_set}} - {{if eq $num 0 }} - - {{ else }} - - {{ end }} - {{end}} - - - {{range $num,$a := .pic_set}} - {{if eq $num 0 }} - - + + + + {{ range $num, $a := .pic_set }} + + + + + + + + - {{else}} - - - - {{end}} - {{end}} + {{ end }} - - - Previous - - - - Next - \ No newline at end of file diff --git a/layouts/partials/row.html b/layouts/partials/row.html index 19c93a0..8c4f88d 100644 --- a/layouts/partials/row.html +++ b/layouts/partials/row.html @@ -1,94 +1,103 @@ - - - - {{ .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 }} - {{ .Date.Format "2006"}} - + - - - - {{ if gt .Params.top 0}} - - + + + + + {{ .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 }} + {{ .Date.Format "2006"}} + - {{ end }} - - - - {{ with .Params.avatar }} - - {{ else }} - - - {{ end }} - - {{ with .Params.name }} - {{ . }} - {{ else }} - {{ .Site.Params.name }} - {{ end }} - - {{ $tags_filtered := slice}} - {{ with .Params.tags }} - {{ range . }} - {{ with .}} - {{ $tags_filtered = $tags_filtered | append . }} - {{ end }} - {{ end }} - {{ end }} - {{ with $tags_filtered }} - {{ range . }}{{ . }}{{ end }} - {{ end }} + + + + + {{ if gt .Params.top 0}} + + - - - - - - - {{ .Content }} - - - - {{ with .Params.pic }} - - {{ 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 "baseurl" $.Site.BaseURL)}} - {{ end }} - - - - {{ .Date.Format "15:04" }} {{ .Params.note }} - - + + + + {{ with .Params.avatar }} + + {{ else }} + + + {{ end }} + + + {{ with .Params.name }} + {{ . }} + {{ else }} + {{ .Site.Params.name }} + {{ end }} + + {{ $tags_filtered := slice}} + {{ with .Params.tags }} + {{ range . }} + {{ with .}} + {{ $tags_filtered = $tags_filtered | append . }} + {{ end }} + {{ end }} + {{ end }} + {{ with $tags_filtered }} + {{ range . }}{{ . }}{{ end }} + {{ end }} + + + + + + + + {{ .Content }} + + + + {{ with .Params.pic }} + + {{ 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 "baseurl" + $.Site.BaseURL)}} + {{ end }} + + + + {{ .Date.Format "15:04" }} {{ .Params.note }} + + + + + - - + \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index 2321276..ec23899 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2,6 +2,82 @@ body{ background-color: #f5f5f5; } + +.pure-g [class*=pure-u]{ + font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji" !important; + font-weight: normal; + font-size: 16px; + line-height: 24px; + color: rgb(33, 37, 41); +} + +p{ + margin-top: 0; +} + +/* START - top cover part */ +.jumbotron{ + padding-top: 64px; +} + +.site-title{ + color: rgb(108, 117, 125); + font-size: 56px; + font-weight: 300; + margin-bottom: 20px; +} + +.signature{ + color: rgb(0, 0, 0, 0.5); + font-size: 20px; + font-weight: 300; +} + +/* END - top cover part */ + +/* START - pagination */ +.center{ + display: flex; + justify-content: center; +} + +.pagination{ + display: flex; + margin-top: 20px; + margin-bottom: 30px; +} + +.pagination a{ + color: #337cf6; + text-decoration: none; +} + +.page-item{ + border: #80808050; + border-style: solid; + border-width: 0.5px; + border-radius: 2%; + padding-left: 10px; + padding-right: 10px; + padding-top: 10px; + padding-bottom: 10px; +} + +.page-link .page-item:hover{ + background-color: #eaecef; + color: #2157ad; +} + +.page-item.active{ + background-color: #337cf6; + color: #ffffff; +} + +.page-item.disabled{ + color:rgb(108, 117, 125) +} +/* END - pagination */ + .page{ max-width: 1150px; margin: auto; @@ -14,16 +90,21 @@ body{ } } -.bodycontainer{ +.container{ max-width: 760px; - /* padding-right: 80px; */ + margin: auto; } -/* 时间 */ +.moment-content { + position: relative; +} + +/* START - time */ .time{ text-align: right; padding-right: 60px; /* white-space: nowrap; */ + font-weight: 300; } @media (max-width: 576px){ .time{ @@ -36,8 +117,22 @@ body{ padding-right: 20px; } } +.time .month-day{ + font-size: 24px; + margin-bottom: 10px; +} +.time .year{ + font-size: 16px; +} + +/* END - time */ /* 抬头 */ + +.user-info{ + display: flex; +} + .avatar{ max-height: 45px; float: left; @@ -53,15 +148,18 @@ body{ color:#186D9C!important; margin-bottom: 0; line-height: 1.1; + font-size: 24px; } .tag::before{ - content:"#" + content:"#"; + padding-right: 1px; } .tag{ font-size: 80%; margin-left: 0px; margin-right: 10px; + color: #6c757d!important; } /* 正文 */ @@ -78,14 +176,27 @@ body{ margin-top: 5px; } /* 图片集 */ -#carouselExampleIndicators{ - width: 80%; - padding-bottom:10px; - margin-top: 5px; +.pic-grid{ + max-width: 80%; } -.pic-in-set{ - height: 250px; +.pic-grid .img-container{ + padding-top: 50%; + padding-bottom: 50%; + position: relative; + height: 0px; +} + +.pic-grid img{ + object-fit: cover; + height: 100%; + width: 100%; + position: absolute; + top: 0 +} + +.pic-grid .add-padding{ + padding: 2.5px; } /* 内容附带的超链接 */ @@ -109,26 +220,45 @@ body{ } /* 附注信息 */ -.note{ +.moment-note{ + display: flex; + margin-bottom: 10px; + justify-content: space-between; +} + +.moment-note .note{ font-size: 80%; text-indent: 20px; - float: left; - margin-bottom: 10px; + color: rgb(0, 0, 0, 0.5); + + margin-top: 0; + margin-bottom: 0; +} + +.moment-note{ + margin-right: 5px; + color:#808080 +} + +/* hr */ +hr { + border-width: 0; + border-top: 1px solid; + border-color: rgb(0, 0, 0, 0.1); } /* footer底注 */ .footer { + padding-top: 20px; + padding-bottom: 30px; background-color: #f5f5f5; + + color: #6c757d !important; text-align: center; font-size: 95%; } -.footcontainer { - width: auto; - padding-right: 15px; - padding-left: 15px; -} -.footcontainer a{ +.footer a{ text-decoration: underline !important; color:#6c757d !important; }
{{ .Site.Params.signature }}
- {{ .Date.Format "15:04" }} {{ .Params.note }} -
{{ .Date.Format "15:04" }} {{ .Params.note }}