]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Docs: Only show added in page badge if relevant (#37399)
authorMark Otto <markd.otto@gmail.com>
Mon, 31 Oct 2022 05:57:19 +0000 (01:57 -0400)
committerGitHub <noreply@github.com>
Mon, 31 Oct 2022 05:57:19 +0000 (06:57 +0100)
site/layouts/_default/docs.html

index 27314c37d0b66e430f8508c0d1e4532309cd8212..d534f2c045d2a5b3eb642f75777d290f5ef6828d 100644 (file)
@@ -17,7 +17,9 @@
       <div class="bd-intro pt-2 ps-lg-2">
         <div class="d-md-flex flex-md-row-reverse align-items-center justify-content-between">
           <div class="mb-3 mb-md-0 d-flex">
-            <small class="d-inline-flex px-2 py-1 fw-semibold text-success bg-success bg-opacity-10 border border-success border-opacity-10 rounded-2 me-2">Added in v{{ .Page.Params.added }}</small>
+            {{- if .Page.Params.added -}}
+              <small class="d-inline-flex px-2 py-1 fw-semibold text-success bg-success bg-opacity-10 border border-success border-opacity-10 rounded-2 me-2">Added in v{{ .Page.Params.added }}</small>
+            {{- end -}}
             <a class="btn btn-sm btn-bd-light rounded-2" href="{{ .Site.Params.repo }}/blob/v{{ .Site.Params.current_version }}/site/content/{{ .Page.File.Path | replaceRE `\\` "/" }}" title="View and edit this file on GitHub" target="_blank" rel="noopener">
               View on GitHub
             </a>