aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-03-23 06:09:42 +0000
committerSean Whitton <spwhitton@spwhitton.name>2015-03-23 06:09:42 +0000
commit72f2d4cb2a296887c74bb49b364f8df3adf43bf7 (patch)
tree0ddb5d3bd309a0a49c7e5648898b25f334f2e9e8
parentf547469c4b1e16fa6715d7d10c226f16b5d3b0e2 (diff)
downloadsariulclocks-72f2d4cb2a296887c74bb49b364f8df3adf43bf7.tar.gz
rm old stuff
-rw-r--r--src/Utils/Classes.hs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/Utils/Classes.hs b/src/Utils/Classes.hs
index bf5c0ad..d3ee82c 100644
--- a/src/Utils/Classes.hs
+++ b/src/Utils/Classes.hs
@@ -11,17 +11,6 @@ import Data.Function (on)
import Text.XHtml.Bootstrap
import Control.Monad (liftM, liftM2)
--- Make the columns with rankingColumns, and then transpose them so
--- that we can make HTML.
-
--- TODO: Do this as two composed folds (point-free), rather than
--- three: first one accumulates to list of three rows (each step adds
--- to all three rows) and second turns list of three rows into Html.
---
--- This also means that we can have the whole column with a meaningful
--- blue background colour for the current class and the winning two
--- classes, not only the first row.
-
rankings' :: Maybe Class -> ScoresList -> ([Html], [Html], [Html])
rankings' theClass theScores = foldr step ([], [], []) . sortBy (flip $ (compare `on` snd)) $ theScores
where
@@ -44,16 +33,6 @@ rankings = do
table # "table table-bordered table-centered table-chunky"
<< ((tr << top) +++ (tr << middle) +++ (tr << bottom)))
--- rankings :: Maybe Class -> ScoresList -> Html
--- rankings currentClass scores = table ! [htmlAttr "class" (noHtml +++ "table table-bordered table-centered table-chunky")]
--- << foldr (\row acc -> (tr << row) +++ acc) noHtml (rankings' currentClass scores)
-
--- rankings' :: Maybe Class -> ScoresList -> [Html]
--- rankings' currentClass scores = foldr step [noHtml, noHtml, noHtml] (rankingColumns currentClass scores)
--- where
--- step (first, second, third) [firstRow, secondRow, thirdRow] =
--- [first +++ firstRow, second +++ secondRow, third +++ thirdRow]
-
secondsToTime :: Int -> String
secondsToTime n = minutes' ++ ":" ++ seconds'
where