From 0c27151f6a76d45be496442ec995e5e33d11787a Mon Sep 17 00:00:00 2001
From: Karl <kc0bfv@gmail.com>
Date: Sun, 19 Jan 2020 03:28:41 +0000
Subject: [PATCH] Fix HTML omission by adding shortcode
---
layouts/shortcodes/dropdown/content.html | 1 +
exampleSite/content/cool.md | 9 +++++----
exampleSite/content/interesting.md | 9 +++++----
exampleSite/content/awesome.md | 9 +++++----
layouts/shortcodes/dropdown/link.html | 1 +
5 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/exampleSite/content/awesome.md b/exampleSite/content/awesome.md
index 7230dcb..06d611a 100644
--- a/exampleSite/content/awesome.md
+++ b/exampleSite/content/awesome.md
@@ -9,7 +9,8 @@
---
Here's some awesome text on an awesome page. That image on the left? It'll randomly change on load between the ones in "sideimages".
-<br><a href="javascript:toggleDisplay('drop_stuff');">Stuff that drops down when you click on it:</a>
- <div id="drop_stuff" style="display:none">
- This stuff drops down because you clicked on the text.
- </div>
+{{< dropdown/link togglename="dropstuff" linktext="Stuff that drops down when you click on it top:" >}}
+
+{{< dropdown/content togglename="dropstuff" >}}
+ This stuff drops down because you clicked on the text.
+{{< /dropdown/content >}}
diff --git a/exampleSite/content/cool.md b/exampleSite/content/cool.md
index 01df681..a2f0c09 100644
--- a/exampleSite/content/cool.md
+++ b/exampleSite/content/cool.md
@@ -9,7 +9,8 @@
---
Here's some cool text on a cool page. That image on the left? It'll randomly change on load between the ones in "sideimages".
-<br><a href="javascript:toggleDisplay('drop_stuff');">Stuff that drops down when you click on it:</a>
- <div id="drop_stuff" style="display:none">
- This stuff drops down because you clicked on the text.
- </div>
+{{< dropdown/link togglename="dropstuff" linktext="Stuff that drops down when you click on it top:" >}}
+
+{{< dropdown/content togglename="dropstuff" >}}
+ This stuff drops down because you clicked on the text.
+{{< /dropdown/content >}}
diff --git a/exampleSite/content/interesting.md b/exampleSite/content/interesting.md
index 16a9f68..ded111f 100644
--- a/exampleSite/content/interesting.md
+++ b/exampleSite/content/interesting.md
@@ -9,7 +9,8 @@
---
Here's some interesting text on an interesting page. That image on the left? It'll randomly change on load between the ones in "sideimages".
-<br><a href="javascript:toggleDisplay('drop_stuff');">Stuff that drops down when you click on it:</a>
- <div id="drop_stuff" style="display:none">
- This stuff drops down because you clicked on the text.
- </div>
+{{< dropdown/link togglename="dropstuff" linktext="Stuff that drops down when you click on it top:" >}}
+
+{{< dropdown/content togglename="dropstuff" >}}
+ This stuff drops down because you clicked on the text.
+{{< /dropdown/content >}}
diff --git a/layouts/shortcodes/dropdown/content.html b/layouts/shortcodes/dropdown/content.html
new file mode 100644
index 0000000..97b3f6f
--- /dev/null
+++ b/layouts/shortcodes/dropdown/content.html
@@ -0,0 +1 @@
+<div id="{{ .Get "togglename" }}" style="display:none">{{ .Inner }}</div>
diff --git a/layouts/shortcodes/dropdown/link.html b/layouts/shortcodes/dropdown/link.html
new file mode 100644
index 0000000..c7bb0d6
--- /dev/null
+++ b/layouts/shortcodes/dropdown/link.html
@@ -0,0 +1 @@
+<a href="javascript:toggleDisplay('{{ .Get "togglename" }}');">{{ .Get "linktext" }}</a>
--
Gitblit v1.10.0