mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 11:42:39 +00:00
feat(version): update version badge shortcode documentation and examples
feat(rtl): add .fa-feather icon to RTL support
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="{{ $labelWidth }}" height="20" fill="#403c3d" />
|
||||
<rect x="{{ $labelWidth }}" width="{{ $versionWidth }}" height="20" fill="#{{ .color }}" />
|
||||
<rect x="{{ $labelWidth }}" width="{{ $versionWidth }}" height="20" fill="{{ .color }}" />
|
||||
<rect width="{{ $width }}" height="20" fill="url(#s)" />
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
.fa-pen-to-square,
|
||||
.fa-pen-clip,
|
||||
.fa-square-pen,
|
||||
.fa-feather,
|
||||
.fa-list-ul,
|
||||
.fa-list-check,
|
||||
.fa-clipboard-list,
|
||||
|
||||
@@ -728,7 +728,7 @@ end_level = 6
|
||||
# Whether to decrease the H1 heading level in content.
|
||||
decrease_h1 = false
|
||||
|
||||
# Post disclaimer/declaration.
|
||||
# {{< version 1.0.0 >}} Post disclaimer/declaration.
|
||||
[params.disclaimer]
|
||||
# Whether to enable the disclaimer.
|
||||
enable = false
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
Version badge shortcode.
|
||||
Renders an inline SVG version badge linking to the repository release/tag.
|
||||
|
||||
@param {String} 0 - The version string (e.g., "v1.0.0")
|
||||
@param {String} 0 - The version string (e.g., "1.0.0")
|
||||
@param {String} [1="new"] - The type: "new", "changed", "deleted", "deprecated"
|
||||
@param {String} [2] - Custom URL override (defaults to repo_version.url)
|
||||
@param {String} [3] - Custom repo name override (defaults to repo_version.name)
|
||||
|
||||
@example
|
||||
{{< version "v1.0.0" >}}
|
||||
{{< version "v0.4.5" "deprecated" >}}
|
||||
{{< version 1.0.0 >}}
|
||||
{{< version 0.4.5 deprecated >}}
|
||||
*/ -}}
|
||||
{{- $rvc := dict "Page" .Page "Key" "repo_version" | partial "function/param.html" | default dict -}}
|
||||
{{- $version := .Get 0 -}}
|
||||
@@ -18,10 +18,10 @@
|
||||
{{- $isCJK := partial "function/is-cjk.html" . -}}
|
||||
{{- $url := printf "%v%v" (.Get 2 | default $rvc.url) $version -}}
|
||||
{{- $colorMap := dict
|
||||
"new" "00b1ff"
|
||||
"changed" "81bd65"
|
||||
"deleted" "ff5252"
|
||||
"deprecated" "ff9101"
|
||||
"new" "#00b1ff"
|
||||
"changed" "#81bd65"
|
||||
"deleted" "#ff5252"
|
||||
"deprecated" "#ff9101"
|
||||
-}}
|
||||
{{- $color := index $colorMap $type | default (index $colorMap "new") -}}
|
||||
{{- $repoName := .Get 3 | default $rvc.name -}}
|
||||
|
||||
Reference in New Issue
Block a user