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:
authorvjeantet <valere.jeantet@gmail.com>2020-09-26 00:02:04 +0300
committervjeantet <valere.jeantet@gmail.com>2020-09-26 00:02:04 +0300
commitbd37e4ece28d45280adeee6f4befc766bb18e264 (patch)
treedc00cdfdaeb44422008afeb42ed806adb6530afa
parente2fd5749ff2086b88e51a7954c99580275b058df (diff)
checlist : new shortcode "c/hidden"
-rw-r--r--exampleSite/content/checklist/_index.md2
-rw-r--r--exampleSite/content/checklist/webappsec/02_vulnerabilityreporting.md3
-rw-r--r--exampleSite/content/checklist/webappsec/03_https.md2
-rw-r--r--exampleSite/content/content-and-customization/00-adding-content/page-checklist/_index.md1
-rw-r--r--layouts/shortcodes/c/hidden.html5
5 files changed, 12 insertions, 1 deletions
diff --git a/exampleSite/content/checklist/_index.md b/exampleSite/content/checklist/_index.md
index 93cfa5b..bb45ab4 100644
--- a/exampleSite/content/checklist/_index.md
+++ b/exampleSite/content/checklist/_index.md
@@ -10,6 +10,8 @@ weight: 99
checklist: true
---
+
+
{{%notice success%}}
This is a demo of a [checklist page]({{%ref "content-and-customization/00-adding-content/page-checklist"%}})
{{%/notice %}}
diff --git a/exampleSite/content/checklist/webappsec/02_vulnerabilityreporting.md b/exampleSite/content/checklist/webappsec/02_vulnerabilityreporting.md
index 8bc1ad2..ac6e5dc 100644
--- a/exampleSite/content/checklist/webappsec/02_vulnerabilityreporting.md
+++ b/exampleSite/content/checklist/webappsec/02_vulnerabilityreporting.md
@@ -11,7 +11,8 @@ Because no system is entirely free of security issues, it's important to provide
{{</c/choices>}}
-{{<c/show `{app_vuln_report_way} == 'no'` warn_app_vuln_report_way_no >}}
+{{<c/show `{app_vuln_report_way} == 'no'`>}}
+{{<c/hidden warn_app_vuln_report_way_no `No external security contact published`>}}
{{%notice warning%}}
**Warning — possible medium-risk issue**\
\
diff --git a/exampleSite/content/checklist/webappsec/03_https.md b/exampleSite/content/checklist/webappsec/03_https.md
index 01dc317..5a5cae5 100644
--- a/exampleSite/content/checklist/webappsec/03_https.md
+++ b/exampleSite/content/checklist/webappsec/03_https.md
@@ -13,6 +13,7 @@ ignoresearch: true
{{</c/choices>}}
{{<c/show `{https_exposition} == 'http_https' or {https_exposition} == 'http_only'` >}}
+{{<c/hidden warn_https_exposition `Unencrypted application network traffic`>}}
{{%notice danger%}}
**Warning — possible high-risk issue**\
\
@@ -121,6 +122,7 @@ Because user traffic appears to transit networks behind your load balancer that
{{</c/choices>}}
{{<c/show `{https_mixedcontent} == 'no'` >}}
+{{<c/hidden warn_https_mixedcontent `Mixed content issue`>}}
{{%notice warning%}}
**Warning — possible medium-risk issue**\
\
diff --git a/exampleSite/content/content-and-customization/00-adding-content/page-checklist/_index.md b/exampleSite/content/content-and-customization/00-adding-content/page-checklist/_index.md
index a2d0187..af6cd3a 100644
--- a/exampleSite/content/content-and-customization/00-adding-content/page-checklist/_index.md
+++ b/exampleSite/content/content-and-customization/00-adding-content/page-checklist/_index.md
@@ -32,3 +32,4 @@ checklist: true
* c/check - a checkbox
* c/switch - a switch
* c/show - display a part with a condition using user inputs
+* c/hidden - set a hidden value
diff --git a/layouts/shortcodes/c/hidden.html b/layouts/shortcodes/c/hidden.html
new file mode 100644
index 0000000..aaebeed
--- /dev/null
+++ b/layouts/shortcodes/c/hidden.html
@@ -0,0 +1,5 @@
+{{ $name := .Get 0 }}
+{{ $value := .Get 1 }}
+{{ $options := .Get 2 }}
+{{ $multiple := cond (eq "multi" $options) true false }}
+<input type="hidden" name="{{$name}}" value="{{$value}}"> \ No newline at end of file