Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 238264c

Browse files
author
Lukas Rotermund
committed
added custom single layout
1 parent 7622829 commit 238264c

File tree

10 files changed

+94
-5
lines changed

10 files changed

+94
-5
lines changed

assets/css/_extra.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
.toc {
2-
margin-top: 20px;
3-
padding: 15px;
4-
border: 1px solid rgba(255,255,255,.1)
5-
}
1+
@import "shortcodes/shortcodes";
2+
@import "layout/default"

assets/css/layout/_default.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "heroimage";

assets/css/layout/_heroimage.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.hero-image {
2+
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/assets/pexels-veeterzy-39811.jpg");
3+
height: 300px;
4+
background-position: center;
5+
background-repeat: no-repeat;
6+
background-size: cover;
7+
position: relative;
8+
}
9+
10+
.hero-text {
11+
text-align: center;
12+
position: absolute;
13+
top: 5%;
14+
left: 5%;
15+
right: 5%;
16+
@media (min-width: 940px) {
17+
top: 50%;
18+
left: 50%;
19+
transform: translate(-50%, -50%);
20+
}
21+
color: white;
22+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "toc";

assets/css/shortcodes/_toc.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.toc {
2+
margin-top: 20px;
3+
padding: 15px;
4+
border: 1px solid rgba(255,255,255,.1)
5+
}

content/imprint.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ Telephone: 01779378847\
1414
E-Mail: [lukas.rotermund[at]live.de](mailto:[email protected])\
1515
Internet address: [lukasrotermund.de](https://lukasrotermund.de)
1616

17+
### Graphics and Image Sources
18+
19+
pexels-veeterzy-39811.jpg\
20+
Photo by [veeterzy](https://www.pexels.com/@veeterzy?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels) from [Pexels](https://www.pexels.com/photo/road-between-pine-trees-39811/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
21+
22+
pexels-dương-nhân-1529881.jpg\
23+
Photo by [Dương Nhân](https://www.pexels.com/@d-ng-nhan-324384?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels) from [Pexels](https://www.pexels.com/photo/grayscale-photography-of-trees-1529881/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
24+
1725
### Disclaimer
1826
*Accountability for content*\
1927
The contents of our pages have been created with the utmost care. However, we cannot guarantee the contents'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Robust Go tests through black box testing"
3+
date: 2021-01-24T17:57:34+01:00
4+
draft: true
5+
images: ["/assets/pexels-dương-nhân-1529881.jpg"]
6+
tags: [go-standard-library, "development", "golang", "testing"]
7+
---
8+

layouts/_default/single.html

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{{ define "main" }}
2+
<article class="post">
3+
<header class="post-header">
4+
{{- if ne .Type "page" }}
5+
{{- if isset .Params "images"}}
6+
{{$images := apply .Params.images "absURL" "."}}
7+
{{$i := index $images 0}}
8+
<div class="hero-image" style="background-image:linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0.5)),url({{$i}})">
9+
{{- else}}
10+
<div class="hero-image">
11+
{{- end}}
12+
<div class="hero-text">
13+
<h1 class ="post-title">{{ .Title }}</h1>
14+
<div class="post-meta">
15+
<div>
16+
{{ partial "icon.html" (dict "ctx" $ "name" "calendar") }}
17+
{{ .PublishDate.Format "Jan 2, 2006" }}
18+
</div>
19+
<div>
20+
{{ partial "icon.html" (dict "ctx" $ "name" "clock") }}
21+
{{ .ReadingTime }} min read
22+
</div>
23+
{{- with .Params.tags }}
24+
<div>
25+
{{ partial "icon.html" (dict "ctx" $ "name" "tag") }}
26+
{{- range . -}}
27+
{{ with $.Site.GetPage (printf "/%s/%s" "tags" . ) }}
28+
<a class="tag" href="{{ .Permalink }}">{{ .Title }}</a>
29+
{{- end }}
30+
{{- end }}
31+
</div>
32+
{{- end }}
33+
</div>
34+
</div>
35+
</div>
36+
{{- else}}
37+
<h1 class ="post-title">{{ .Title }}</h1>
38+
{{- end }}
39+
</header>
40+
<div class="post-content">
41+
{{ .Content }}
42+
</div>
43+
<div class="post-footer">
44+
{{ template "_internal/disqus.html" . }}
45+
</div>
46+
</article>
47+
{{ end }}
96 KB
Loading
252 KB
Loading

0 commit comments

Comments
 (0)