Skip to content

Commit

Permalink
Page without hero and set height of callouts
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisrhymes committed Sep 14, 2019
1 parent f09f2bd commit 42dcd22
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 31 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ You can also set the height of the hero by providing a bulma hero height class i
**New in 0.5.4**
If you would like to add a call to action button in the hero then add `hero_link` and `hero_link_text` to the page's frontmatter.

**New in 0.5.7**
If you would like to hide the hero, you can set `hide_hero: true` in the page's frontmatter.

### Posts

If you want posts, create a `_posts` directory to store your posts as per normal Jekyll usage, with the `layout: post`. Next create a `blog` directory with an index.html file that has `layout: blog`
Expand Down Expand Up @@ -113,7 +116,7 @@ If you want to show the sidebar with latest posts then set `show_sidebar: true`
The menubar gets its content from a data file in your site's `_data` directory. Simply set the name of your data file in the page's menubar setting in the frontmatter.
```yml
```yaml
show_sidebar: false
menubar: example_menu
```
Expand All @@ -124,7 +127,7 @@ You will probably want to disable the show_sidebar otherwise there will be littl

Create a data file in the _data directory and use the following format (if using yml)

```yml
```yaml
- label: Example Menu
items:
- name: Home
Expand All @@ -148,7 +151,7 @@ For the current page to have an active class, ensure the `link:` format matches

You may make multiple menus in the same file, separated by the label

```yml
```yaml
- label: Menu Label
items:
- name: Example item
Expand All @@ -174,7 +177,7 @@ You may make multiple menus in the same file, separated by the label

The tabs gets its content from a data file in your site's `_data` directory. Simply set the name of your data file in the page's menubar setting in the frontmatter.

```yml
```yaml
title: Page with tabs
subtitle: Demo page with tabs
layout: page
Expand All @@ -189,7 +192,7 @@ Tabs can be used in conjunction with menubar and/or sidebar if you wish.

Create a data file in the _data directory and use the following format (if using yml)

```yml
```yaml
alignment: is-left
style: is-boxed
size: is-large
Expand Down Expand Up @@ -235,7 +238,7 @@ To enable Google Analytics add `google_analytics: UA-xxxxxxxx` to your `_config.

To add some footer links, create a yaml file in the `_data` directory using the following format

```yml
```yaml
- name: Blog
link: /blog/
- name: About
Expand All @@ -246,7 +249,7 @@ To add some footer links, create a yaml file in the `_data` directory using the

Then add the name of your yaml file (without the .yml extension) into the footer_menu setting in the `_config.yml`

```yml
```yaml
footer_menu: example_footer_menu
```

Expand All @@ -266,8 +269,7 @@ Now you can add simple product pages to your site using collections.

Start by creating a `_products` directory to hold your product pages and create a new page for each product, such as `product1.md`. In the front matter for this page you can set the standard settings, such as your title, subtitle, description (for meta-description), hero_image, as well as the additional product settings such as price, product_code, image, features and rating.

```yml
---
```yaml
title: Product 1 Name
subtitle: Product 1 tagline here
description: This is a product description
Expand All @@ -284,14 +286,13 @@ features:
- label: Available in multiple sizes
icon: fa-fighter-jet
rating: 3
---
```

The text you write for the page content will be displayed as the product description.

Next, add the following to your `_config.yml` to use collections to process the product pages and output them as individual pages.

```yml
```yaml
collections:
products:
output: true
Expand All @@ -306,7 +307,7 @@ You can also set default product page values here if you like, such as the layou

To add reviews to your product page, create a `reviews` directory in the `_data` directory and add a yml file with the name of the product_code from the product page, for example `_data/reviews/ABC124.yml`. Create the reviews using the following format:

```yml
```yaml
- name: Mr E Xample
rating: 4
title: Great product, highly recommended
Expand All @@ -329,14 +330,12 @@ If you don't want to display an avatar image then a default user icon will be di

To create a page listing your products you will need to create a product category page. Create a page, for example `products.md`, with the `layout: product-category` in the frontmatter. You can set the sort order of the products using `sort: title` to sort by the title, or by any setting in your product pages, such as price, rating or any custom frontmatter tags you wish to set.

```yml
---
```yaml
title: Products
subtitle: Check out our range of products
layout: product-category
show_sidebar: false
sort: title
---
```

### Scripts
Expand All @@ -355,10 +354,13 @@ You can now add callouts to a page to make a landing page style layout.

Create a data file following the below format. The style is for classes to set the background colour and sizes you would like to use of the Bulma hero container for the callouts.

**New in 0.5.7** You can set the height of the callouts in the data file, such as is-small, is-medium or is-large. If unset it will be is-medium by default.

The items have 5 fields, but only the title and subtitle are required.

```yml
```yaml
style: is-light
height: is-medium
items:
- title: Example callout 1
subtitle: Example subtitle 1
Expand All @@ -375,13 +377,11 @@ items:

To display the callouts on your page, add a callouts property in the frontmatter and set it to the name of your data file without the extension.

```yml
---
```yaml
layout: page
title: Example Landing Page
subtitle: This is an example landing page
callouts: example_callouts
---
```

## Contributing
Expand Down
1 change: 1 addition & 0 deletions _data/example_callouts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
style: is-light
height: is-medium
items:
- title: Example callout 1
subtitle: Example subtitle 1
Expand Down
4 changes: 3 additions & 1 deletion _data/example_menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Home
link: /
- name: Pages
link: #
link: /#
items:
- name: Page With Sidebar
link: /page-1/
Expand All @@ -15,6 +15,8 @@
link: /page-4/
- name: Page Without Footer
link: /page-5/
- name: Page Without Hero
link: /page-without-hero/
- name: Landing Page With Callouts
link: /landing/
- name: Blog
Expand Down
4 changes: 3 additions & 1 deletion _data/navigation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Pages
link: #
link: /#
dropdown:
- name: Page With Sidebar
link: /page-1/
Expand All @@ -11,6 +11,8 @@
link: /page-4/
- name: Page Without Footer
link: /page-5/
- name: Page Without Hero
link: /page-without-hero/
- name: Landing Page With Callouts
link: /landing/
- name: Products
Expand Down
4 changes: 2 additions & 2 deletions bulma-clean-theme.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Gem::Specification.new do |spec|
spec.name = "bulma-clean-theme"
spec.version = "0.5.6"
spec.version = "0.5.7"
spec.authors = ["chrisrhymes"]
spec.email = ["[email protected]"]

spec.summary = "Clean and simple theme using Bulma"
spec.homepage = "https://www.github.com/chrisrhymes/bulma-clean-theme"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_layouts|_includes|_sass|_posts|blog|LICENSE|README|package|node_modules|favicon.png)!i) }
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_layouts|_includes|_sass|_posts|blog|LICENSE|README|package|node_modules|favicon.png|changelog.txt)!i) }

spec.add_runtime_dependency "jekyll", "~> 3.8"
spec.add_runtime_dependency "jekyll-feed", "~> 0.11"
Expand Down
41 changes: 41 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 0.5.7
* Add option to hide hero - pull request #15 from risa2000
* Add ability to override the height of callouts - pull request #14 from agardnerIT

# 0.5.6
* Explicitly reference shortcut icon - pull request #13 from johannesegger

# 0.5.5
* Fix bug with navbar dropdown in IE and Edge
* Fix bug with layout where <code> elements were too wide

# 0.5.4
* Added landing page feature

# 0.5.3
* Remove extra </a> - pull request #8 from SumitBando

# 0.5.2
* Add head and footer script partials
* Updated Bulma to 0.7.5

# 0.5.1
* Fix headings not showing in post

# 0.5
* Add product page layouts

# 0.4.1
* Added footer links

# 0.4
* Added tabs, syntax highlighting and updated Bulma

# 0.3
* Added menubar

# 0.2
* Added hero background image, blog page images and Google Analytics

# 0.1
* Initial release
2 changes: 2 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ This demo site showcases the available page layout options.
* Page Without Sidebar
* Page With Menubar
* Page With Tabs
* Page Without Footer
* Page Without Hero
* Landing Page With Callouts
* Blog
* Post
Expand Down
15 changes: 7 additions & 8 deletions landing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,27 @@ This is the rest of the page content. You can add what you like here.

If you would like to add a call to action button in the hero then add `hero_link` and `hero_link_text` to the page's frontmatter

```yml
---
```yaml
layout: page
title: Example Landing Page
subtitle: This is an example landing page with callouts
hero_height: is-large
hero_link: /page-1/
hero_link_text: Example Call To Action
---
```
## Create a callout data file
Create a data file following the below format. The style is for classes to set the background colour and sizes you would like to use of the Bulma hero container for the callouts.
Create a data file following the below format. The style is for classes to set the background colour and sizes you would like to use of the Bulma hero container for the callouts.
**New in 0.5.7** You can set the height of the callouts in the data file, such as is-small, is-medium or is-large. If unset it will be is-medium by default.
The items have 5 fields, but only the title and subtitle are required.
```yml
```yaml
style: is-light
height: is-medium
items:
- title: Example callout 1
subtitle: Example subtitle 1
Expand Down Expand Up @@ -71,11 +72,9 @@ items:
To display the callouts on your page, add a callouts property in the frontmatter and set it to the name of your data file without the extension.
```yml
---
```yaml
layout: page
title: Example Landing Page
subtitle: This is an example landing page
callouts: example_callouts
---
```
16 changes: 16 additions & 0 deletions page-without-hero.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: page
title: Page Without Hero
description: This is a page with no hero
hide_hero: true
show_sidebar: false
menubar: example_menu
---

# Page Without Hero

This is a page without a hero.

To hide the hero, set `hide_hero: true` in the page's frontmatter.

Hiding the hero means that there will not be a title and subtitle displayed, so it will have to be added to the page content.

0 comments on commit 42dcd22

Please sign in to comment.