Skip to content

Commit

Permalink
Make post list items indent on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Bull committed Apr 5, 2020
1 parent cba181a commit bc2ce95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions sass/modules/_postlist.scss
Expand Up @@ -15,6 +15,7 @@ body > main div.post-list {

&:before {
width: 30px;
transition: all 0.5s;
@extend .fas;
@extend .fa-angle-right;
}
Expand All @@ -26,6 +27,7 @@ body > main div.post-list {
&:before {
padding-left: 10px;
width: 20px;
transition: all 0.5s;
}
}

Expand Down
17 changes: 6 additions & 11 deletions site.hs
Expand Up @@ -17,21 +17,22 @@ main = do
let postsPattern = if draftMode then "posts/*" .||. "drafts/*" else "posts/*"

hakyllWith myConfig $ do
-- Process fonts
match "fonts/*" $ do
route idRoute
compile copyFileCompiler

-- Process styles
match "sass/**.scss" $
compile getResourceBody

scssDependencies <- makePatternDependency "sass/**.scss"
rulesExtraDependencies [scssDependencies] $
create ["css/main.css"] $ do
route idRoute
compile compressedSassCompiler

-- Process tags
tags <- buildTags postsPattern (fromCapture "tags/*.html")

tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute
Expand All @@ -45,20 +46,15 @@ main = do
>>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls

match postsPattern $ do
-- Process articles
match (postsPattern .||. fromList ["projects.md", "contact.md", "about.md"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
>>= relativizeUrls

match (fromList ["projects.md", "contact.md", "about.md"]) $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/post.html" pageCtx
>>= loadAndApplyTemplate "templates/default.html" pageCtx
>>= relativizeUrls

-- Process index page
match "index.html" $ do
route idRoute
compile $ do
Expand All @@ -67,7 +63,6 @@ main = do
listField "posts" postCtx (return posts) `mappend`
constField "title" "Home" `mappend`
defaultContext

getResourceBody
>>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx
Expand Down

0 comments on commit bc2ce95

Please sign in to comment.