diff --git a/README.md b/README.md index d5d0764..29d0524 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,6 @@ ```go {{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}} ``` -- **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**) - - e.g. - ```go - {{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}} - ``` - **`code`** (props required: **`language`**; props optional: **`title`**, **`open`**) - e.g. ```go diff --git a/assets/css/main.css b/assets/css/main.css index 09aab02..2454fae 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -241,19 +241,12 @@ figure figcaption { font-size: 1rem; font-weight: normal; margin-top: -8px; + padding: 0 8px; border-radius: 0 0 var(--radius) var(--radius); } -figure figcaption.left { - text-align: left; -} - -figure figcaption.center { - text-align: center; -} - -figure figcaption.right { - text-align: right; +figure figcaption p:first-child { + margin-top: 0; } ul, diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html deleted file mode 100644 index 6642c82..0000000 --- a/layouts/shortcodes/figure.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ if .Get "src" }} -
- {{ . | plainify }} - {{ if .Get "caption" }} -
{{ .Get "caption" | safeHTML }}
- {{ end }} -
-{{ end }}