From ab9dd6209e26ad9856e8cf41c1597a01073d4053 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Mar 2017 14:36:27 +0100 Subject: More colourcoding --- Handler/Common.hs | 2 ++ templates/inventoryListing.cassius | 10 ++++++++-- templates/inventoryListing.hamlet | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Handler/Common.hs b/Handler/Common.hs index 65e6ce1..f40375a 100644 --- a/Handler/Common.hs +++ b/Handler/Common.hs @@ -38,6 +38,8 @@ import Data.List.NonEmpty (NonEmpty) import Data.Semigroup hiding (First(..)) import Data.Monoid (First(..)) +import Data.Time.Calendar + humanId :: ItemId -> Text humanId = Text.pack . CBS.unpack . HID.encode ctx . fromIntegral . fromSqlKey where diff --git a/templates/inventoryListing.cassius b/templates/inventoryListing.cassius index 2f49bc7..225de5d 100644 --- a/templates/inventoryListing.cassius +++ b/templates/inventoryListing.cassius @@ -1,6 +1,12 @@ -.expired - color: #800 +.expired, .expireWeek, .expireMonth font-weight: bold +.expireMonth + color: #995e00 +.expireWeek + color: #994000 +.expired + color: #990000 + text-decoration: line-through .itemId font-family: monospace div.itemId diff --git a/templates/inventoryListing.hamlet b/templates/inventoryListing.hamlet index 802905d..797bd81 100644 --- a/templates/inventoryListing.hamlet +++ b/templates/inventoryListing.hamlet @@ -40,7 +40,7 @@ $of DateNever
$of DateKnown d - #{dayFormat d} + #{dayFormat d}
$case itemOpened $of DateKnown d -- cgit v1.2.3