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,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)