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

github.com/gesquive/slate.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGus Esquivel <gesquive@gmail.com>2017-05-30 16:28:31 +0300
committerGus Esquivel <gesquive@gmail.com>2017-05-30 16:28:31 +0300
commit32207534a2e86d938187330e1dc5c0b5d4aa271f (patch)
treee8c8568ededeb4a3b0200fce8ba2957155ab495c
parent9f119c5305aa9e8ea026dc27c4875f08a2e4dd48 (diff)
add fallback styles for tilesv1.1.1
just in case users have javascript disabled.
-rw-r--r--layouts/partials/tile.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/partials/tile.html b/layouts/partials/tile.html
index 4e2fe15..bbf8ecf 100644
--- a/layouts/partials/tile.html
+++ b/layouts/partials/tile.html
@@ -4,7 +4,8 @@
data-url='{{ .Link.url }}'
{{ if .Link.bg_color }}data-bg-color='{{ .Link.bg_color | safeCSS }}'{{ end -}}
{{ if .Link.txt_color }}data-txt-color='{{ .Link.txt_color | safeCSS }}'{{ end -}}
- {{ if .Link.img }}data-img='{{ .Link.img }}'{{ end -}}>
+ {{ if .Link.img }}data-img='{{ .Link.img }}'{{ end -}}
+ {{ if or .Link.bg_color .Link.txt_color }}style='{{ if .Link.bg_color }}background-color:{{ .Link.bg_color | safeCSS }};{{ end }} {{ if .Link.txt_color }}color:{{ .Link.txt_color | safeCSS }}{{end}}'{{ end -}}>
{{ if .Link.img }}<img class="logo" src="{{ .Link.img }}"></img>{{ else }}{{ .Link.name }}{{ end }}</div>
<div class="tile-title">{{ .Link.name }}</div>
</a>