Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/c/switch.html')
-rw-r--r--layouts/shortcodes/c/switch.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/shortcodes/c/switch.html b/layouts/shortcodes/c/switch.html
new file mode 100644
index 0000000..a3cb392
--- /dev/null
+++ b/layouts/shortcodes/c/switch.html
@@ -0,0 +1,8 @@
+{{ $name := replace (.Get 0) "*" "" }}
+{{ $required := strings.HasSuffix (.Get 0) "*" }}
+{{ $id := $name}}
+
+<div class="custom-control custom-switch">
+ <input type="checkbox" name="{{$name}}" id="{{$id}}" class="custom-control-input" value="on">
+ <label class="custom-control-label" for="{{$id}}">{{ chomp .Inner }}</label>
+</div> \ No newline at end of file