Support hiding the featured image header text. (#155)
I updated the documentaiton as well as changed the contact page in the exampleSite to use this feature as a demo.
This commit is contained in:
parent
75d661632a
commit
e418548683
|
@ -78,6 +78,8 @@ To enable DISQUS comments, add `disqusShortname = YOURSHORTNAME` to your config
|
||||||
|
|
||||||
For any page or post you can add a featured image by including the local path in front matter (see content in the `exampleSite/content/_readme.md` file for examples): `featured_image: '/images/gohugo-default-sample-hero-image.jpg'`
|
For any page or post you can add a featured image by including the local path in front matter (see content in the `exampleSite/content/_readme.md` file for examples): `featured_image: '/images/gohugo-default-sample-hero-image.jpg'`
|
||||||
|
|
||||||
|
If you would like to hide the header text on the featured image on a page, set `omit_header_text` to `true`. See `exampleSite/content/contact.md` for an example.
|
||||||
|
|
||||||
You don't need an image though. The default background color is black, but you can change the color, by changing the default color class in the config.toml file. Choose a background color from any on the [Tachyons](http://tachyons.io/docs/themes/skins/) library site, and preface it with "bg-"
|
You don't need an image though. The default background color is black, but you can change the color, by changing the default color class in the config.toml file. Choose a background color from any on the [Tachyons](http://tachyons.io/docs/themes/skins/) library site, and preface it with "bg-"
|
||||||
|
|
||||||
example: `background_color_class = "bg-blue"` or `background_color_class = "bg-gray"`
|
example: `background_color_class = "bg-blue"` or `background_color_class = "bg-gray"`
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Contact
|
title: Contact
|
||||||
|
featured_image: "images/notebook.jpg"
|
||||||
|
omit_header_text: true
|
||||||
description: We'd love to hear from you
|
description: We'd love to hear from you
|
||||||
type: page
|
type: page
|
||||||
menu:
|
menu:
|
||||||
|
|
BIN
exampleSite/static/images/notebook.jpg
Normal file
BIN
exampleSite/static/images/notebook.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
|
@ -6,12 +6,14 @@
|
||||||
<div class="pb3-m pb6-l bg-black-60">
|
<div class="pb3-m pb6-l bg-black-60">
|
||||||
{{ partial "site-navigation.html" . }}
|
{{ partial "site-navigation.html" . }}
|
||||||
<div class="tc-l pv6 ph3 ph4-ns">
|
<div class="tc-l pv6 ph3 ph4-ns">
|
||||||
|
{{ if not .Params.omit_header_text }}
|
||||||
<h1 class="f2 f1-l fw2 white-90 mb0 lh-title">{{ .Title | default .Site.Title }}</h1>
|
<h1 class="f2 f1-l fw2 white-90 mb0 lh-title">{{ .Title | default .Site.Title }}</h1>
|
||||||
{{ with .Params.description }}
|
{{ with .Params.description }}
|
||||||
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
|
<h2 class="fw1 f5 f3-l white-80 measure-wide-l center lh-copy mt3 mb4">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</h2>
|
</h2>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
Loading…
Reference in a new issue