Added a wrapper shortcode.
This commit is contained in:
parent
c7d499dad7
commit
1d7250f48d
2 changed files with 22 additions and 2 deletions
23
README.md
23
README.md
|
|
@ -166,15 +166,34 @@ Zen comes with a improved version of the built in "figure" shortcut.
|
|||
Break float.
|
||||
|
||||
```
|
||||
{{% figure src="/images/image.jpg" class="right" %}}
|
||||
{{< figure src="/images/image.jpg" class="right" >}}
|
||||
|
||||
blablabla # Displayed left of the image.
|
||||
|
||||
{{% clear %}}
|
||||
{{< clear >}}
|
||||
|
||||
blablabla # Displayed below of the image.
|
||||
```
|
||||
|
||||
### Wrapper
|
||||
|
||||
A simple, but useful, shortcode to wrap content in a div with a class.
|
||||
|
||||
```
|
||||
{{% wrapper class-name-you-want %}}
|
||||
The **content** that should be wrapped.
|
||||
{{% /wrapper %}}
|
||||
```
|
||||
|
||||
This will produce:
|
||||
|
||||
```
|
||||
<div class="class-name-you-want">
|
||||
The <strong>content</strong> that should be wrapped.
|
||||
</div>
|
||||
```
|
||||
|
||||
|
||||
## Use Gulp to generate css from sass
|
||||
|
||||
Your new Zen theme uses Gulp.js as a task runner, so that it can do many
|
||||
|
|
|
|||
1
layouts/shortcodes/wrapper.html
Normal file
1
layouts/shortcodes/wrapper.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<div class="{{ .Get 0 }}">{{ .Inner }}</div>
|
||||
Loading…
Reference in a new issue