Skip to content

Commit

Permalink
Merge pull request #34 from markdumay/develop
Browse files Browse the repository at this point in the history
Layout
  • Loading branch information
markdumay authored Apr 18, 2022
2 parents 7415659 + 7be7cb1 commit 70d9d05
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions assets/scss/common/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Bootstrap variables overrides for theme
$primary: $themeColor;
$enable-negative-margins: true;

// Font awesome variables overrides for theme
$fa-font-path: "../fonts";
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ define "main" -}}
<div class="p-5">
<div class="p-4">
<h1>{{ .Title }}</h1>
<div class="container-fluid">
<div class="container-fluid p-0">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-4">
{{ $max := sub (len .Pages) 1 -}}
{{ range $index, $element := (.Paginate .RegularPagesRecursive).Pages -}}
Expand Down
8 changes: 4 additions & 4 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "language" $.Page.Language "format" "long")) -}}

<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-5">
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8">
{{ range .Params.tags -}}
Expand All @@ -27,7 +27,7 @@ <h1>{{ .Title }}</h1>
</div>

{{ if .Params.thumbnail -}}
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-5">
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8">
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" .Params.credits) -}}
Expand All @@ -36,7 +36,7 @@ <h1>{{ .Title }}</h1>
</div>
{{ end -}}

<div class="row row-cols-1 row-cols-sm-2 p-5">
<div class="row row-cols-1 row-cols-sm-2 p-3">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8">
{{ .Content }}
Expand Down Expand Up @@ -69,7 +69,7 @@ <h1>{{ .Title }}</h1>

{{- if and .Site.Params.comments.enabled .Params.showComments | default true -}}
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-2 p-5">
<div class="row row-cols-1 row-cols-sm-2 p-3">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8">
<hr>
Expand Down
12 changes: 6 additions & 6 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

{{ range $section, $taxonomy := .Site.Sections -}}
{{ if eq $section 0 -}}
<div class="p-5">
<div class="p-4">
<h1>Recent posts</h1>
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-4">
<div class="container-fluid p-0">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3">
{{ $items := first 3 ($taxonomy.Pages.ByDate.Reverse) -}}
{{ $max := sub (len $items) 1 -}}
{{ range $index, $element := $items -}}
<div class="col">
<div class="col gx-4">
{{- partial "assets/blog-card.html" $element -}}
</div>
{{ if (lt $index $max) -}}
Expand All @@ -27,13 +27,13 @@ <h1>Recent posts</h1>
{{ end -}}
</div>
{{ else -}}
<div class="p-5">
<div class="p-4">
<h1>{{ $taxonomy.Title }}</h1>
<div class="container-fluid">
<div class="row row-cols-1 g-4">
{{ $items := first 3 ($taxonomy.Pages) -}}
{{ range $index, $element := $items -}}
<div class="col">
<div class="col p-0">
{{- partial "assets/project-card.html" $element -}}
</div>
{{ end -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/assets/blog-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- partial "image.html" (dict "url" .Params.thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" .Params.title) -}}
</a>
{{ end }}
<div class="card-body d-flex flex-column">
<div class="card-body d-flex flex-column p-0">
<p class="card-text">
<small class="text-muted text-uppercase">
{{- partial "utilities/date.html" (dict "date" .Date "language" $.Page.Language "format" "long") -}}
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/assets/navbar.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<nav class="navbar navbar-expand-sm bg-white navbar-light ps-4 pe-4">
<nav class="navbar navbar-expand-sm bg-white navbar-light m-3">
<div class="container-fluid">
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
{{ if .Site.Params.main.logo -}}
<img src="{{ .Site.Params.main.logo }}" alt="{{ .Site.Title }} logo" height="30">
{{ else -}}
<span class="fw-bold ">{{ .Site.Title }}</span>
<span class="fw-bold">{{ .Site.Title }}</span>
{{ end -}}
</a>

<button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
<button class="navbar-toggler collapsed me-n3" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="toggler-icon top-bar"></span>
<span class="toggler-icon middle-bar"></span>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer/social.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-5 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-3 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-6 col-md-4">
<div class="fs-3 fw-bold">{{ .Site.Params.socialTitle }}</div>
{{ .Site.Params.socialCaption }}
<p>{{ .Site.Params.socialCaption }}</p>
</div>
<div class="col text-sm-start text-center col-sm-6 col-md-4">
{{ range .Site.Menus.social -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/intro.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-5 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
<div class="row row-cols-1 row-cols-sm-4 bg-primary p-3 bg-opacity-{{ .Site.Params.style.themeOpacity | default "25" | safeHTML }} align-items-center">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-6 col-md-4">
<p class="fs-1 fw-bold">{{ .Site.Params.introTitle }}</p>
Expand Down
2 changes: 1 addition & 1 deletion layouts/tags/list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "main" }}
<div class="container-fluid">
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-5">
<div class="row row-cols-1 row-cols-sm-3 align-items-center p-3">
<div class="col col-md-2 d-none d-md-block"></div>
<div class="col col-sm-12 col-md-8">
<h1>{{ .Name | humanize }}</h1>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@markdumay/hugo-theme-hinode",
"version": "0.3.0",
"version": "0.4.0",
"description": "Hinode is a clean blog theme for Hugo, an open-source static site generator",
"main": "index.js",
"publishConfig": {
Expand Down

0 comments on commit 70d9d05

Please sign in to comment.