mirror of
https://github.com/ivabus/www
synced 2024-11-22 16:15:10 +03:00
Add featured image to template
This commit is contained in:
parent
8699911b49
commit
96cdabe6b2
2 changed files with 22 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
||||||
title: "Something New is Brewing"
|
title: "Something New is Brewing"
|
||||||
date: 2022-03-23
|
date: 2022-03-23
|
||||||
draft: false
|
draft: false
|
||||||
|
featured_image: "/Images/techcrunch-gen-art.jpg"
|
||||||
---
|
---
|
||||||
|
|
||||||
I created Homebrew nearly 13 years ago out of sheer necessity. I found the tooling available to developers at the time haphazard and difficult to tease into shape. After complaining about it at the pub one evening, I was met with an exasperated “Max, quit whining and do something about it”. So I did. (Thanks Jono).
|
I created Homebrew nearly 13 years ago out of sheer necessity. I found the tooling available to developers at the time haphazard and difficult to tease into shape. After complaining about it at the pub one evening, I was met with an exasperated “Max, quit whining and do something about it”. So I did. (Thanks Jono).
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{ partial "navbar.html" . }}
|
{{ partial "navbar.html" . }}
|
||||||
|
|
||||||
<main style="height:100vh;">
|
<main>
|
||||||
<section class="teal-bg">
|
<section class="teal-bg">
|
||||||
<div class="container one-box">
|
<div class="container one-box">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -22,13 +22,17 @@
|
||||||
<div class="container blog-list two-boxes">
|
<div class="container blog-list two-boxes">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<div class="col-4 mb-5">
|
<div class="col-4 mb-4">
|
||||||
<div class="blog-listing">
|
<a href="{{ .RelPermalink }}">
|
||||||
|
<div class="blog-listing p-3 pb-5">
|
||||||
|
{{ if .Params.featured_image }}
|
||||||
|
<img class="featured-image mb-3" src="{{ .Params.featured_image }}" alt="{{ .Title }}" />
|
||||||
|
{{ end }}
|
||||||
<a class="display-6" href="{{ .RelPermalink }}">{{ .Title }}</a><br>
|
<a class="display-6" href="{{ .RelPermalink }}">{{ .Title }}</a><br>
|
||||||
<span class="grid-gray">{{ .Date.Format "2006-01-02" }}</span>
|
<span class="grid-gray">{{ .Date.Format "2006-01-02" }}</span>
|
||||||
<span class="preview-content">{{ .Content }}</span>
|
<span class="preview-content">{{ .Content }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href="/">Back to home</a>
|
<a href="/">Back to home</a>
|
||||||
|
@ -51,6 +55,15 @@
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.featured-image {
|
||||||
|
width: 100%; /* Adjust the width as needed */
|
||||||
|
height: 100px; /* Maintain the image's aspect ratio */
|
||||||
|
}
|
||||||
|
|
||||||
|
.blog-listing{
|
||||||
|
border: 1px solid #949494;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue