Merge pull request #13 from jtom38/features/site/100822

Features/site/100822
This commit is contained in:
James Tombleson 2022-10-09 13:03:13 -07:00 committed by GitHub
commit 400ecd231a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 152 additions and 70 deletions

View File

@ -7,7 +7,7 @@ draft: true
tags: [] tags: []
categories: [] categories: []
listthumbnail: "./recipie-folder-name/thumbnail.png" listthumbnail: "./{{ title }}/thumbnail.png"
thumbnail: "./thumbnail.png" thumbnail: "./thumbnail.png"
parenturl: "https://site.com" parenturl: "https://site.com"

View File

@ -0,0 +1,20 @@
---
title: "{{ replace .Name "-" " " | title }}"
subtitle: Any Subtext you might want to append
date: {{ .Date }}
draft: true
tags: []
categories: []
listthumbnail: "./{{ title }}/thumbnail.png"
thumbnail: "./thumbnail.png"
parenturl: "https://site.com"
---
## Ingredients
## Instructions
## Notes

View File

@ -1,4 +1,4 @@
baseURL: 'https://jtom38.github.io/cookbook/' baseURL: 'https://jtom38.github.io/cookbook'
languageCode: 'en-us' languageCode: 'en-us'
title: 'Cookbook' title: 'Cookbook'
theme: "hugo-bulma-cookbook" theme: "hugo-bulma-cookbook"
@ -6,7 +6,6 @@ theme: "hugo-bulma-cookbook"
taxonomies: taxonomies:
category: 'categories' category: 'categories'
tag: 'tags' tag: 'tags'
#season: 'seasons'
# Used to bring the /tags/ forward # Used to bring the /tags/ forward
preserveTaxonomyNames: true preserveTaxonomyNames: true
@ -15,3 +14,10 @@ sitemap:
changefreq: monthly changefreq: monthly
filename: sitemap.xml filename: sitemap.xml
priority: 0.5 priority: 0.5
params:
# This tells hugp-bulma-cookbook theme to use the list display view
UseListRows: true
# Enable this line to use the card view
#UseCardView: true

View File

@ -7,9 +7,6 @@ draft: false
tags: [Dinner, Bon Apptite Recipie, Indian] tags: [Dinner, Bon Apptite Recipie, Indian]
categories: ["Main Dish"] categories: ["Main Dish"]
listthumbnail: https://assets.bonappetit.com/photos/5b69f163d3d14670539a2174/1:1/w_2240,c_limit/ba-tikka-masala-2.jpg
thumbnail: https://assets.bonappetit.com/photos/5b69f163d3d14670539a2174/1:1/w_2240,c_limit/ba-tikka-masala-2.jpg
parenturl: https://www.bonappetit.com/recipe/chicken-tikka-masala parenturl: https://www.bonappetit.com/recipe/chicken-tikka-masala
--- ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

View File

@ -6,7 +6,6 @@ draft: false
tags: ["Breakfast", "Sides"] tags: ["Breakfast", "Sides"]
categories: ["Sides"] categories: ["Sides"]
thumbnail:
parenturl: https://www.seriouseats.com/recipes/2014/06/quick-easy-drop-biscuits-recipe.html parenturl: https://www.seriouseats.com/recipes/2014/06/quick-easy-drop-biscuits-recipe.html
--- ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 KiB

View File

@ -1,59 +1,12 @@
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{ partial "hero.html" . }} {{ partial "hero.html" . }}
<div class="container"> {{ if $.Site.Params.UseListRows }}
<br> {{ partial "list.rows.html" . }}
{{ range .RegularPages }}
<div class="card">
<div class="card-content">
<div class="media">
<div class="media-left">
<figure class="image is-128x128">
<a href="{{ .Permalink }}" >
{{ with .Params.listthumbnail }}
<img src="{{ . }}" alt="Placeholder image" >
{{ end }}
</a>
</figure>
</div>
<div class="media-content">
<p class="title is-4">
<a href="{{ .Permalink }}"> {{ .Title }}</a>
</p>
<p class="subtitle is-6">{{ .Params.subtitle }}</p>
{{ with .Params.tags }}
<div class="buttons">
{{ range . }}
<button class="button">
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }}
</div>
{{ end }} {{ end }}
{{ if $.Site.Params.UseCardView }}
{{ with .Params.categories }} {{ partial "list.cards.html" . }}
<div class="buttons">
{{ range . }}
<button class="button">
<a href="{{ "categories" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }} {{ end }}
</div>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}
</div>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View File

@ -6,11 +6,9 @@
<div class="columns"> <div class="columns">
{{ if .Params.thumbnail }}
<div class="column"> <div class="column">
<img src="{{ .Params.thumbnail }}" /> <img src="{{ .Site.BaseURL }}{{.File.Dir}}thumbnail.png" alt="Missing thumbnail :(" />
</div> </div>
{{ end }}
<div class="column"> <div class="column">
<div class="content"> <div class="content">

View File

@ -6,9 +6,9 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
<link rel="stylesheet" type="text/css" href="https://unpkg.com/bulma-prefers-dark" /> <link rel="stylesheet" type="text/css" href="https://unpkg.com/bulma-prefers-dark" />
<link rel="icon" href="favicon.svg"> <link rel="icon" href="{{ .Site.BaseURL }}favicon.svg">
<link rel="mask-icon" href="favicon.svg" color="#000000"> <link rel="mask-icon" href="{{ .Site.BaseURL }}favicon.svg" color="#000000">
<link rel="apple-touch-icon" href="apple-touch-icon.svg"> <link rel="apple-touch-icon" href="{{ .Site.BaseURL }}apple-touch-icon.svg">
<script> <script>
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {

View File

@ -1,6 +1,14 @@
<section class="hero is-primary"> <section class="hero is-primary">
<div class="hero-body"> <div class="hero-body">
<h1 class="title">{{ .Title }}</h1> <div class="container has-text-centered">
<p class="subtitle">{{ .Params.subtitle }}</p> <p class="title">
{{ .Title }}
</p>
<p class="subtitle">
{{ .Params.subtitle}}
</p>
</div> </div>
</div>
</section> </section>

View File

@ -0,0 +1,22 @@
<div class="card">
<div class="card-image">
<figure class="image is-4x3">
<img src="{{ .Site.BaseURL }}{{ .File.Dir }}thumbnail.png" alt="">
</figure>
</div>
<div class="card-content">
<div class="media">
<div class="media-content">
<p class="title is-4">{{ .Title }}</p>
<p class="subtitle is-6">@johnsmith</p>
</div>
</div>
<div class="content">
<a href="#">#css</a> <a href="#">#responsive</a>
<br>
<time datetime="2016-1-1">11:09 PM - 1 Jan 2016</time>
</div>
</div>
</div>

View File

@ -0,0 +1,30 @@
<div class="container">
<br>
<div class="columns is-desktop">
<div class="column">
{{ range first 3 .RegularPages }}
{{ partial "list.card.html" . }}
<br>
{{ end }}
</div>
<div class="column">
{{ range first 3 (after 3 .RegularPages ) }}
{{ partial "list.card.html" . }}
<br>
{{ end }}
</div>
<div class="column">
{{ range first 3 (after 6 .RegularPages ) }}
{{ partial "list.card.html" . }}
<br>
{{ end }}
</div>
</div>
</div>

View File

@ -0,0 +1,49 @@
<div class="container mt-8">
{{ range .RegularPages }}
<div class="card">
<div class="card-content">
<div class="media">
<div class="media-left">
<figure class="image is-128x128">
<a href="{{ .Permalink }}" >
<img src="{{ .Site.BaseURL }}{{ .File.Dir }}thumbnail.png" alt="" >
</a>
</figure>
</div>
<div class="media-content">
<p class="title is-4">
<a href="{{ .Permalink }}"> {{ .Title }}</a>
</p>
<p class="subtitle is-6">{{ .Params.subtitle }}</p>
{{ with .Params.tags }}
<div class="buttons">
{{ range . }}
<button class="button">
<a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }}
</div>
{{ end }}
{{ with .Params.categories }}
<div class="buttons">
{{ range . }}
<button class="button">
<a href="{{ "categories" | absURL }}/{{ . | urlize }}">{{ . }}</a>
</button>
{{ end }}
</div>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}
</div>