From 3f2f91034990cdb7832f9a7e54946f95144bb093 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 27 Nov 2023 23:49:06 +0100 Subject: [PATCH] rework website --- chaoszone.cabal | 1 + site/css/default.css | 37 ++++++++++++++++++++++++++----------- site/css/font.css | 7 +++++++ site/index.md | 12 ++++++------ src/Main.hs | 42 +++++++++++++++++++++--------------------- templates/default.html | 18 ++++++++---------- 6 files changed, 69 insertions(+), 48 deletions(-) diff --git a/chaoszone.cabal b/chaoszone.cabal index e71b70d..dccf6c6 100644 --- a/chaoszone.cabal +++ b/chaoszone.cabal @@ -26,3 +26,4 @@ executable chaoszone , aeson hs-source-dirs: src default-language: Haskell2010 + ghc-options: -Wall -threaded diff --git a/site/css/default.css b/site/css/default.css index 0653cfe..fe79945 100644 --- a/site/css/default.css +++ b/site/css/default.css @@ -1,14 +1,20 @@ body { color: black; font-family: 'CMUTypewriter'; - font-size: 23px; + font-size: 23pt; font-weight: normal; font-style: normal; padding: 0 2rem 0; margin: 0; - display: flex; + display: grid; min-height: 100vh; - flex-direction: column; + grid-template-columns: [leftcol] 23rem [maincol] auto [rightcol] 1fr; + grid-template-rows: [headerrow] 6rem [mainrow] auto [footerrow] 2rem; + grid-template-areas: + "logo header header" + "logo main main" + "logo footer footer"; + background-color: #a21d10; } body::before { @@ -19,21 +25,24 @@ body::before { bottom: 0; left: 0; right: 0; - background-color: #c30000; - background-image: linear-gradient(to bottom, rgba(195,0,0,0.9) 0%,rgba(195,0,0,0.9) 100%), url(/images/Chaoszone.black.svg); + background-image: url(/images/Chaoszone.black.svg); background-size: contain; background-attachment:fixed; background-repeat:no-repeat; background-position: center; + opacity: 0.05; } header { border-bottom: 2px solid white; margin-bottom: 30px; padding: 12px 0px 12px 0px; + grid-area: header; +} + +header, header a { font-family: 'CMUTypewriter'; - font-size: 30px; - margin-left: 25rem; + font-size: 23pt; } h1, h2, h3, h4, h5 { @@ -50,6 +59,10 @@ a:hover { text-decoration: underline } +#logo { + grid-area: logo; +} + #logo, #logo img { max-width: 23rem; } @@ -83,7 +96,6 @@ nav li { nav li a { color: white; - font-size: 18px; font-weight: bold; margin-left: 12px; text-decoration: none; @@ -95,7 +107,7 @@ nav li a:first-child { } article { - margin-left: 25rem; + grid-area: main; } article img { @@ -103,19 +115,22 @@ article img { } footer { + grid-area: footer; border-top: solid 2px white; font-size: 12px; padding: 12px 0px 12px 0px; text-align: right; } +/* h1 { - font-size: 24px; + font-size: 24pt; } h2 { - font-size: 20px; + font-size: 20pt; } +*/ div.info { font-size: 14px; diff --git a/site/css/font.css b/site/css/font.css index f56c47a..1d31b38 100644 --- a/site/css/font.css +++ b/site/css/font.css @@ -25,3 +25,10 @@ font-weight: normal; font-style: normal; } + +@font-face { + font-family: 'LePatinHelvete'; + src: url('/fonts/Le-patin-helvete.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} diff --git a/site/index.md b/site/index.md index 033d23b..966cce3 100644 --- a/site/index.md +++ b/site/index.md @@ -1,16 +1,16 @@ --- -title: Home +title: Under Construction --- -## Welcome, Comrades! +## /!\\ Codeworks ahead /!\\ +Hello there! -Welcome to this blog! +As the 37th Chaos Communication Congress draws nearer a greater overhaul of this page is in order. -We are ChaosZone, mostly hackers from eastern countries, but all creatures are -welcome. Meet us at our Assembly at 35C3. +Come back soon for more Information on ChaosZone and its member hackerspaces. -The latest posts here are: +Posts from previous years: $partial("templates/post-list.html")$ diff --git a/src/Main.hs b/src/Main.hs index 6cf278d..46873b7 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -50,29 +50,29 @@ main = do defaultCtx >>= relativizeUrls - create ["index.html"] $ do - route idRoute - compile $ do - post <- fmap head . recentFirst =<< (loadAll "site/posts/*" - :: Compiler [Item String]) - let indexCtx = - constField "date" "%B %e, %Y" <> - defaultCtx - makeItem (itemBody post) - >>= relativizeUrls - - -- match "site/index.md" $ do - -- route $ myRoute `composeRoutes` setExtension "html" + -- create ["index.html"] $ do + -- route idRoute -- compile $ do - -- posts <- fmap (take 5) . recentFirst =<< loadAll "site/posts/*" - -- let indexCtx = listField "posts" postCtx (return posts) <> - -- constField "title" "Home" <> + -- post <- fmap head . recentFirst =<< (loadAll "site/posts/*" + -- :: Compiler [Item String]) + -- let indexCtx = + -- constField "date" "%B %e, %Y" <> -- defaultCtx - -- getResourceBody - -- >>= applyAsTemplate indexCtx - -- >>= renderPandoc - -- >>= loadAndApplyTemplate "templates/default.html" defaultCtx - -- >>= relativizeUrls + -- makeItem (itemBody post) + -- >>= relativizeUrls + + match "site/index.md" $ do + route $ myRoute `composeRoutes` setExtension "html" + compile $ do + posts <- fmap (take 5) . recentFirst =<< loadAll "site/posts/*" + let indexCtx = listField "posts" postCtx (return posts) <> + constField "title" "Home" <> + defaultCtx + getResourceBody + >>= applyAsTemplate indexCtx + >>= renderPandoc + >>= loadAndApplyTemplate "templates/default.html" defaultCtx + >>= relativizeUrls create ["archive.html"] $ do route idRoute diff --git a/templates/default.html b/templates/default.html index a1e0c34..fb14592 100644 --- a/templates/default.html +++ b/templates/default.html @@ -12,12 +12,11 @@ -
- + -
-

$title$

+
+

$title$

$body$ -
-
+