Fixup themes

This commit is contained in:
Dhananjay Balan 2020-04-07 12:42:13 +02:00
parent 7bf7721d2b
commit 22bf133122
5 changed files with 46 additions and 25 deletions

View File

@ -6,7 +6,7 @@ cabal-version: >= 1.10
executable site executable site
main-is: site.hs main-is: site.hs
build-depends: base == 4.* build-depends: base == 4.*
, hakyll >= 4.10.0 , hakyll == 4.13.*
, filepath >= 1.4 , filepath >= 1.4
, regex-compat , regex-compat
ghc-options: -threaded ghc-options: -threaded

View File

@ -13,13 +13,15 @@ html {
#title { #title {
grid-column-start: 1; grid-column-start: 1;
font-size: 12pt; font-size: 16pt;
font-style: bold;
text-align: left; text-align: left;
} }
#nav { #nav {
grid-column-start: 2; grid-column-start: 2;
text-align: right; text-align: right;
font-size: 16pt;
font-variant: small-caps; font-variant: small-caps;
word-spacing: 110%; word-spacing: 110%;
} }
@ -29,9 +31,9 @@ body {
font-family: 'IBM Plex Serif', serif; font-family: 'IBM Plex Serif', serif;
font-weight: 400; font-weight: 400;
color: #454545; color: #454545;
font-size: 12pt; font-size: 20px;
margin: 2em auto; margin: 2em auto;
max-width: 800px; max-width: 1000px;
padding: 1em; padding: 1em;
line-height: 1.4; line-height: 1.4;
text-align: left; text-align: left;
@ -57,7 +59,7 @@ figure {
} }
figcaption { figcaption {
font-size: 8pt; font-size: 15pt;
text-align: center; text-align: center;
font-family: serif; font-family: serif;
} }
@ -66,7 +68,7 @@ figcaption {
display: inline-grid; display: inline-grid;
grid-template-columns: auto auto; grid-template-columns: auto auto;
grid-template-rows: auto; grid-template-rows: auto;
font-size: 10pt; font-size: 14pt;
} }
#date { #date {
@ -79,33 +81,38 @@ figcaption {
} }
h1 { h1 {
font-size: 22pt; font-family: 'IBM Plex Mono', monospace;
font-weight: normal; font-size: 30pt;
font-weight: bold;
} }
h2 { h2 {
font-size: 16pt; font-family: 'IBM Plex Mono', monospace;
font-size: 22pt;
margin-top: 1.5em; margin-top: 1.5em;
font-weight: bold; font-weight: bold;
} }
h3 { h3 {
font-size: 14pt; font-size: 20pt;
} }
article > ul { article > ul {
padding-left: 0; padding-left: 0;
} }
ul > li { article > ul > li {
list-style: none; list-style: none;
font-size: 22pt;
padding-top: 22pt;
} }
ul > li:before { section > ul > li {
content: "—"; padding-top: 22pt;
} }
#footerdiv { #footerdiv {
margin-top: 50px; margin-top: 50px;
} }
@ -119,9 +126,13 @@ footer {
a { a {
color: #454545; color: #454545;
font-weight: 430; font-weight: 430;
text-decoration-color: #808080; border-bottom: 2px dashed #808080;
text-decoration: none;
} }
a:hover {
border-bottom-color: red;
sup > a { sup > a {
color: #454545; color: #454545;
font-weight: 430; font-weight: 430;

View File

@ -5,7 +5,7 @@ import Hakyll
import Hakyll.Core.Identifier (toFilePath) import Hakyll.Core.Identifier (toFilePath)
import Hakyll.Web.Feed import Hakyll.Web.Feed
import System.FilePath import System.FilePath
import Text.Regex (splitRegex, mkRegex) import Text.Regex (mkRegex, splitRegex)
@ -65,7 +65,7 @@ main = hakyllWith config $ do
compile $ do compile $ do
posts <- recentFirst =<< loadAll "blog/*" posts <- recentFirst =<< loadAll "blog/*"
let indexCtx = let indexCtx =
listField "posts" postCtx (return $ take 8 posts) `mappend` listField "posts" (postCtxWTags tags) (return $ take 8 posts) `mappend`
constField "title" "Home" `mappend` constField "title" "Home" `mappend`
tagsField "tags" tags `mappend` tagsField "tags" tags `mappend`
defaultContext defaultContext
@ -96,7 +96,7 @@ main = hakyllWith config $ do
compile $ do compile $ do
posts <- recentFirst =<< loadAll pattern posts <- recentFirst =<< loadAll pattern
let ctx = constField "title" title let ctx = constField "title" title
`mappend` listField "posts" postCtx (return posts) `mappend` listField "posts" (postCtxWTags tags) (return posts)
`mappend` defaultContext `mappend` defaultContext
makeItem "" makeItem ""

View File

@ -13,7 +13,7 @@
<header> <header>
<div class="header"> <div class="header">
<div id="title"><a href="/">BINARY STROLLS</a></div> <div id="title"><a href="/">BINARY STROLLS</a></div>
<div id="nav"><a href="/archive.html">Archive</a> <a href="https://dbalan.in">About</a></div> <div id="nav"><a href="/archive.html">Archive</a><a href="https://dbalan.in">About</a></div>
</div> </div>
</header> </header>
<section> <section>

View File

@ -1,7 +1,17 @@
<ul> <ul id="postlist">
$for(posts)$ $for(posts)$
<li> <li>
<a href="$url$">$title$</a> - $date$ <div>
<div>
<a href="$url$">$title$</a>
</div>
<div class="postmeta"><div id="date">$date$</div>
$if(tags)$
<div id="tags">Posted in $tags$</div>
$endif$
</div>
</div>
</li> </li>
$endfor$ $endfor$
</ul> </ul>
</div>