Skip to content

Commit

Permalink
Docs: Only show added in page badge if relevant (#37399)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo authored Oct 31, 2022
1 parent cda4773 commit baedc38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion site/layouts/_default/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ <h5 class="offcanvas-title" id="bdSidebarOffcanvasLabel">Browse docs</h5>
<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>
Expand Down

0 comments on commit baedc38

Please sign in to comment.