From 485bab9b985d5349071a686c8e59484da6dfd2bb Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Sat, 24 Jan 2015 18:36:55 -0500 Subject: [PATCH] Began theming pagination first/last/next/previous Added spans that will show "First Page", "Previous Page", "Next Page", "Last Page" when its unavailable. Eg. the user is on the last page so there should be no link to click and instead just place holder text. The css uses flexbox display and thus only works in modern browsers (see: http://caniuse.com/#feat=flexbox). This may be changed in the future as to support more browsers (IE9+ specifically). Images/Icons for "First Page", "Previous Page", "Next Page", "Last Page" have yet to be set (though would preferably be done in pure CSS). Signed-off-by: Collin J. Doering --- clay/PageComponents.hs | 10 ++++++- templates/partials/pagination.html | 45 +++++++++++++++++------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/clay/PageComponents.hs b/clay/PageComponents.hs index fbc9e16..bdd8ca4 100644 --- a/clay/PageComponents.hs +++ b/clay/PageComponents.hs @@ -105,7 +105,15 @@ aPost = do textIndent $ indent (em 1.5) textAlign justify - "#pagination" ? makeBorderBox Nothing Nothing + "#pagination" ? do + display flex + -- Unable to specify without falling back to plain css + -- justifyContent spaceBetween + "justify-content" -: "space-between" + makeBorderBox Nothing Nothing + + "#pagination" # ":after" ? do + content none businessCard :: Css businessCard = do diff --git a/templates/partials/pagination.html b/templates/partials/pagination.html index bffbaf6..70ec290 100644 --- a/templates/partials/pagination.html +++ b/templates/partials/pagination.html @@ -1,34 +1,39 @@