去除首页第一篇文章特殊样式
This commit is contained in:
parent
20494e19ad
commit
fe3849c963
2 changed files with 5 additions and 6 deletions
|
@ -9,13 +9,12 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") (index .Site.Params "paginate" | default 10) }}
|
{{ $paginator := .Paginate (where .Pages ".Params.type" "!=" "page") (index .Site.Params "paginate" | default 10) }}
|
||||||
{{ if gt $paginator.TotalPages 0 }}
|
{{ if gt $paginator.TotalPages 0 }}
|
||||||
|
|
||||||
|
|
||||||
{{ range $index, $page := $paginator.Pages }}
|
{{ range $index, $page := $paginator.Pages }}
|
||||||
{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}
|
|
||||||
{{ .Scratch.Set "postClass" "first-entry" }}
|
|
||||||
{{ .Scratch.Set "firstEmoji" "<span class=\"welcome-emoji\">👉</span>" }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .Scratch.Set "postClass" "post-entry" }}
|
{{ .Scratch.Set "postClass" "post-entry" }}
|
||||||
{{ end }}
|
|
||||||
<article class="post {{ .Scratch.Get `postClass` }}">
|
<article class="post {{ .Scratch.Get `postClass` }}">
|
||||||
<header class="post-header">
|
<header class="post-header">
|
||||||
{{ safeHTML (.Scratch.Get `firstEmoji`) }}
|
{{ safeHTML (.Scratch.Get `firstEmoji`) }}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<meta name="author" content="{{ .Site.Params.author }}">
|
<meta name="author" content="{{ .Site.Params.author }}">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i" rel="stylesheet">
|
<link href="https://fonts.loli.net/css?family=PT+Sans:400,400i,700,700i" rel="stylesheet">
|
||||||
<link href="https://cdn.bootcss.com/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet">
|
<link href="https://cdn.bootcss.com/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet">
|
||||||
<link href="/css/style.css" rel="stylesheet">
|
<link href="/css/style.css" rel="stylesheet">
|
||||||
<!-- Favicons -->
|
<!-- Favicons -->
|
||||||
|
|
Loading…
Reference in a new issue