Commit a3c6b9d0 authored by Mario Lang's avatar Mario Lang

renaming

parent c52381a3
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts, QuasiQuotes, OverloadedStrings, TemplateHaskell, TypeFamilies, TypeOperators #-}
module Eurorack.Synthesizers (
module Eurorack.Modules (
Module(..), HorizontalPitch(..), RackUnit(..), Currents(..), synopsis, width, currents, fullName, Row, Case(..), System, identifier, frontPanel, panelHtml, systemHtml, hasSwitchPositionLabels, describeSwitches, frontPanelHtml, name
) where
import Control.Applicative ((<|>))
......@@ -1350,6 +1350,9 @@ describeSwitches = dl_ . mconcat . toList . fmap desc . frontPanel where
dd_ $ toHtml $ intercalate ", " x
desc _ = mempty
moduleLink :: Module -> Html () -> Html ()
moduleLink mod txt = a_ [href_ ("/Eurorack/Modules/" <> identifier mod <> ".html")] txt
systemHtml :: System -> Html ()
systemHtml sys = do
dl_ $ do
......@@ -1363,7 +1366,7 @@ systemHtml sys = do
p_ $ toHtml $ showCaseSize c
table_ [class_ "case"] $ traverse_ row (rows c)
h2_ "Known but unused modules"
ul_ $ for_ (unused $ modules sys) $ li_ . toHtml . fullName
ul_ $ for_ (unused $ modules sys) $ \mod -> li_ (moduleLink mod (fullName mod))
where
row :: Row -> Html ()
row = tr_ . traverse_ cell
......
......@@ -26,13 +26,10 @@ dependencies:
- units-defs >= 2.0 && <= 2.1
- yaml
library:
source-dirs: src
executables:
site:
main: site.hs
other-modules: Eurorack.Modules
dependencies:
- bytestring
- hakyll
- eurorack-metadata
......@@ -10,13 +10,13 @@ import Data.Text (unpack)
import Data.Units.SI (Ampere(..), Meter(..))
import Data.Units.SI.Prefixes (centi, milli)
import Data.Yaml
import Eurorack.Synthesizers
import Eurorack.Modules
import Hakyll
import Lucid hiding (for_)
main :: IO ()
main = hakyllWith config $ do
let pages = ["about.markdown", "contact.markdown", "eurorack/links.markdown"]
let pages = ["about.markdown", "contact.markdown", "Eurorack/links.markdown"]
match "images/*" $ do
route idRoute
compile copyFileCompiler
......@@ -31,10 +31,10 @@ main = hakyllWith config $ do
>>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
tags <- buildTags ("posts/**" .||. "eurorack/jams/*") (fromCapture "tags/*.html")
tags <- buildTags ("posts/**" .||. "Eurorack/jams/*") (fromCapture "tags/*.html")
categories <- buildCategories "posts/**" (fromCapture "categories/*.html")
match "eurorack/jams/*" $ do
match "Eurorack/jams/*" $ do
route $ setExtension "html"
compile $ pandocCompiler >>=
saveSnapshot "content" >>=
......@@ -53,7 +53,7 @@ main = hakyllWith config $ do
match "index.html" $ do
route idRoute
compile $ do
posts <- recentFirst =<< loadAll ("posts/**" .||. "eurorack/jams/*")
posts <- recentFirst =<< loadAll ("posts/**" .||. "Eurorack/jams/*")
let indexCtx =
listField "posts" postCtx (return posts) <>
constField "title" "Home" <>
......@@ -66,7 +66,7 @@ main = hakyllWith config $ do
match "templates/*" $ compile templateBodyCompiler
match "eurorack/*.yaml" $ do
match "Eurorack/*.yaml" $ do
route $ setExtension "html"
compile $ rackCompiler
>>= loadAndApplyTemplate "templates/rack.html" postCtx
......@@ -74,7 +74,7 @@ main = hakyllWith config $ do
>>= relativizeUrls
for_ [minBound .. maxBound] $ \mod ->
create ([fromFilePath $ unpack $ "eurorack/modules/" <> identifier mod <> ".markdown"]) $ do
create ([fromFilePath $ unpack $ "Eurorack/Modules/" <> identifier mod <> ".markdown"]) $ do
route $ setExtension "html"
let ctx = moduleCtx mod
compile $ pandocCompiler >>=
......@@ -85,7 +85,7 @@ main = hakyllWith config $ do
match "jams.html" $ do
route idRoute
compile $ do
jams <- recentFirst =<< loadAll "eurorack/jams/*"
jams <- recentFirst =<< loadAll "Eurorack/jams/*"
let indexCtx =
listField "jams" postCtx (return jams) <>
defaultContext
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment