Layout fixes; move Styles source file into Fragments

This commit is contained in:
James Eversole 2024-02-27 12:31:20 -06:00
parent 8e1bedf9ec
commit 676aea2a99
3 changed files with 9 additions and 8 deletions

View File

@ -37,7 +37,7 @@ executable sampu
Core.Handlers
Core.HTTP
Core.Rendering
Core.Styles
Fragments.Base
Fragments.NotFound
Fragments.Styles
default-language: GHC2021

View File

@ -3,9 +3,9 @@ module Core.Handlers where
import qualified Core.Configuration as Conf
import Core.Feed (Post(..), autoFeed, renderFeed)
import Core.Rendering
import Core.Styles as S
import Fragments.Base
import Fragments.NotFound
import Fragments.Styles as S
import qualified Text.Atom.Feed as Atom
import Control.Monad.IO.Class (liftIO)

View File

@ -1,4 +1,4 @@
module Core.Styles where
module Fragments.Styles where
import Clay hiding (main_)
import qualified Clay.Media as M
@ -85,8 +85,7 @@ main_ :: Css
main_ = do
".main" ? do
margin (em 0) auto (em 0) auto
maxWidth $ pct 60
minWidth $ pct 40
width $ pct 60
notFound_ :: Css
notFound_ = do
@ -102,10 +101,11 @@ postList_ :: Css
postList_ = do
".postList" ? do
margin (em 0) auto (em 0) auto
fontSize (em 1.5)
minWidth (pct 60)
maxWidth (pct 95)
overflow scroll
ul ? do
fontSize (em 1.5)
code_ :: Css
code_ = do
@ -137,5 +137,6 @@ nav_ = do
mobileFriendly_ :: Css
mobileFriendly_ = query M.screen [M.maxWidth 768] $ do
".main" ? do
margin (em 1) auto (em 1) auto
maxWidth $ pct 95
width $ pct 95
".postList" ? do
width $ pct 95