2019-02-13 06:52:29 +01:00
---
2019-02-14 16:12:23 +01:00
title: "Cupper Shortcodes"
2019-02-13 06:52:29 +01:00
date: 2019-02-12T23:39:06-06:00
2019-02-14 22:53:48 +01:00
tags: [hugo, shortcodes]
2019-02-13 06:52:29 +01:00
---
## blockquote
```
2019-12-11 04:06:02 +01:00
{{< /* blockquote author="Carl Jung" */>}}
2019-02-13 06:52:29 +01:00
Even a happy life cannot be without a measure of darkness, and the word happy would lose its meaning if it were not balanced by sadness. It is far better to take things as they come along with patience and equanimity.
2019-12-11 04:06:02 +01:00
{{< /* /blockquote */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< blockquote author = "Carl Jung" > }}
2019-02-13 06:52:29 +01:00
Even a happy life cannot be without a measure of darkness, and the word happy would lose its meaning if it were not balanced by sadness. It is far better to take things as they come along with patience and equanimity.
2019-12-11 04:06:02 +01:00
{{< / blockquote > }}
2019-02-13 06:52:29 +01:00
2019-02-14 16:22:14 +01:00
## note
```
2019-12-11 04:06:02 +01:00
{{< /* note */>}}
2019-02-14 16:22:14 +01:00
This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical.
2019-12-11 04:06:02 +01:00
{{< /* /note */>}}
2019-02-14 16:22:14 +01:00
```
2019-12-11 04:06:02 +01:00
{{< note > }}
2019-02-14 16:22:14 +01:00
This is a note! It's something the reader may like to know about but is supplementary to the main content. Use notes when something may be interesting but not critical.
2019-12-11 04:06:02 +01:00
{{< / note > }}
2019-02-14 16:22:14 +01:00
## warning note
```
2019-12-11 04:06:02 +01:00
{{< /* warning */>}}
2019-02-14 16:22:14 +01:00
This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong.
2019-12-11 04:06:02 +01:00
{{< /* /warning */>}}
2019-02-14 16:22:14 +01:00
```
2019-12-11 04:06:02 +01:00
{{< warning > }}
2019-02-14 16:22:14 +01:00
This is a warning! It's about something the reader should be careful to do or to avoid doing. Use warnings when something could go wrong.
2019-12-11 04:06:02 +01:00
{{< / warning > }}
2019-02-14 16:22:14 +01:00
2019-02-13 06:52:29 +01:00
## cmd
```
{{< /* cmd */>}}
hugo server --gc
{{< /* /cmd */>}}
```
{{< cmd > }}
hugo server --gc
{{< / cmd > }}
## code
```
{{< /* code numbered="true" */>}}
< div [ [ [ role = "dialog" ] ] ] [ [ [ aria-labelledby = "dialog-heading" ] ] ] >
< button [ [ [ aria-label = "close" ] ] ] > x< / button >
< h2 [ [ [ id = "dialog-heading" ] ] ] > Confirmation< / h2 >
< p > Press Okay to confirm or Cancel< / p >
< button > Okay< / button >
< button > Cancel< / button >
< / div >
{{< /* /code */>}}
1. The dialog is only announced as a dialog if it takes the `dialog` ARIA role
2. The `aria-labelledby` relationship attribute makes the element carrying the `id` it points to its label
3. The close button uses `aria-label` to provide the text label "close", overriding the text content
4. The heading is used as the dialog's label. The `aria-labelledby` attribute points to its `id`
```
{{< code numbered = "true" > }}
< div [ [ [ role = "dialog" ] ] ] [ [ [ aria-labelledby = "dialog-heading" ] ] ] >
< button [ [ [ aria-label = "close" ] ] ] > x< / button >
< h2 [ [ [ id = "dialog-heading" ] ] ] > Confirmation< / h2 >
< p > Press Okay to confirm or Cancel< / p >
< button > Okay< / button >
< button > Cancel< / button >
< / div >
{{< / code > }}
1. The dialog is only announced as a dialog if it takes the `dialog` ARIA role
2. The `aria-labelledby` relationship attribute makes the element carrying the `id` it points to its label
3. The close button uses `aria-label` to provide the text label "close", overriding the text content
4. The heading is used as the dialog's label. The `aria-labelledby` attribute points to its `id`
2019-02-14 18:27:35 +01:00
## syntax highlighting
2019-02-13 21:50:51 +01:00
2019-02-15 16:20:39 +01:00
To get syntax highlighting for your code, use markdown code fences, then specify the language:
2019-02-13 21:50:51 +01:00
````
```html
< div role = "dialog" aria-labelledby = "dialog-heading" >
< button aria-label = "close" > x< / button >
< h2 id = "dialog-heading" > Confirmation< / h2 >
< p > Press Okay to confirm or Cancel< / p >
< button > Okay< / button >
< button > Cancel< / button >
< / div >
```
````
```html
< div role = "dialog" aria-labelledby = "dialog-heading" >
< button aria-label = "close" > x< / button >
< h2 id = "dialog-heading" > Confirmation< / h2 >
< p > Press Okay to confirm or Cancel< / p >
< button > Okay< / button >
< button > Cancel< / button >
< / div >
```
2019-02-13 06:52:29 +01:00
## codePen
```
2019-12-11 04:06:02 +01:00
{{< /* codePen VpVNKW */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< codePen VpVNKW > }}
2019-02-13 06:52:29 +01:00
## colors
```
2019-12-11 04:06:02 +01:00
{{< /* colors "#111111, #cccccc , #ffffff " */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< colors "# 111111 , #cccccc , #ffffff " > }}
2019-02-13 06:52:29 +01:00
## expandable
```
2019-12-11 04:06:02 +01:00
{{< /* expandable label="A section of dummy text" level="2" */>}}
2019-02-13 06:52:29 +01:00
Here is some markdown including [a link ](https://twitter.com/heydonworks ). Donec erat est, feugiat a est sed, aliquet pharetra ipsum. Vivamus in arcu leo. Praesent feugiat, purus a molestie ultrices, libero massa iaculis ante, sit amet accumsan leo eros vel ligula.
2019-12-11 04:06:02 +01:00
{{< /* /expandable */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< expandable label = "A section of dummy text" level = "2" > }}
2019-02-13 06:52:29 +01:00
Here is some markdown including [a link ](https://twitter.com/heydonworks ). Donec erat est, feugiat a est sed, aliquet pharetra ipsum. Vivamus in arcu leo. Praesent feugiat, purus a molestie ultrices, libero massa iaculis ante, sit amet accumsan leo eros vel ligula.
2019-12-11 04:06:02 +01:00
{{< / expandable > }}
2019-02-13 06:52:29 +01:00
## fileTree
```
2019-12-11 04:06:02 +01:00
{{< /* fileTree */>}}
2019-02-13 06:52:29 +01:00
* Level 1 folder
* Level 2 file
* Level 2 folder
* Level 3 file
* Level 3 folder
* Level 4 file
* Level 3 folder
* Level 4 file
* Level 4 file
* Level 3 file
* Level 2 folder
* Level 3 file
* Level 3 file
* Level 3 file
* Level 2 file
* Level 1 file
2019-12-11 04:06:02 +01:00
{{< /* /fileTree */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< fileTree > }}
2019-02-13 06:52:29 +01:00
* Level 1 folder
* Level 2 file
* Level 2 folder
* Level 3 file
* Level 3 folder
* Level 4 file
* Level 3 folder
* Level 4 file
* Level 4 file
* Level 3 file
* Level 2 folder
* Level 3 file
* Level 3 file
* Level 3 file
* Level 2 file
* Level 1 file
2019-12-11 04:06:02 +01:00
{{< / fileTree > }}
2019-02-13 06:52:29 +01:00
## ticks
```
2019-12-11 04:06:02 +01:00
{{< /* ticks */>}}
2019-02-13 06:52:29 +01:00
* Selling point one
* Selling point two
* Selling point three
2019-12-11 04:06:02 +01:00
{{< /* /ticks */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< ticks > }}
2019-02-13 06:52:29 +01:00
* Selling point one
* Selling point two
* Selling point three
2019-12-11 04:06:02 +01:00
{{< / ticks > }}
2019-02-13 06:52:29 +01:00
2019-10-03 03:03:16 +02:00
## figureCupper
2019-02-13 06:52:29 +01:00
```
2019-10-03 03:03:16 +02:00
{{< /* figureCupper
2019-02-14 16:22:14 +01:00
img="sun.jpg"
caption="The Sun is the star at the center of the Solar System. It is a nearly perfect sphere of hot plasma, with internal convective motion that generates a magnetic field via a dynamo process. It is by far the most important source of energy for life on Earth. [Credits ](https://images.nasa.gov/details-GSFC_20171208_Archive_e000393.html )."
command="Resize"
options="700x" */>}}
2019-02-13 06:52:29 +01:00
```
2019-10-03 03:03:16 +02:00
{{< figureCupper
2019-02-14 16:22:14 +01:00
img="sun.jpg"
caption="The Sun is the star at the center of the Solar System. It is a nearly perfect sphere of hot plasma, with internal convective motion that generates a magnetic field via a dynamo process. It is by far the most important source of energy for life on Earth. [Credits ](https://images.nasa.gov/details-GSFC_20171208_Archive_e000393.html )."
command="Resize"
options="700x" >}}
## principles
See the [full principles list ](https://github.com/zwbetz-gh/cupper-hugo-theme/blob/master/data/principles.json ).
```
2019-12-11 04:06:02 +01:00
{{< /* principles include="Add value, Be consistent" descriptions="true" */>}}
2019-02-14 16:22:14 +01:00
```
2019-12-11 04:06:02 +01:00
{{< principles include = "Add value, Be consistent" descriptions = "true" > }}
2019-02-13 06:52:29 +01:00
## wcag
2019-02-13 19:56:18 +01:00
See the [full wcag list ](https://github.com/zwbetz-gh/cupper-hugo-theme/blob/master/data/wcag.json ).
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< /* wcag include="1.2.1, 1.3.1, 4.1.2" */>}}
2019-02-13 06:52:29 +01:00
```
2019-12-11 04:06:02 +01:00
{{< wcag include = "1.2.1, 1.3.1, 4.1.2" > }}
2019-02-14 16:22:14 +01:00
## tested
2019-02-22 17:25:49 +01:00
See the [full browser list ](https://github.com/zwbetz-gh/cupper-hugo-theme/tree/master/static/images ).
2019-02-14 16:22:14 +01:00
```
2019-12-11 04:06:02 +01:00
{{< /* tested using="Firefox + JAWS, Chrome, Safari iOS + Voiceover, Edge" */>}}
2019-02-14 16:22:14 +01:00
```
2019-12-11 04:06:02 +01:00
{{< tested using = "Firefox + JAWS, Chrome, Safari iOS + Voiceover, Edge" > }}