From 1c7707158f00bdb15da0547e6e428ca4a494e405 Mon Sep 17 00:00:00 2001 From: Benjamin Attal Date: Mon, 2 Jun 2014 18:45:29 -0400 Subject: [PATCH] Move cycling buttons around. --- static/js/index.js | 10 +++++++--- static/sass/index.sass | 36 ++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/static/js/index.js b/static/js/index.js index d9af97c..351a9b5 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -151,7 +151,8 @@ function createResult(codelet) { var displayInfo = document.createElement("div"), codeElt = document.createElement("td"), hiddenInfoContainer = document.createElement("td"), - hiddenInfo = document.createElement("div"); + hiddenInfo = document.createElement("div"), + cycle = document.createElement("div"); //Level 3 var title = document.createElement("span"), site = document.createElement("span"), @@ -168,6 +169,7 @@ function createResult(codelet) { displayInfo.id = 'display-info'; codeElt.id = 'code'; hiddenInfo.id = 'hidden-info'; + cycle.id = 'cycle-matches' title.id = 'title'; site.id = 'site'; @@ -256,11 +258,13 @@ function createResult(codelet) { displayInfo.appendChild(title); displayInfo.appendChild(site); - displayInfo.appendChild(prevMatch); - displayInfo.appendChild(nextMatch); + + cycle.appendChild(prevMatch); + cycle.appendChild(nextMatch); newDiv.appendChild(displayInfo); newDiv.appendChild(table); + newDiv.appendChild(cycle); return newDiv; } diff --git a/static/sass/index.sass b/static/sass/index.sass index 909051d..6ad28b1 100644 --- a/static/sass/index.sass +++ b/static/sass/index.sass @@ -285,6 +285,12 @@ div#results margin-right: auto width: 80% + a + text-decoration: none + + &:hover + color: orange + /* TODO: 1) Hidden info - Add links for authors. @@ -306,33 +312,19 @@ div#results &.cascade @extend .t3 - margin-bottom: 10% + margin-bottom: 15% div#display-info font-size: 1.3em padding: 5px 0px 5px 5px width: 100% - a - text-decoration: none - - &:hover - color: orange - #title margin-right: 10px #site text-transform: capitalize - #prev-match - font-size: 0.7em - margin-left: 125px - - #next-match - font-size: 0.7em - margin-left: 20px - td#code width: $codeWidth height: inherit @@ -381,7 +373,15 @@ div#hidden-info #authors a font-family: monospace - text-decoration: none - &:hover - color: orange +div#cycle-matches + margin-left: 130px + margin-top: 20px + + #prev-match + font-size: 1.1em + margin-left: 125px + + #next-match + font-size: 1.1em + margin-left: 20px