]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move the icon to a partial and optimize it.
authorXhmikosR <xhmikosr@gmail.com>
Tue, 16 Jul 2019 08:32:51 +0000 (11:32 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 17 Jul 2019 13:21:47 +0000 (16:21 +0300)
site/layouts/partials/docs-sidebar.html
site/layouts/partials/icons/arrow.svg [new file with mode: 0644]

index 63714ec784c4dddc4ab3975aba8ecdd407bea046..200f8cd4171669714c2af8ca5e2f8e6d114d0f55 100644 (file)
@@ -17,7 +17,7 @@
 
       <li class="bd-sidenav-group my-1{{ if $active_group }} active{{ end }} js-sidenav-group">
         <a class="d-inline-flex align-items-center bd-sidenav-group-link" href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/{{ if $group.pages }}{{ $link_slug }}/{{ end }}">
-          <svg class="bd-sidenav-group-link-icon" width="16" height="16" viewbox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path stroke="currentColor" stroke-width="2" d="M5 14l6-6-6-6" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"/></svg>
+          {{- partial "icons/arrow.svg" (dict "class" "bd-sidenav-group-link-icon" "width" "16" "height" "16") -}}
           <div>{{- $group.title -}}</div>
         </a>
 
diff --git a/site/layouts/partials/icons/arrow.svg b/site/layouts/partials/icons/arrow.svg
new file mode 100644 (file)
index 0000000..097c1a2
--- /dev/null
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"{{ with .width }} width="{{ . }}"{{ end }}{{ with .height }} height="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }} viewBox="0 0 16 16"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 14l6-6-6-6"/></svg>