🔵 other: changement ui premier article

This commit is contained in:
noego 2024-02-15 22:22:26 +01:00
parent 36fd3135fe
commit 3fca24ac75
4 changed files with 44 additions and 81 deletions

View File

@ -1,34 +1,3 @@
.first-entry {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
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;
-webkit-line-clamp: 3;
}
.first-entry .entry-header h1 {
font-size: 34px;
line-height: 1.3;
}
.first-entry .entry-content {
margin: 14px 0;
font-size: 16px;
-webkit-line-clamp: 3;
}
.first-entry .entry-footer {
font-size: 14px;
}
.home-info .entry-content { .home-info .entry-content {
-webkit-line-clamp: unset; -webkit-line-clamp: unset;
} }

View File

@ -9,11 +9,6 @@
transform: scale(0.85); transform: scale(0.85);
} }
/* post-entry */
.first-entry {
min-height: 260px;
}
/* archive */ /* archive */
.archive-month { .archive-month {
flex-direction: column; flex-direction: column;

View File

@ -58,7 +58,7 @@
{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} {{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
{{- $class = "first-entry" }} {{- $class = "post-entry" }}
{{- else if $term }} {{- else if $term }}
{{- $class = "post-entry tag-entry" }} {{- $class = "post-entry tag-entry" }}
{{- end }} {{- end }}

View File

@ -1,13 +1,12 @@
{{- with site.Params.homeInfoParams }} {{- with site.Params.homeInfoParams }}
<article class="first-entry home-info"> <article class="post-entry home-info">
<header class="entry-header"> <header class="entry-header">
<h1>{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
</header> </header>
<div class="entry-content"> <div class="entry-content">{{ .Content | markdownify }}</div>
{{ .Content | markdownify }}
</div>
<footer class="entry-footer"> <footer class="entry-footer">
{{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }} {{ partial "social_icons.html" (dict "align"
site.Params.homeInfoParams.AlignSocialIconsTo) }}
</footer> </footer>
</article> </article>
{{- end -}} {{- end -}}