Compare commits
2 commits
b47b193b20
...
394d1556f7
Author | SHA1 | Date | |
---|---|---|---|
394d1556f7 | |||
970f121e11 |
3 changed files with 64 additions and 8 deletions
|
@ -92,16 +92,16 @@ header nav [role="link"]:is([aria-current]:not([aria-current="false"]),:hover,:a
|
||||||
--pico-text-decoration: none;
|
--pico-text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
header :where(a:not([role="button"])) {
|
|
||||||
--pico-text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 40em;
|
max-width: 40em;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
article :where(a:not([role="button"])) {
|
||||||
|
--pico-text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Layout Styling
|
* Layout Styling
|
||||||
*/
|
*/
|
||||||
|
@ -342,11 +342,19 @@ code, kbd, pre {
|
||||||
}
|
}
|
||||||
|
|
||||||
a[rel="external"]::after {
|
a[rel="external"]::after {
|
||||||
content: url('data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27currentColor%27%3E%3Cpath%20d=%27M10%206V8H5V19H16V14H18V20C18%2020.5523%2017.5523%2021%2017%2021H4C3.44772%2021%203%2020.5523%203%2020V7C3%206.44772%203.44772%206%204%206H10ZM21%203V11H19L18.9999%206.413L11.2071%2014.2071L9.79289%2012.7929L17.5849%205H13V3H21Z%27%3E%3C/path%3E%3C/svg%3E');
|
content: "\ecae";
|
||||||
width: 0.7em;
|
font-size: 0.7em;
|
||||||
display: inline-block;
|
|
||||||
margin-left: 0.2em;
|
margin-left: 0.2em;
|
||||||
vertical-align: middle;
|
font-family: 'remixicon' !important;
|
||||||
|
font-style: normal;
|
||||||
|
color: var(--pico-muted-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
figure {
|
||||||
|
max-width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
margin: var(--pico-block-spacing-vertical) auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -37,3 +37,6 @@ outputFormats:
|
||||||
markup:
|
markup:
|
||||||
highlight:
|
highlight:
|
||||||
noClasses: false
|
noClasses: false
|
||||||
|
goldmark:
|
||||||
|
parser:
|
||||||
|
wrapStandAloneImageWithinParagraph: false
|
||||||
|
|
45
layouts/_markup/render-image.html
Normal file
45
layouts/_markup/render-image.html
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{{- $u := urls.Parse .Destination -}}
|
||||||
|
{{- $path := strings.TrimPrefix "./" $u.Path -}}
|
||||||
|
{{- $res := or (.PageInner.Resources.Get $path) (resources.Get $path) -}}
|
||||||
|
{{- $src := $u.String -}}
|
||||||
|
{{- if not $u.IsAbs -}}
|
||||||
|
{{- with $res -}}
|
||||||
|
{{- $src = .RelPermalink -}}
|
||||||
|
{{- with $u.RawQuery -}}
|
||||||
|
{{- $src = printf "%s?%s" $src . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with $u.Fragment -}}
|
||||||
|
{{- $src = printf "%s#%s" $src . -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if .IsBlock -}}
|
||||||
|
<figure>
|
||||||
|
<img src="{{ $src }}" alt="{{ .PlainText }}"
|
||||||
|
{{- with .Title }} title="{{ . }}" {{- end -}}
|
||||||
|
{{- range $k, $v := .Attributes -}}
|
||||||
|
{{- if $v -}}
|
||||||
|
{{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
>
|
||||||
|
{{- with $res.Params.legend -}}
|
||||||
|
<figcaption>
|
||||||
|
{{- . -}}
|
||||||
|
</figcaption>
|
||||||
|
{{- end -}}
|
||||||
|
</figure>
|
||||||
|
{{- else -}}
|
||||||
|
<img src="{{ $src }}" alt="{{ .PlainText }}"
|
||||||
|
{{- with .Title }} title="{{ . }}" {{- end -}}
|
||||||
|
{{- range $k, $v := .Attributes -}}
|
||||||
|
{{- if $v -}}
|
||||||
|
{{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "_partials/render-image.html" -}}
|
||||||
|
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue