move .first-entry css to main.css, styling newsletter section
This commit is contained in:
parent
ea271b5651
commit
ceede2988a
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
mark {
|
||||
margin: 0 -0.4em;
|
||||
padding: 0.1em 0.4em;
|
||||
padding: 0em 0.4em;
|
||||
border-radius: 0.8em 0.3em;
|
||||
background: transparent;
|
||||
background-image: linear-gradient(
|
||||
|
@ -27,6 +27,51 @@ mark {
|
|||
box-decoration-break: clone;
|
||||
}
|
||||
|
||||
/* for home and section page */
|
||||
.first-entry {
|
||||
position: relative;
|
||||
min-height: 320px;
|
||||
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
|
||||
}
|
||||
|
||||
.first-entry .entry-header {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
margin: var(--gap) 0 calc(var(--gap) * 2);
|
||||
}
|
||||
|
||||
.first-entry .entry-header h1 {
|
||||
font-size: 34px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.first-entry .entry-header h1 {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.first-entry .entry-content {
|
||||
margin: 14px 0;
|
||||
font-size: 17px;
|
||||
color: var(--primary);
|
||||
line-height: 1.6em;
|
||||
display: block;
|
||||
overflow: initial; /* fix <mark> edge get cut */
|
||||
}
|
||||
|
||||
.first-entry .entry-content p {
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
.first-entry .entry-content li p {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
.first-entry .entry-footer {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
/* for post page */
|
||||
.main.post {
|
||||
max-width: calc(var(--post-width) + var(--gap) * 2);
|
||||
|
|
|
@ -1,46 +1,3 @@
|
|||
.first-entry {
|
||||
position: relative;
|
||||
min-height: 320px;
|
||||
margin: var(--gap) 0 calc(var(--gap) * 2) 0;
|
||||
}
|
||||
|
||||
.first-entry .entry-header {
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
margin: var(--gap) 0 calc(var(--gap) * 2);
|
||||
}
|
||||
|
||||
.first-entry .entry-header h1 {
|
||||
font-size: 34px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
@media screen and (max-width: 400px) {
|
||||
.first-entry .entry-header h1 {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.first-entry .entry-content {
|
||||
margin: 14px 0;
|
||||
font-size: 17px;
|
||||
color: var(--primary);
|
||||
line-height: 1.6em;
|
||||
display: block;
|
||||
overflow: initial; /* fix <mark> edge get cut */
|
||||
}
|
||||
|
||||
.first-entry .entry-content p {
|
||||
margin-bottom: .8em;
|
||||
}
|
||||
.first-entry .entry-content li p {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
|
||||
.first-entry .entry-footer {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.home-info .entry-content {
|
||||
-webkit-line-clamp: unset;
|
||||
}
|
||||
|
|
|
@ -42,8 +42,12 @@ body.type-newsletter.kind-section {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
h1 {
|
||||
.main {
|
||||
.content {
|
||||
max-width: calc(var(--post-width));
|
||||
margin: 0 auto;
|
||||
}
|
||||
.entry-header h1 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{- define "main" }}
|
||||
|
||||
<header class="page-header">
|
||||
<h1>{{ .Title }} !</h1>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- if .Description }}
|
||||
<div class="post-description">
|
||||
{{ .Description }}
|
||||
|
|
|
@ -3,28 +3,27 @@
|
|||
{{- define "main" }}
|
||||
<div class="main-icon">@</div>
|
||||
|
||||
<header class="page-header">
|
||||
<div class="content">
|
||||
<div class="first-entry">
|
||||
<header class="entry-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{- with .Param "archivesSlug" }}
|
||||
<div>
|
||||
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a>
|
||||
</header>
|
||||
<section class="entry-content">{{ .Description | markdownify }}</section>
|
||||
</div>
|
||||
{{- end }}
|
||||
</header>
|
||||
|
||||
{{- $pages := where .Pages "Params.hidden" "!=" true }}
|
||||
{{- $pages := where .Pages "Params.hidden" "!=" true }}
|
||||
|
||||
{{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}}
|
||||
{{ $paginator := "" }}
|
||||
{{ if (.Param "paginate") }}
|
||||
{{/* related issue: https://github.com/gohugoio/hugo/issues/9003 */}}
|
||||
{{ $paginator := "" }}
|
||||
{{ if (.Param "paginate") }}
|
||||
{{- $paginator = .Paginate $pages (.Param "paginate") }}
|
||||
{{ else }}
|
||||
{{ else }}
|
||||
{{- $paginator = .Paginate $pages }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{- range $index, $page := $paginator.Pages }}
|
||||
<article class="post-entry">
|
||||
{{- range $index, $page := $paginator.Pages }}
|
||||
<article class="post-entry">
|
||||
<header class="entry-header">
|
||||
<h2>
|
||||
{{- .Title }}
|
||||
|
@ -47,11 +46,11 @@
|
|||
</footer>
|
||||
{{- end }}
|
||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||
</article>
|
||||
{{- end }}
|
||||
</article>
|
||||
{{- end }}
|
||||
|
||||
{{- if gt $paginator.TotalPages 1 }}
|
||||
<footer class="page-footer">
|
||||
{{- if gt $paginator.TotalPages 1 }}
|
||||
<footer class="page-footer">
|
||||
<nav class="pagination">
|
||||
{{- if $paginator.HasPrev }}
|
||||
<a class="prev" href="{{ $paginator.Prev.URL | absURL }}">« {{ i18n "prev_page" }}</a>
|
||||
|
@ -60,7 +59,14 @@
|
|||
<a class="next" href="{{ $paginator.Next.URL | absURL }}">{{ i18n "next_page" }} »</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
</footer>
|
||||
{{- end }}
|
||||
</footer>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Param "archivesSlug" }}
|
||||
<div>
|
||||
<a href="{{ $.RelPermalink }}{{ . }}/">Archives</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue