Skip to content

Commit

Permalink
Only showing the Related Interests button when there's more than one …
Browse files Browse the repository at this point in the history
…interest to show (fixes #43)
  • Loading branch information
SherriAlexander committed Sep 30, 2014
1 parent 8f2fe94 commit e018684
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 24 deletions.
4 changes: 2 additions & 2 deletions _site/ui/css/styles.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _site/ui/js/scripts-concat.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _source/ui/css/styles.css

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions _source/ui/js/scripts-concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -23523,14 +23523,16 @@ Artbot.footerSlider = {

Artbot.footerSlider.vars.totalRelatedInterests = numberOfTags - 1; // zero-based index

//console.log("Number of tags: " + numberOfTags);
if (numberOfTags > 1) {
// Create click event to trigger cycleRelatedInterests
$("#cycle-relatedinterest").click(function(){
Artbot.footerSlider.cycleRelatedInterests(Artbot.var.relatedInterests);
return false;
}).addClass("is-visible");
} else {
$("#cycle-relatedinterest").removeClass("is-visible");
}

// Create click event to trigger cycleRelatedInterests
$("#cycle-relatedinterest").click(function(){
Artbot.footerSlider.cycleRelatedInterests(Artbot.var.relatedInterests);
return false;
});

// Trigger cycleRelatedInterests
Artbot.footerSlider.cycleRelatedInterests(Artbot.var.relatedInterests);

Expand Down
4 changes: 2 additions & 2 deletions _source/ui/js/scripts-concat.min.js

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions _source/ui/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,16 @@ Artbot.footerSlider = {

Artbot.footerSlider.vars.totalRelatedInterests = numberOfTags - 1; // zero-based index

//console.log("Number of tags: " + numberOfTags);
if (numberOfTags > 1) {
// Create click event to trigger cycleRelatedInterests
$("#cycle-relatedinterest").click(function(){
Artbot.footerSlider.cycleRelatedInterests(Artbot.var.relatedInterests);
return false;
}).addClass("is-visible");
} else {
$("#cycle-relatedinterest").removeClass("is-visible");
}

// Create click event to trigger cycleRelatedInterests
$("#cycle-relatedinterest").click(function(){
Artbot.footerSlider.cycleRelatedInterests(Artbot.var.relatedInterests);
return false;
});

// Trigger cycleRelatedInterests
Artbot.footerSlider.cycleRelatedInterests(Artbot.var.relatedInterests);

Expand Down
13 changes: 11 additions & 2 deletions _source/ui/sass/_ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ button, .ui-page-theme-a button.ui-btn {
}

h2.related {
padding-right:60px;
padding-right:60px;
}

.btn-right {
Expand All @@ -542,7 +542,16 @@ button, .ui-page-theme-a button.ui-btn {
top:50%;
margin-top:-17px;
}

#cycle-relatedinterest {
visibility:hidden;
opacity:0;
@include transition(all .2s linear);

&.is-visible {
visibility:visible;
opacity:1;
}
}
}

.content {
Expand Down

0 comments on commit e018684

Please sign in to comment.