Update latest issue style

This commit is contained in:
Sodbileg Gansukh
2021-07-05 13:40:06 +08:00
parent 5f2042748e
commit 44d9780e7b
4 changed files with 34 additions and 55 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -41,38 +41,12 @@
}
.gh-latest {
display: grid;
grid-template-columns: 1fr 3fr;
column-gap: 2.4rem;
margin-top: 6.4rem;
}
.gh-latest .gh-card-meta {
display: flex;
flex-direction: column;
margin-top: 1.6rem;
white-space: nowrap;
}
.gh-latest .gh-card-date {
margin-bottom: 1.6rem;
}
.gh-latest .gh-card-image-link {
position: relative;
display: block;
padding-bottom: 30%;
margin-bottom: 4rem;
transition: opacity 0.3s ease-in-out;
backface-visibility: hidden;
}
.gh-latest .gh-card-image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 6px;
.gh-latest .gh-card-header .gh-card-meta {
margin-top: 0;
margin-bottom: 2rem;
}
.gh-latest .gh-card-title {
@@ -82,9 +56,14 @@
}
.gh-latest .gh-card-excerpt {
margin-top: 2.4rem;
max-width: 920px;
margin-top: 1.6rem;
font-size: 2.8rem;
line-height: 1.4;
line-height: 1.35;
}
.gh-latest .gh-card-link > .gh-card-meta {
margin-top: 2.4rem;
}
.gh-latest .gh-card-footer {
@@ -136,7 +115,7 @@
}
.gh-card + .gh-card {
margin-top: 6.4rem;
margin-top: 8rem;
}
.gh-card-link {
@@ -164,6 +143,7 @@
}
.gh-card-meta {
margin-top: 2rem;
font-size: 1.2rem;
font-weight: 500;
line-height: 1;
@@ -171,10 +151,6 @@
text-transform: uppercase;
}
.gh-feed .gh-card-meta {
margin-top: 2rem;
}
.gh-card-date {
color: var(--ghost-accent-color);
}
@@ -191,12 +167,15 @@
}
.gh-sidebar {
position: sticky;
top: 4.8rem;
height: max-content;
padding-left: 4rem;
font-size: 1.4rem;
}
.gh-sidebar .gh-section + .gh-section {
margin-top: 7.2rem;
margin-top: 8rem;
}
.gh-about {

View File

@@ -5,28 +5,28 @@
{{#get "posts" limit="1"}}
{{#foreach posts}}
<article class="gh-latest gh-card {{post_class}}">
<aside class="gh-card-meta">
<span class="gh-card-date">Latest — <time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time></span>
<span class="gh-card-meta-wrapper">
<span class="gh-card-duration">{{reading_time}}</span>
{{^has visibility="public"}}
{{> icons/star}}
{{/has}}
</span>
</aside>
<div class="gh-card-wrapper">
<a class="gh-card-link" href="{{url}}">
<header class="gh-card-header">
<h2 class="gh-card-title"><a href="{{url}}">{{title}}</a></h2>
<div class="gh-card-meta">
<span class="gh-card-date">Latest — <time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time></span>
</div>
<h2 class="gh-card-title">{{title}}</h2>
</header>
<p class="gh-card-excerpt">{{excerpt}}</p>
<footer class="gh-card-footer">
<a class="gh-card-more" href="{{url}}">Read more {{> icons/arrow-right}}</a>
<footer class="gh-card-meta">
{{!-- <a class="gh-card-more" href="{{url}}">Read more {{> icons/arrow-right}}</a> --}}
<span class="gh-card-meta-wrapper">
<span class="gh-card-duration">{{reading_time}}</span>
{{^has visibility="public"}}
{{> icons/star}}
{{/has}}
</span>
</footer>
</div>
</a>
</article>
{{/foreach}}
{{/get}}