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

github.com/zwbetz-gh/cupper-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZachary Betz <zwbetz@gmail.com>2019-02-15 01:16:53 +0300
committerZachary Betz <zwbetz@gmail.com>2019-02-15 01:16:53 +0300
commit2061d36f78c54e2bcccd2334f0c728adb42a99d3 (patch)
tree64e82e5596fcd66d8105cbfe4908bd303e5684c4 /layouts
parent8b5fb3132c444e158233bcc967d08c66f17e4c61 (diff)
Use with instead of if
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/codePen.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/layouts/shortcodes/codePen.html b/layouts/shortcodes/codePen.html
index a378c0a..b608953 100644
--- a/layouts/shortcodes/codePen.html
+++ b/layouts/shortcodes/codePen.html
@@ -1,7 +1,8 @@
-{{ if .Site.Params.codePenUser }}
- <iframe height="300" scrolling="no" title="code demonstration with codePen" src="//codepen.io/{{ .Site.Params.codepenUser | lower }}/embed/{{ .Get 0 }}/?height=265&theme-id=dark&default-tab=result,result&embed-version=2" frameborder="no" allowtransparency="true" allowfullscreen="true" style="width: 100%;">
+{{ $pen := .Get 0 }}
+{{ with .Site.Params.codePenUser }}
+ <iframe height="300" scrolling="no" title="code demonstration with codePen" src="//codepen.io/{{ . | lower }}/embed/{{ $pen }}/?height=265&theme-id=dark&default-tab=result,result&embed-version=2" frameborder="no" allowtransparency="true" allowfullscreen="true" style="width: 100%;">
<div>
- <a href="//codepen.io/{{ .Site.Params.codePenUser | lower }}/pen/{{ .Get 0 }}">See the demo on codePen</a>
+ <a href="//codepen.io/{{ . | lower }}/pen/{{ $pen }}">See the demo on codePen</a>
</div>
</iframe>
{{ else }}