diff options
-rw-r--r-- | Run/Que/Website.hs | 7 | ||||
-rw-r--r-- | Run/Que/style.css | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/Run/Que/Website.hs b/Run/Que/Website.hs index 23e3740..9d96628 100644 --- a/Run/Que/Website.hs +++ b/Run/Que/Website.hs @@ -45,6 +45,7 @@ main = do , style = src </> "style.css" , apidocs = src </> "apidocs.md" , tutorial = src </> "tutorial.md" + , fontLink = src </> "font.html" } getKey :: Namespace -> IO (Maybe Key) @@ -70,6 +71,7 @@ data Sources = Sources , style :: FilePath , tutorial :: FilePath , apidocs :: FilePath + , fontLink :: FilePath } type Namespace = Text @@ -95,8 +97,9 @@ run key ns Sources {..} = Async.runConcurrently actions >> return () BS.pack <$> Process.readProcess "pandoc" - [ "--self-contained" - , "--css" + [ "--include-in-header" + , fontLink + , "--include-in-header" , style , "-i" , md diff --git a/Run/Que/style.css b/Run/Que/style.css index 96fae6d..f8d1ca4 100644 --- a/Run/Que/style.css +++ b/Run/Que/style.css @@ -1,3 +1,5 @@ +<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet"> +<style> :root { /* base (http://chriskempson.com/projects/base16/) */ --base00: #181818; @@ -20,9 +22,6 @@ --base0F: #a16946; } -/* TODO: get this from nixpkgs when I figure out how I want to package static assets */ -@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Source+Sans+Pro:ital,wght@0,400;0,700;1,400;1,700&family=Source+Serif+Pro:wght@400;700&display=swap'); - /* dark theme */ @media ( prefers-color-scheme: dark ), ( prefers-color-scheme: no-preference ) @@ -134,3 +133,4 @@ pre, code ; max-width: 400px ; margin: auto } +</style> |