diff options
author | Pavel Kanyshev <aerohub@users.noreply.github.com> | 2017-08-28 19:41:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-28 19:41:57 +0300 |
commit | 7488776eb014298ac87a8caa632edcd8c2b2bf09 (patch) | |
tree | 5d2965c1896835f81b66358503cbdd8859b61c39 | |
parent | 4025925fb0e6a2c9fa003c80adca2886d62eb2cd (diff) | |
parent | 33275fcfd6e35b0566a19b0c60d81a9e342f1050 (diff) |
Merge pull request #11 from jacsmith21/master
Individual Item buttontext
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 7 |
4 files changed, 10 insertions, 5 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/footer.html b/layouts/partials/footer.html index 35cad37..dcdf07d 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1 +1,3 @@ - <p>{{ with .Site.Params.footertext }}{{ . | markdownify }}{{ end }}</p>
\ No newline at end of file +<footer> + {{ with .Site.Params.footertext }}{{ . | markdownify }}{{ end }} +</footer>
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e39d567..24a87a1 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -15,6 +15,6 @@ <link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/default.css" /> <link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/component.css" /> {{ range .Site.Params.custom_css }} - <link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}"> + <link rel="stylesheet" href="{{ . }}"> {{ end }} <script src="{{ .Site.BaseURL }}js/modernizr.custom.js"></script> diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 19b1fdf..93a33ef 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -269,7 +269,7 @@ create : function() { this.$title = $( '<h3></h3>' ); this.$description = $( '<p></p>' ); - this.$href = $( '<a href="#">{{ .Site.Params.buttontext }}</a>' ); + this.$href = $( '<a href="#" target="_blank">{{ .Site.Params.buttontext }}</a>' ); this.$details = $( '<div class="og-details"></div>' ).append( this.$title, this.$description, this.$href ); this.$loading = $( '<div class="og-loading"></div>' ); this.$fullimage = $( '<div class="og-fullimg"></div>' ).append( this.$loading ); @@ -301,11 +301,14 @@ href : $itemEl.attr( 'href' ), largesrc : $itemEl.data( 'largesrc' ), title : $itemEl.data( 'title' ), - description : $itemEl.data( 'description' ) + description : $itemEl.data( 'description' ), + buttontext : $itemEl.data( 'buttontext' ) }; 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 ); |