Skip to content

Commit

Permalink
Only show "Or, continue" if there's another primary option
Browse files Browse the repository at this point in the history
Also, remove border on Back links w/ text on splash pages
  • Loading branch information
eloyer committed Jul 6, 2016
1 parent 32019a6 commit 36112fc
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,18 +527,25 @@
// This option is on the current path or we don't know what path we're on
if (( foundQueryPath && ( page.containingPath.slug == queryVars.path )) || !foundQueryPath ) {

var continueVerbage;
if (pathOptionCount == 0) {
continueVerbage = "Continue to ";
} else {
continueVerbage = "Or, continue to "
}

// continue button
links = $( '<p></p>' );
var continue_button = $( '<a class="continue_btn nav_btn" href="' + page.containingPathNodes[page.containingPathIndex+1].url +
'?path=' + page.containingPath.slug + '">Or, continue to &ldquo;' + page.containingPathNodes[page.containingPathIndex+1].getDisplayTitle() +
'?path=' + page.containingPath.slug + '">' + continueVerbage + '&ldquo;' + page.containingPathNodes[page.containingPathIndex+1].getDisplayTitle() +
'&rdquo;</a>' ).appendTo(links);
if ( pathOptionCount == 0 ) {
continue_button.addClass( 'primary' );
}

// back button
if ( page.containingPathIndex > 0 ) {
var back_button = $( '<a id="back-btn" class="nav_btn" href="' + page.containingPathNodes[ page.containingPathIndex - 1 ].url + '?path=' + page.containingPath.slug + '">&laquo;</a> ' ).prependTo(links);
var back_button = $( '<a id="back-btn" class="nav_btn bordered" href="' + page.containingPathNodes[ page.containingPathIndex - 1 ].url + '?path=' + page.containingPath.slug + '">&laquo;</a> ' ).prependTo(links);
}

section.append( links );
Expand Down

0 comments on commit 36112fc

Please sign in to comment.