Better bigimg support
Add support for bigimg's on the front page, multiple images that rotate on both the front page and regular pages and posts, also added test images and a sample to demonstrate the functionality and how to specify bigimg's.
This commit is contained in:
parent
d3ebf37be4
commit
f84ba895a8
8 changed files with 54 additions and 17 deletions
26
exampleSite/content/post/2017-03-07-bigimg-sample.md
Normal file
26
exampleSite/content/post/2017-03-07-bigimg-sample.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: Big Image Sample
|
||||
subtitle: Using Multiple Images
|
||||
date: 2017-03-07
|
||||
tags: ["example", "bigimg"]
|
||||
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, {src: "/img/sphere.jpg", desc: "Sphere"}, {src: "/img/hexagon.jpg", desc: "Hexagon"}]
|
||||
---
|
||||
|
||||
The image banners at the top of the page are refered to as "bigimg" in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes.
|
||||
|
||||
<!--more-->
|
||||
|
||||
A single bigimg can be specified in the front matter by the following YAML:
|
||||
```
|
||||
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}]
|
||||
```
|
||||
|
||||
Multiple bigimgs can be specified in the front matter by the following YAML:
|
||||
```
|
||||
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, {src: "/img/sphere.jpg", desc: "Sphere"}, {src: "/img/hexagon.jpg", desc: "Hexagon"}]
|
||||
```
|
||||
|
||||
Also note that the description field is optional, and images could instead be specified by:
|
||||
```
|
||||
bigimg: [{src: "/img/triangle.jpg"}, {src: "/img/sphere.jpg"}, {src: "/img/hexagon.jpg"}]
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue