Commit 367a1149 authored by Mike Jones's avatar Mike Jones

Layout improvements

parent 10c6bdc8
Pipeline #152 failed with stage
in 1 minute and 12 seconds
......@@ -2,9 +2,9 @@
title: "Perl 5"
date: 2019-01-06T19:40:38Z
draft: false
description: |
type: about
weight: 1
---
Modernisation and maintenance of existing Perl 5 projects is our speciality.
Modernisation, maintenance, and rescue of existing Perl 5 projects is our
speciality.
$article-summary-border: 1px solid $light-grey;
$article-header-padding: 1.95rem;
article.article-summary {
border-bottom: $article-summary-border;
box-shadow: 1px 0 5px $light-grey;
border: $article-summary-border;
margin-top: 1rem;
padding: 0 !important;
header {
padding: $article-header-padding $article-header-padding 0 $article-header-padding;
}
.card-body {
padding-left: $article-header-padding;
padding-right: $article-header-padding;
}
}
article.article-summary:first-child {
margin-top: 0;
}
body {
overflow-y: scroll;
display: flex;
min-height: 100vh;
flex-direction: column;
}
div#page-content, div#sidebar-nav {
......@@ -9,9 +13,10 @@ div#page-content, div#sidebar-nav {
div#page-content {
padding: 0;
flex: 1;
article, footer#site-footer {
padding: 2rem;
padding: 2rem;
}
article:first-child {
......
.navbar-light {
background: none !important;
border-bottom: 1px solid $light-grey;
box-shadow: 1px 0 5px $light-grey;
.container {
padding-left: $big-padding;
......
#site-footer {
border-top: 1px solid $light-grey;
box-shadow: 1px 0 5px $light-grey;
.container {
padding: $big-padding;
......
<!DOCTYPE html>
<html lang="en">
{{- partial "head.html" . -}}
<body>
<body class="site">
{{- partial "nav.html" . -}}
<div class="container" id="page-content">
......
<article class="article-summary">
<article class="article-summary card">
<header>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
{{ partial "post_meta.html" . }}
</header>
<p>
{{ if .Description }}
{{ .Description }}
{{ else if .Summary }}
{{ .Summary }}
{{ end }}
<div class="card-body">
<p>
{{ if .Description }}
{{ .Description }}
{{ else if .Summary }}
{{ .Summary }}
{{ end }}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">Read more.</a>
{{ end }}
</p>
</article>
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">Read more.</a>
{{ end }}
</p>
</div><!--/ .card-body -->
</article><!--/ .article-summary -->
{{ define "main" }}
<article>
<header>
<h1>{{ .Title }}</h1>
<p>{{ .Description }}</p>
</header>
<article class="card article-summary">
<header>
<h1>{{ .Title }}</h1>
<p>{{ .Description }}</p>
</header>
<section class="post-content">
<div class="row">
{{ $count := len .Pages }}
{{ range $k, $v := .Pages.ByWeight }}
<div class="col d-flex align-items-stretch">
<div class="card">
<div class="card-header">{{ $v.Title }}</div>
<div class="card-body">
<section class="post-content">
<div class="row">
{{ $count := len .Pages }}
<div class="card-body">{{ $v.Content }}</div>
</div>
</div><!--/ .col -->
{{ range $k, $v := .Pages.ByWeight }}
<div class="col d-flex align-items-stretch">
<div class="card">
<div class="card-header">{{ $v.Title }}</div>
{{/* Probably don't look too closely at this */}}
{{ if eq 2 (mod $k 3) }}<div class="w-100"></div>{{ end }}
<div class="card-body">{{ $v.Content }}</div>
</div>
</div><!--/ .col -->
{{ if eq $k (sub $count 1) }}
{{ if ne 2 (mod $k 3) }}
{{ range (seq 3) }}
{{ $k = add $k 1 }}
{{/* Probably don't look too closely at this */}}
{{ if eq 2 (mod $k 3) }}<div class="w-100"></div>{{ end }}
{{ if ne 2 (mod $k 3) }}<div class="col"></div>{{ end }}
{{ if eq $k (sub $count 1) }}
{{ if ne 2 (mod $k 3) }}
{{ range (seq 3) }}
{{ $k = add $k 1 }}
{{ if ne 2 (mod $k 3) }}<div class="col"></div>{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</div><!--/ .row -->
</section>
<br>
</div><!--/ .row -->
</section>
{{ .Content }}
<section>
{{ .Content }}
</section>
</div>
</article>
{{ end }}
<article>
<article class="article-summary card">
<header>
<h1>{{ .Title }}</h1>
......@@ -7,11 +7,13 @@
{{ if .Description }}<p>{{ .Description }}</p><hr>{{ end }}
</header>
<section class="post-content">
{{ .Content }}
</section>
<div class="card-body">
<section class="post-content">
{{ .Content }}
</section>
<footer class="post-footer">
{{ partial "tags.html" . }}
</footer>
<footer class="post-footer">
{{ partial "tags.html" . }}
</footer>
</div>
</article>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment