🔵 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

@ -1,55 +1,50 @@
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
/* theme-vars */ /* theme-vars */
:root { :root {
--gap: 14px; --gap: 14px;
} }
/* profile-mode */ /* profile-mode */
.profile img { .profile img {
transform: scale(0.85); transform: scale(0.85);
} }
/* post-entry */ /* archive */
.first-entry { .archive-month {
min-height: 260px; flex-direction: column;
} }
/* archive */ .archive-year {
.archive-month { margin-top: 20px;
flex-direction: column; }
}
.archive-year { /* footer */
margin-top: 20px; .footer {
} padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap);
}
/* footer */
.footer {
padding: calc((var(--footer-height) - var(--gap) - 10px) / 2) var(--gap);
}
} }
/* footer */ /* footer */
@media screen and (max-width: 900px) { @media screen and (max-width: 900px) {
.list .top-link { .list .top-link {
transform: translateY(-5rem); transform: translateY(-5rem);
} }
} }
@media screen and (max-width: 340px) { @media screen and (max-width: 340px) {
.share-buttons { .share-buttons {
justify-content: unset; justify-content: unset;
} }
} }
@media (prefers-reduced-motion) { @media (prefers-reduced-motion) {
/* terms; profile-mode; post-single; post-entry; post-entry; search; search */ /* terms; profile-mode; post-single; post-entry; post-entry; search; search */
.terms-tags a:active, .terms-tags a:active,
.button:active, .button:active,
.post-entry:active, .post-entry:active,
.top-link, .top-link,
#searchResults .focus, #searchResults .focus,
#searchResults li:active { #searchResults li:active {
transform: none; transform: none;
} }
} }

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 }} <footer class="entry-footer">
</div> {{ partial "social_icons.html" (dict "align"
<footer class="entry-footer"> site.Params.homeInfoParams.AlignSocialIconsTo) }}
{{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }} </footer>
</footer>
</article> </article>
{{- end -}} {{- end -}}