forked from mirrors/hugo-theme-terminal
remove old figure shortcode
This commit is contained in:
@ -40,11 +40,6 @@
|
|||||||
```go
|
```go
|
||||||
{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}
|
{{< 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`**)
|
- **`code`** (props required: **`language`**; props optional: **`title`**, **`open`**)
|
||||||
- e.g.
|
- e.g.
|
||||||
```go
|
```go
|
||||||
|
@ -241,19 +241,12 @@ figure figcaption {
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin-top: -8px;
|
margin-top: -8px;
|
||||||
|
padding: 0 8px;
|
||||||
border-radius: 0 0 var(--radius) var(--radius);
|
border-radius: 0 0 var(--radius) var(--radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
figure figcaption.left {
|
figure figcaption p:first-child {
|
||||||
text-align: left;
|
margin-top: 0;
|
||||||
}
|
|
||||||
|
|
||||||
figure figcaption.center {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
figure figcaption.right {
|
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
{{ if .Get "src" }}
|
|
||||||
<figure class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" >
|
|
||||||
<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} />
|
|
||||||
{{ if .Get "caption" }}
|
|
||||||
<figcaption class="{{ with .Get "captionPosition"}}{{ . }}{{ else -}} center {{- end }}" {{ with .Get "captionStyle" }} style="{{ . | safeCSS }}" {{ end }}>{{ .Get "caption" | safeHTML }}</figcaption>
|
|
||||||
{{ end }}
|
|
||||||
</figure>
|
|
||||||
{{ end }}
|
|
Reference in New Issue
Block a user