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

github.com/Chen-Zhe/photo-grid.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob <jacob.smith@unb.ca>2017-08-21 21:15:25 +0300
committerJacob <jacob.smith@unb.ca>2017-08-21 21:15:25 +0300
commite664d8b76a06ebaf99b78d9c2800cd6957ad61d8 (patch)
treeab40b444515cf0b01eacc808351a2f7499639c19
parent4025925fb0e6a2c9fa003c80adca2886d62eb2cd (diff)
added ability to define individual buttontext
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/scripts.html6
2 files changed, 6 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 88993a4..45cd857 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -11,7 +11,7 @@
<ul id="og-grid" class="og-grid">
{{ range $.Site.Data.items.items }}
<li>
- <a href="{{.url}}" data-largesrc="{{.image}}" data-title="{{.title}}" data-description="{{.description }}">
+ <a href="{{.url}}" data-largesrc="{{.image}}" data-title="{{.title}}" data-description="{{.description }}" data-buttontext="{{.buttontext}}">
<img src="{{.thumb}}" alt="{{.alt}}"/>
</a>
</li>
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 19b1fdf..90fc094 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -301,11 +301,15 @@
href : $itemEl.attr( 'href' ),
largesrc : $itemEl.data( 'largesrc' ),
title : $itemEl.data( 'title' ),
- description : $itemEl.data( 'description' )
+ description : $itemEl.data( 'description' ),
+ buttontext : $itemEl.data( 'buttontext' )
};
+ console.log(eldata)
this.$title.html( eldata.title );
this.$description.html( eldata.description );
+ if(eldata.buttontext) this.$href.text(eldata.buttontext);
+ else this.$href.text("{{ .Site.Params.buttontext }}")
if (eldata.href) {
this.$href.attr( 'href', eldata.href );