From 341c2baae3e2cc7d69e6d038c93eb80ccfb92604 Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Mon, 20 Jul 2020 22:40:34 +0200 Subject: [PATCH] new style --- make-pages/GalleryPage.hs | 16 ++--- make-pages/IndexPage.hs | 9 +-- make-pages/SinglePage.hs | 3 +- style/niss.svg | 1 + style/niss_tongue.svg | 1 + style/shiny/base.css | 72 ++++++++++++++++++++++ style/shiny/gallery.css | 113 ++++++++++++++++++++++++++++++++++ style/shiny/index.css | 97 +++++++++++++++++++++++++++++ style/shiny/single.css | 125 ++++++++++++++++++++++++++++++++++++++ style/tum/index.css | 35 ++++++----- style/tum/single.css | 8 +-- 11 files changed, 447 insertions(+), 33 deletions(-) create mode 100644 style/niss.svg create mode 100644 style/niss_tongue.svg create mode 100644 style/shiny/base.css create mode 100644 style/shiny/gallery.css create mode 100644 style/shiny/index.css create mode 100644 style/shiny/single.css diff --git a/make-pages/GalleryPage.hs b/make-pages/GalleryPage.hs index 1d0a175..b116769 100644 --- a/make-pages/GalleryPage.hs +++ b/make-pages/GalleryPage.hs @@ -2,7 +2,7 @@ module GalleryPage (make) where import Control.Exception -import Data.Function (on) +import Data.Function (on, (&)) import Data.List (sortOn, groupBy) import qualified Data.Text.Lazy as Lazy import System.FilePath ((), takeDirectory) @@ -27,7 +27,8 @@ make' title nsfw infos = [b|@0 - + + $*title @@ -61,14 +62,16 @@ makeYearItems :: Bool -- ^ nsfw -> Builder makeYearItems nsfw year infos = [b|@4
  • - $^year + $year' $4.items |] - where items = map (uncurry $ makeItem nsfw) infos + where + items = map (uncurry $ makeItem nsfw) infos + year' = show year & foldMap \c -> [b|$'c|] makeItem :: Bool -> FilePath -> Info -> Builder makeItem nsfw file info@(Info {title}) = [b|@4 -
  • +
  • @@ -79,5 +82,4 @@ makeItem nsfw file info@(Info {title}) = [b|@4 where dir = takeDirectory file thumb = maybe (throw $ NoThumb dir) (\t -> dir thumbFile t) $ #thumb info - cls | nsfw && #anyNsfw info = [b|class="item nsfw"|] - | otherwise = [b|class=item|] + nsfw' = if nsfw && #anyNsfw info then " nsfw" else "" diff --git a/make-pages/IndexPage.hs b/make-pages/IndexPage.hs index 775f3a0..d17dd45 100644 --- a/make-pages/IndexPage.hs +++ b/make-pages/IndexPage.hs @@ -13,7 +13,8 @@ make' (IndexInfo {title, galleries, links, footer}) = [b|@0 - + + $*title @@ -30,13 +31,13 @@ make' (IndexInfo {title, galleries, links, footer}) = [b|@0 |] where galleryList = if null galleries then "" else [b|@2 -