forked from toolshed/coopcloud.tech
		
	add post metadata to single blog post template
This commit is contained in:
		| @ -3,6 +3,7 @@ title: "Our new blog and some project announcements" | |||||||
| date: 2021-07-07T13:17:04+05:00 | date: 2021-07-07T13:17:04+05:00 | ||||||
| draft: false | draft: false | ||||||
| image: "/img/cc-birds.jpeg" | image: "/img/cc-birds.jpeg" | ||||||
|  | imageCredit: '"birds flying near clouds" by Kendrick Mills on Unsplash' | ||||||
| description: "CoS funding, beta release news, monthly updates and more!" | description: "CoS funding, beta release news, monthly updates and more!" | ||||||
| --- | --- | ||||||
|  |  | ||||||
|  | |||||||
| @ -224,8 +224,8 @@ footer .separator { | |||||||
|     padding: 4rem 6rem; |     padding: 4rem 6rem; | ||||||
|     @media (max-width: 450px) { padding: 2.5rem  1.4rem 1rem; } |     @media (max-width: 450px) { padding: 2.5rem  1.4rem 1rem; } | ||||||
|      |      | ||||||
|  |     figure { | ||||||
|         img.hero { |         img.hero { | ||||||
|         margin-bottom: 2rem; |  | ||||||
|             margin-left: auto; |             margin-left: auto; | ||||||
|             margin-right: auto; |             margin-right: auto; | ||||||
|             width: 100%; |             width: 100%; | ||||||
| @ -234,6 +234,18 @@ footer .separator { | |||||||
|             object-position: center; |             object-position: center; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         figcaption { | ||||||
|  |             font-weight: 300; | ||||||
|  |             color: white; | ||||||
|  |             padding: 5px; | ||||||
|  |             background: #00000063; | ||||||
|  |             text-align: end; | ||||||
|  |             position: relative; | ||||||
|  |             bottom: 34px; | ||||||
|  |             width: max-content; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |      | ||||||
|     .content { |     .content { | ||||||
|         h3 { text-transform: uppercase; } |         h3 { text-transform: uppercase; } | ||||||
|         p { |         p { | ||||||
| @ -241,4 +253,8 @@ footer .separator { | |||||||
|             font-weight: 100; |             font-weight: 100; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |      | ||||||
|  |     .post-metadata { | ||||||
|  |         text-transform: uppercase; | ||||||
|  |     } | ||||||
| } | } | ||||||
| @ -1,8 +1,15 @@ | |||||||
| {{ define "main" }} | {{ define "main" }} | ||||||
|     <article class="blog-post"> |     <article class="blog-post"> | ||||||
|         <div class="container"> |         <div class="container"> | ||||||
|  |             <figure> | ||||||
|                 <img src="{{ with .Params.image }}{{ . }}{{ end }}" alt="" class="hero"> |                 <img src="{{ with .Params.image }}{{ . }}{{ end }}" alt="" class="hero"> | ||||||
|  |                 <figcaption>{{ .Params.imageCredit }}</figcaption> | ||||||
|  |             </figure> | ||||||
|             <h1 class="title is-uppercase">{{ .Title }}</h1> |             <h1 class="title is-uppercase">{{ .Title }}</h1> | ||||||
|  |             <div class="post-metadata"> | ||||||
|  |                 <p class="post-date">{{ .PublishDate.Format "January 2, 2006" }}</p> | ||||||
|  |                 <p class="reading-time">Reading time: {{ .ReadingTime }} minutes</p> | ||||||
|  |             </div> | ||||||
|             <hr> |             <hr> | ||||||
|             <div class="content">{{ .Content }}</div> |             <div class="content">{{ .Content }}</div> | ||||||
|             <hr> |             <hr> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user