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

github.com/djuelg/Shapez-Theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Juelg <djuelg@gmx.de>2016-10-08 15:38:53 +0300
committerDominik Juelg <djuelg@gmx.de>2016-10-08 15:38:53 +0300
commit654bb11e54fe9d0c94e07e0fd7c11c1a1851db3f (patch)
treed8ec22345b5c1921929d0ead75c85e662545a482
parent68ef594ca594e76bbe8ce1e4385807e269b680d1 (diff)
fixed panic errors if config is missing #9
-rw-r--r--layouts/index.html4
-rwxr-xr-xlayouts/partials/sidebar.svg4
2 files changed, 4 insertions, 4 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 12b3c31..3cc9820 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -15,12 +15,12 @@
</div>
<div id="scroll-down" class="timeline-container">
- {{ if .Site.Params.message }}
+ {{ if or .Site.Params.message (and (not .Site.Params.title_l1) (not .Site.Params.title_l2)) }}
<div class="timeline-post" style="padding-bottom: 50px;">
<div class="attention-message">
</br><h1>!</h1>
</div>
- <h3>{{ .Site.Params.message }}</h3>
+ <h3>{{if and (not .Site.Params.title_l1) (not .Site.Params.title_l2)}}Error: Please use sample-config.toml from Shapez-Theme folder as boilerplate config.{{ else }}{{ .Site.Params.message }}{{ end }}</h3>
</div>
{{ end }}
diff --git a/layouts/partials/sidebar.svg b/layouts/partials/sidebar.svg
index 19777aa..5228eb4 100755
--- a/layouts/partials/sidebar.svg
+++ b/layouts/partials/sidebar.svg
@@ -73,13 +73,13 @@
<a class="side-nav" xlink:title="Previous Article" xlink:href="{{if .PrevInSection}}{{.PrevInSection.Permalink}}{{else}}javascript:void(0);{{end}}">
<circle cx="185" cy="550" r="40" fill="transparent" />
<path d="M1149 1784c-233-240-425-440-427-444-1-4 55-62 125-130s269-261 442-429l314-306 137 143 137 143-191 187c-105 103-240 234-299 292l-108 105 291 300 290 299-137 138c-76 76-140 138-143 138s-197-196-431-436z" transform="matrix(.056 0 0 -.057 112.114 626.942)" filter="url(#c)"
- {{if or (not .PrevInSection) (in .Permalink .Site.Params.button_2) }} fill="#4CABAB" style="cursor: not-allowed;" {{end}}/>
+ {{if (not .PrevInSection) }} fill="#4CABAB" style="cursor: not-allowed;" {{end}}/>
</a>
<a class="side-nav" xlink:title="Next Article" xlink:href="{{if .NextInSection}}{{.NextInSection.Permalink}}{{else}}javascript:void(0);{{end}}">
<circle cx="280" cy="550" r="40" fill="transparent" />
<path d="M1149 1784c-233-240-425-440-427-444-1-4 55-62 125-130s269-261 442-429l314-306 137 143 137 143-191 187c-105 103-240 234-299 292l-108 105 291 300 290 299-137 138c-76 76-140 138-143 138s-197-196-431-436z" transform="matrix(-.056 0 0 -.057 358.62 626.815)" filter="url(#d)"
- {{if or (not .NextInSection) (in .Permalink .Site.Params.button_2) }} fill="#4CABAB" style="cursor: not-allowed;" {{end}}/>
+ {{if (not .NextInSection) }} fill="#4CABAB" style="cursor: not-allowed;" {{end}}/>
</a>
<image y="797.66" x="123.81" xlink:href="{{ .Site.BaseURL }}{{ .Site.Params.logo }}" preserveAspectRatio="xMidYMid meet" height="230.68" width="230.68" image-rendering="optimizeQuality"/>