feat(article list): article clickable and equal height
This commit is contained in:
parent
c6661196ad
commit
96897be941
@ -11,7 +11,7 @@
|
||||
border-radius: var(--card-border-radius);
|
||||
overflow: hidden;
|
||||
|
||||
transition: box-shadow .3s ease;
|
||||
transition: box-shadow 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
box-shadow: var(--shadow-l2);
|
||||
@ -159,24 +159,32 @@
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
background-color: var(--card-background);
|
||||
--image-size: 60px;
|
||||
|
||||
@media (max-width: $on-tablet) {
|
||||
--image-size: 50px;
|
||||
}
|
||||
|
||||
& + .pagination {
|
||||
margin-top: var(--section-separation);
|
||||
}
|
||||
|
||||
article {
|
||||
& > a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: var(--small-card-padding);
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 2px solid var(--card-separator-color);
|
||||
border-bottom: 1.5px solid var(--card-separator-color);
|
||||
}
|
||||
|
||||
.article-details {
|
||||
flex-grow: 1;
|
||||
padding: 0;
|
||||
padding-right: 15px;
|
||||
min-height: var(--image-size);
|
||||
}
|
||||
|
||||
.article-title {
|
||||
@ -190,10 +198,14 @@
|
||||
|
||||
.article-image {
|
||||
img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: var(--image-size);
|
||||
height: var(--image-size);
|
||||
}
|
||||
}
|
||||
|
||||
.article-time {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
.main-article {
|
||||
background: var(--card-background);
|
||||
border-radius: var(--card-border-radius);
|
||||
box-shadow: var(--shadow-l1);
|
||||
|
@ -63,6 +63,9 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
||||
}
|
||||
|
||||
--small-card-padding: 25px;
|
||||
@media (max-width: $on-tablet) {
|
||||
--small-card-padding: 25px 20px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
--card-background: #424242;
|
||||
|
@ -1,9 +1,8 @@
|
||||
<article>
|
||||
<a href="{{ .Permalink }}">
|
||||
<div class="article-details">
|
||||
<h2 class="article-title">
|
||||
<a href="{{ .Permalink }}">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
</h2>
|
||||
<footer class="article-time">
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
@ -24,4 +23,5 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
</article>
|
Loading…
Reference in New Issue
Block a user