From d41bea427b2e88177422dae5a9bad0fe27bef07f Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 2 Sep 2016 15:55:50 +0200 Subject: [PATCH] looks ready. time to get critique. --- Handler/AlbumSettings.hs | 5 ++- static/css/main.css | 4 +- templates/activate.hamlet | 4 +- templates/adminAlbumMedia.hamlet | 11 +++-- templates/adminAlbumSet.hamlet | 4 +- templates/adminAlbums.hamlet | 11 +++-- templates/adminComments.cassius | 39 ----------------- templates/adminComments.hamlet | 46 ++++++++++---------- templates/adminMedia.hamlet | 11 +++-- templates/adminMediumSet.hamlet | 4 +- templates/adminProfileSettings.hamlet | 6 +-- templates/adminProfiles.hamlet | 16 ++++--- templates/adminUserAlbums.hamlet | 13 +++--- templates/adminUserMedia.hamlet | 15 ++++--- templates/albumDelete.hamlet | 17 ++++---- templates/albumSettings.hamlet | 4 +- templates/commentDelete.hamlet | 17 ++++---- templates/commentReply.hamlet | 17 ++++---- templates/dUpload.hamlet | 2 +- templates/login.hamlet | 2 +- templates/mediumDelete.hamlet | 21 +++++----- templates/mediumSettings.hamlet | 9 ++-- templates/newAlbum.hamlet | 2 +- templates/profileDelete.hamlet | 17 ++++---- templates/profileSettings.hamlet | 4 +- templates/reactivate.hamlet | 13 +++--- templates/result.hamlet | 60 ++++++++++++--------------- templates/search.hamlet | 3 +- templates/signup.hamlet | 2 +- templates/tagMedia.hamlet | 10 ++--- 30 files changed, 164 insertions(+), 225 deletions(-) delete mode 100755 templates/adminComments.cassius diff --git a/Handler/AlbumSettings.hs b/Handler/AlbumSettings.hs index 9873988..fae9bd9 100755 --- a/Handler/AlbumSettings.hs +++ b/Handler/AlbumSettings.hs @@ -19,6 +19,7 @@ module Handler.AlbumSettings where import Import import Handler.Commons import qualified Data.Text as T +import Data.Maybe import System.Directory import System.FilePath import qualified Data.List as L @@ -107,7 +108,9 @@ postAlbumSettingsR albumId = do else do return [()] -- nothing to do here - width <- getThumbWidth $ albumSamplePic temp + sample <- runDB $ selectFirst + [MediumThumb ==. (fromMaybe "" $ albumSamplePic temp)] [] + let width = if isNothing sample then 230 else mediumThumbWidth $ entityVal $ fromJust sample _ <- runDB $ update albumId [ AlbumTitle =. albumTitle temp , AlbumShares =. newShares diff --git a/static/css/main.css b/static/css/main.css index 3bf4133..6b67c6d 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -53,7 +53,7 @@ a:hover, .item a:hover, .medium a:hover, a:hover figcaption { list-style: none; display: block; margin: 80px 80px 0; - padding: 0; + padding: 4em 0 4em; text-align: center; } @@ -192,7 +192,7 @@ footer { } .middle { - margin-top: 50px; + /*margin-top: 50px;*/ } @media (max-width: 755px) { diff --git a/templates/activate.hamlet b/templates/activate.hamlet index fc4b314..177e697 100755 --- a/templates/activate.hamlet +++ b/templates/activate.hamlet @@ -1,7 +1,7 @@ $newline always -