From 2f002fdf87dcabdc80522ce8527cd1cf6b753f86 Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Sun, 27 Dec 2020 16:55:22 +0000
Subject: [PATCH] edit template
---
layouts/shortcodes/button.html | 18 ++----------------
1 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html
index e125efa..7dbf39b 100644
--- a/layouts/shortcodes/button.html
+++ b/layouts/shortcodes/button.html
@@ -1,18 +1,4 @@
{{- $link := .Get 0 -}}
{{- $label := .Get 1 }}
-{{- $icon := .Get 2 }}
-{{- $modifier := "" }}
-{{- if in $label "translucent" }}
- {{ $modifier = "translucent" }}
-{{- end }}
-{{- if in $label "," }}
- {{- $details := split $label "," }}
- {{- $label = index $details 0 }}
- {{- $modifier = printf "button_%s" (trim (index $details 1) " ") }}
-{{- end -}}
-<a href="{{ $link }}" class="button {{ $modifier }}">
- {{- with $icon -}}
- <img src="/images/{{ . }}" alt="icon">
- {{- end }}
- {{- $label -}}
-</a>
+{{- $modifier := .Get 2 }}
+<a href="{{ $link }}" class="button{{ with $modifier }} {{ . }}{{ end }}">{{- $label -}}</a>
--
Gitblit v1.10.0