Changed the post navigation part and how post cards resize and added a default post thumbnail

next
Gianmarco Gargiulo 2023-07-22 18:09:35 +02:00
parent dffbf17653
commit c7d58ad872
4 changed files with 2597 additions and 4 deletions

2566
static/images/nothumb.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 375 KiB

View File

@ -756,7 +756,7 @@ h5,h6{
}
.post-card-image{
width:100%;
height:200px;
height:100%;
-o-object-fit:cover;
object-fit:cover
}
@ -1690,7 +1690,7 @@ h5,h6{
display:flex;
flex-wrap:wrap;
margin:0 -25px;
padding:60px 0 0
padding:30px 0 0
}
.read-next-card{
position:relative;
@ -1727,6 +1727,25 @@ h5,h6{
}
}
}
.read-next-section-header h3{
margin:0;
color:hsla(0,0%,100%,.6);
font-family:Mustica Pro;
font-size:2rem;
line-height:1em;
font-weight:300;
letter-spacing:.4px;
padding-top: 30px;
a{
color:#fff;
font-weight:500;
text-decoration:none;
opacity:.8;
&:hover{
opacity:1;
}
}
}
.read-next-card-content{
font-size:1.7rem;
& ul{

View File

@ -8,6 +8,10 @@
<a class="post-card-image-link" href="{{ .context.RelPermalink }}">
<img class="post-card-image" src="{{ .context.Param "thumbnail" }}" alt="{{ .context.Title }}"/>
</a>
{{ else }}
<a class="post-card-image-link" href="{{ .context.RelPermalink }}">
<img class="post-card-image" src="/images/nothumb.svg" alt="{{ .context.Title }}"/>
</a>
{{ end }}
<div class="post-card-content">

View File

@ -1,9 +1,13 @@
<aside class="read-next outer">
<div class="inner">
<header class="read-next-section-header">
<h3><span>More in</span> <a href="{{ .CurrentSection.Permalink }}">{{ .Section }}</a></h3>
</header>
<div class="read-next-feed">
{{- partial "read-next.html" . -}}
<!-- {{- partial "read-next.html" . -}} -->
{{ with .PrevInSection}}
{{- partial "post-card.html" (dict "context" . "index" 1) -}}
@ -14,4 +18,4 @@
{{end}}
</div>
</div>
</aside>
</aside>