feat: add wide container shortcode

This commit is contained in:
welpo 2023-08-11 23:36:59 +02:00
parent f8891dba2c
commit fb0dea0106
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6
5 changed files with 94 additions and 4 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2023-08-09
updated = 2023-08-11
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
[taxonomies]
@ -128,3 +128,31 @@ Each in a new line. Markdown (links, italics…) will be rendered.
{%/* end */%}
```
## Containers
### Wide container
Use this shortcode if you want to have a wider table, paragraph, code block… On desktop, it will take up the width of the header. It will have no effect on mobile, except for tables, which will get a horizontal scroll.
{% wide_container() %}
| Title | Year | Director | Cinematographer | Genre | IMDb | Duration |
|-------------------|-------|----------------------|-----------------------|---------------|-------|--------------|
| Beoning | 2018 | Lee Chang-dong | Hong Kyung-pyo | Drama/Mystery | 7.5 | 148 min |
| The Master | 2012 | Paul Thomas Anderson | Mihai Mălaimare Jr. | Drama/History | 7.1 | 137 min |
| The Tree of Life | 2011 | Terrence Malick | Emmanuel Lubezki | Drama | 6.8 | 139 min |
{% end %}
#### Usage
```
{%/* wide_container() */%}
Place your code block, paragraph, table… here.
Markdown will of course be rendered.
{%/* end */%}
```