This commit is contained in:
Simon Gardling
2023-10-11 17:38:05 -04:00
commit 032679b34a
242 changed files with 9311 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
title: 'Layouts'
type: 'bookcase'
---
Monochrome has multiple layouts built in. You can change the layout of section or regular page according to your needs.

View File

@@ -0,0 +1,10 @@
---
title: 'Balloon Layout'
bookcase_cover_src: 'cover/balloon.png'
bookcase_cover_src_dark: 'cover/balloon_dark.png'
type: "bookcase"
---
Balloon layout is useful for demonstrating information step-by-step.
> This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`).

View File

@@ -0,0 +1,15 @@
---
title: 'Balloon Layout Demo'
bookcase_cover_src: 'cover/balloon.png'
bookcase_cover_src_dark: 'cover/balloon_dark.png'
type: 'balloon'
balloon_img_src: "icons/balloon.svg"
balloon_img_src_dark: "icons/balloon_dark.svg"
balloon_circle: false
balloon_resources: "/about"
weight: 10
---
Balloon layout is useful for demonstrating information step-by-step.
[Go to single page demo](/hugo-theme-monochrome/layouts/demo/balloon/single)

View File

@@ -0,0 +1,12 @@
---
title: 'balloon layout single demo'
type: 'balloon'
balloon_img_src: "icons/balloon.svg"
balloon_img_src_dark: "icons/balloon_dark.svg"
balloon_circle: false
balloon_resources: "/about"
---
Balloon layout can also be used in regular page.
[Go to list demo](/hugo-theme-monochrome/layouts/demo/balloon)

View File

@@ -0,0 +1,130 @@
---
title: 'Balloon Layout Document'
bookcase_cover_src: 'cover/balloon.png'
bookcase_cover_src_dark: 'cover/balloon_dark.png'
date: 2022-03-29
---
# Balloon Layout Document
Balloon is useful for demonstrating information step-by-step.
> This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`).
## Configuration
```yaml
---
type: 'balloon'
---
```
> Specify `type` in front-matter will change the template lookup order.
### balloon_resources
Content resources. URL can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path)
> Hugo will handle multilingual scenario out of the box
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/about
\____________________________________/\____/
base URL balloon_resources
```
```yaml
---
balloon_resources: "/about"
---
```
> default: error will occur in page
### balloon_img_src
Balloon head image URL. URL must be relative to the base URL. (without `/` prefix)
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
\_____________________________________/\________/
base URL balloon_img_src
```
```yaml
---
balloon_img_src: 'thanks.jpg'
---
```
> default: fallback to balloon_img_src_dark, if failed, image become dot
### balloon_img_src_dark
Balloon head image URL for dark mode. URL must be relative to the base URL. (without `/` prefix)
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
\_____________________________________/\________/
base URL balloon_img_src
```
```yaml
---
balloon_img_src_dark: 'thanks.jpg'
---
```
> default: fallback to balloon_img_src, if failed, image become dot
### balloon_circle
balloon head shape can be square or circle.
```yaml
---
balloon_circle: true
---
```
> default: true
## Resouces Configuration
These settings are under the resource specified in `balloon_resources`.
### title
Title of content card.
```yaml
---
title: 'Story before hugo'
---
```
> default: no title
### weight
```yaml
---
weight: 3
---
```
> default: [default order](https://gohugo.io/templates/lists/#order-content)
## Headless Bundle
Hugo supports an amazing feature called **Headless Bundle**, which elegantly resolved the resouces publish issue.
For example, if you don't want to publish the resouces of the balloon layout, you can create a leaf bundle and specified `headless = true` in `index.md`'s front-matter. These resources will only be used during rendering process. In other word, no file will be generated to `/public` folder.
Checkout [Headless Bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) for more details.

View File

@@ -0,0 +1,10 @@
---
title: 'Blank Layout'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
type: "bookcase"
---
Sometimes, it's useful to fully control your section page, so I create a layout with only render the `_index.md` content and called this Blank Layout.
> This layout can only be used on section page (`_index.md`).

View File

@@ -0,0 +1,21 @@
---
title: 'Blank Layout Demo'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
type: 'blank'
weight: 40
---
```
.
├── _index.md <- you're here!
├── post1.md
├── post2.md
└── post3.md
```
Fully customized section page.
* [post1](./post1)
* [post2](./post2)
* [post3](./post3)

View File

@@ -0,0 +1,7 @@
---
title: 'post1'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post2'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post3'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,21 @@
---
title: 'Blank Layout Document'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
weight: 40
changelogs:
---
Blank layout render only the content of `_index.md`, it's useful for fully customizing your list layout.
> This layout can only be used on section page (`_index.md`).
## Configuration
```yaml
---
type: 'blank'
---
```
> Specify `type` in front-matter will change the template lookup order.

View File

@@ -0,0 +1,10 @@
---
title: 'Bookcase Layout'
bookcase_cover_src: 'cover/bookcase.png'
bookcase_cover_src_dark: 'cover/bookcase_dark.png'
type: "bookcase"
---
Bookcase layout is useful for creating another viewpoint of list contents.
> This layout can only be used on section page (`_index.md`).

View File

@@ -0,0 +1,19 @@
---
title: 'Bookcase Layout Demo'
type: 'bookcase'
bookcase_cover_src: 'cover/bookcase.png'
bookcase_cover_src_dark: 'cover/bookcase_dark.png'
weight: 20
---
Bookcase layout is useful for creating another viewpoint of list contents.
```
.
├── balloon
│ └── _index.md
├── regular-page.md
├── _index.md <- you are here
└── normal
└── _index.md
```

View File

@@ -0,0 +1,13 @@
---
title: 'balloon'
bookcase_cover_src: 'cover/balloon.png'
bookcase_cover_src_dark: 'cover/balloon_dark.png'
type: 'balloon'
balloon_img_src: "icons/balloon.svg"
balloon_img_src_dark: "icons/balloon_dark.svg"
balloon_circle: false
balloon_resources: "/about"
weight: 1
---
balloon layout in bookcase.

View File

@@ -0,0 +1,7 @@
---
title: 'List'
bookcase_cover_src: 'cover/list.png'
bookcase_cover_src_dark: 'cover/list_dark.png'
---
List section in bookcase layout.

View File

@@ -0,0 +1,7 @@
---
title: 'post1'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post2'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post3'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'Regular Page'
bookcase_cover_src: 'cover/catalogue.png'
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
---
This is a regular page in bookcase.

View File

@@ -0,0 +1,122 @@
---
title: 'Bookcase Layout Document'
bookcase_cover_src: 'cover/bookcase.png'
bookcase_cover_src_dark: 'cover/bookcase_dark.png'
weight: 20
---
Bookcase layout is useful for creating another viewpoint of list contents.
> This layout can only be used on section page (`_index.md`).
## Configuration
```yaml
---
type: 'bookcase'
---
```
> Specify `type` in front-matter will change the template lookup order.
### bookcase_list_sections
List subsections.
```yaml
---
bookcase_list_sections: true
---
```
> default: true
### bookcase_list_pages
List pages.
```yaml
---
bookcase_list_pages: true
---
```
> default: true
## Resouces Configuration
These parameters are located in bookcase item's resource. For example:
```
.
├── books.md <- config is located in here!
├── category
│ └── _index.md <- and here!
└── _index.md <- your bookcase layout
```
### bookcase_cover_src
The cover image URL relative to the base URL. (with or without `/` prefix)
> Image ratio is 2:3 (width:height)
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
\_____________________________________/\________/
base URL bookcase_cover_src
```
```yaml
---
bookcase_cover_src: 'thanks.jpg'
---
```
> default: fallback to bookcase_cover_src_dark, if failed, image become empty
### bookcase_cover_src_dark
The dark mode cover image URL relative to the base URL. (with or without `/` prefix)
> Image ratio is 2:3 (width:height)
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
\_____________________________________/\________/
base URL bookcase_cover_src
```
```yaml
---
bookcase_cover_src_dark: 'thanks.jpg'
---
```
> default: fallback to bookcase_cover_src, if failed, image become empty
### bookcase_cover_title
The title used in the bookcase cover
> default: fallback to the title of the page
### bookcase_hidden
Hide this item from bookcase
> default: false
### weight
```yaml
---
weight: 3
---
```
> default: [default order](https://gohugo.io/templates/lists/#order-content)

View File

@@ -0,0 +1,10 @@
---
title: 'Gallery Layout'
bookcase_cover_src: 'cover/picture.png'
bookcase_cover_src_dark: 'cover/picture_dark.png'
type: "bookcase"
---
Gallery layout is useful for demonstrating pictures and its statistical data.
> This layout can be used on both section page (`_index.md`) and regular post (`xxx.md`).

View File

@@ -0,0 +1,10 @@
---
title: 'Gallery Layout Demo'
type: 'gallery'
gallery_resources: "about"
bookcase_cover_src: 'cover/picture.png'
bookcase_cover_src_dark: 'cover/picture_dark.png'
weight: 30
---
Gallery layout is useful for demonstrating pictures and its statistical data.

View File

@@ -0,0 +1,152 @@
---
title: 'Gallery Layout Document'
bookcase_cover_src: 'cover/picture.png'
bookcase_cover_src_dark: 'cover/picture_dark.png'
weight: 30
---
# Gallery Layout Document
Gallery layout is useful for demonstrating pictures and its statistical data.
> This layout can be used on both section page and regular post.
## Configuration
```yaml
---
type: 'gallery'
---
```
> Specify `type` in front-matter will change the template lookup order.
### gallery_resources
Content resources. URL can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path)
> Hugo will handle multilingual scenario out of the box
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/about
\____________________________________/\____/
base URL gallery_resources
```
```yaml
---
gallery_resources: '/about'
---
```
> default: error will occur in page
## Resouces Configuration
These settings are under the resource specified in `gallery_resources`.
### title
Title of image.
```yaml
---
title: 'Gallery'
---
```
> default: no title
### gallery_title_link
Link of the title.
```yaml
---
gallery_title_link: 'https://github.com/kaiiiz'
---
```
> default: no title link
### gallery_img_src
Image URL relative to the base URL. (with or without `/` prefix)
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/thanks.jpg
\_____________________________________/\________/
base URL gallery_img_src
```
```yaml
---
gallery_img_src: 'thanks.jpg'
---
```
> default: no image
### gallery_img_link
Link of the image.
```yaml
---
gallery_img_link: 'https://github.com/kaiiiz'
---
```
> default: no image link
### gallery_img_caption
Caption of the image. HTML is available.
```yaml
---
gallery_img_caption: '<span>Photo by <a href="https://unsplash.com/@swimstaralex?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alexander Sinn</a> on <a href="https://unsplash.com/s/photos/thanks?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>'
---
```
> default: no figure caption under image
### gallery_statistic
Statistic of the image. The format is:
```yaml
---
- key: key1
value: value1
- key: key2
value: value2
---
```
key and value both support markdown syntax.
> default: no figure caption under image
### weight
```yaml
---
weight: 3
---
```
> default: [default order](https://gohugo.io/templates/lists/#order-content)
## Headless Bundle
Hugo supports an amazing feature called **Headless Bundle**, which elegantly resolved the resouces publish issue.
For example, if you don't want to publish the resouces of the gallery layout, you can create a leaf bundle and specified `headless = true` in `index.md`'s front-matter. These resources will only be used during rendering process. In other word, no file will be generated to `/public` folder.
Checkout [Headless Bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) for more details.

View File

@@ -0,0 +1,8 @@
---
title: 'List Layout'
bookcase_cover_src: 'cover/list.png'
bookcase_cover_src_dark: 'cover/list_dark.png'
type: "bookcase"
---
List layout is the built-in section layout. Monochrome add options to adjust its behavior.

View File

@@ -0,0 +1,14 @@
---
title: 'List Layout Demo'
bookcase_cover_src: 'cover/list.png'
bookcase_cover_src_dark: 'cover/list_dark.png'
weight: 40
---
```
.
├── _index.md <- you're here!
├── post1.md
├── post2.md
└── post3.md
```

View File

@@ -0,0 +1,7 @@
---
title: 'post1'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post2'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post3'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,40 @@
---
title: 'List Layout Document'
bookcase_cover_src: 'cover/list.png'
bookcase_cover_src_dark: 'cover/list_dark.png'
weight: 40
changelogs:
---
List layout is the built-in section layout. Monochrome add options to adjust its behavior.
## Configuration
### Group by year
An option to control group setting.
```yaml
group_by_year: false
```
> default: theme's [`list_layout.enable_group_by_year`](/hugo-theme-monochrome/configuration/theme/#group-by-year)
### Show date
Show / Hide date right after the post entry.
```yaml
show_date: false
```
> default: theme's [`list_layout.enable_show_date`](/hugo-theme-monochrome/configuration/theme/#show-date)
### Pagination
```yaml
pagination: false
```
> default: theme's [`list_layout.enable_pagination`](/hugo-theme-monochrome/configuration/theme/#pagination)

View File

@@ -0,0 +1,10 @@
---
title: 'Postcard Layout'
bookcase_cover_src: 'cover/catalogue.png'
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
type: "bookcase"
---
Postcard layout shows summary of regular posts, its useful for creating home page. Postcard layout paginates page according to your `paginate` config setting.
> This layout can only be used on section page. (`_index.md`)

View File

@@ -0,0 +1,18 @@
---
title: 'Postcard Layout Demo'
bookcase_cover_src: 'cover/catalogue.png'
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
type: 'postcard'
weight: 40
---
```
.
├── _index.md <- you're here!
├── post1.md
├── post2.md
├── post3.md
├── post4.md
├── post5.md
└── post6.md
```

View File

@@ -0,0 +1,7 @@
---
title: 'post1'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post2'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post3'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post4'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post5'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,7 @@
---
title: 'post6'
date: 2021-02-06
search_hidden: true
---
Hello world!

View File

@@ -0,0 +1,21 @@
---
title: 'Postcard Layout Document'
bookcase_cover_src: 'cover/catalogue.png'
bookcase_cover_src_dark: 'cover/catalogue_dark.png'
weight: 40
changelogs:
---
Postcard layout show summary of regular posts, it's useful for creating home page.
> This layout can only be used on list layout.
## Configuration
```yaml
---
type: 'postcard'
---
```
> Specify `type` in front-matter will change the template lookup order.