Skip to content

Commit

Permalink
Change font style a bit, for 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed May 11, 2020
1 parent d773fbd commit f545984
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion guide/2011404.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Zettel Markdown
---

Zettel files are written using the [Markdown](https://en.wikipedia.org/wiki/Markdown) plain-text syntax. Neuron uses [commonmark-hs](https://github.com/jgm/commonmark-hs) to parse them into the [Pandoc AST](https://pandoc.org/using-the-pandoc-api.html), as well as provides an extention on top to handle zettel links.
Zettel files are written using Markdown, per the [CommonMark](https://commonmark.org/) specification. Neuron uses [commonmark-hs](https://github.com/jgm/commonmark-hs) to parse them into the [Pandoc AST](https://pandoc.org/using-the-pandoc-api.html), as well as provides an extention on top to handle zettel links.

* <2011504>
* <2011505>
Expand Down
10 changes: 5 additions & 5 deletions guide/2011501.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Neuron can be installed on Linux and macOS using the Nix package manager.
## Prerequisites

> **NOTE**:
If you are on *macOS Catalina*, you may have to follow [these
>
> If you are on *macOS Catalina*, you may have to follow [these
instructions](https://github.com/NixOS/nix/issues/2925#issuecomment-539570232)
prior to installing Nix.
If you are on *Windows*, you should install Ubuntu on
>
> If you are on *Windows*, you should install Ubuntu on
[WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10), and may
have to apply [this
workaround](https://github.com/NixOS/nix/issues/2292#issuecomment-443933924).
Expand All @@ -22,7 +22,7 @@ Neuron can be installed on Linux and macOS using the Nix package manager.
First, install the [Nix package manager](https://nixos.org/nix/):

``` bash
bash <(curl https://nixos.org/nix/install)
curl -L https://nixos.org/nix/install | sh
```

### Enable cache
Expand Down
10 changes: 6 additions & 4 deletions src/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ renderPage config r val = html_ [lang_ "en"] $ do
$ renderRouteBody config r val

headerFont :: Text
headerFont = "Oswald"
headerFont = "DM Serif Text"

bodyFont :: Text
bodyFont = "Open Sans"
bodyFont = "DM Sans"

monoFont :: Text
monoFont = "Roboto Mono"
monoFont = "DM Mono"

mainStyle :: Config -> Css
mainStyle cfg = "div#thesite" ? do
Expand All @@ -65,8 +65,10 @@ mainStyle cfg = "div#thesite" ? do
C.paddingBottom $ em 1
"p" ? do
C.lineHeight $ pct 150
"h1, h2, h3, h4, h5, h6, .ui.header" ? do
"h1, h2, h3, h4, h5, h6, .ui.header, .headerFont" ? do
C.fontFamily [headerFont] [C.sansSerif]
"img" ? do
C.maxWidth $ pct 100 -- Prevents large images from overflowing beyond zettel borders
"code, pre, tt" ? do
fontFamily [monoFont, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New"] [monospace]
style cfg
11 changes: 7 additions & 4 deletions src/app/Neuron/Web/View.hs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ renderBrandFooter withVersion =
div_ [class_ "center aligned column"] $ do
p_ $ do
"Generated by "
a_ [href_ "https://github.com/srid/neuron"] "Neuron"
a_ [href_ "https://neuron.zettel.page"] "Neuron"
when withVersion $ do
" "
code_ $ toHtml @Text neuronVersionFull
Expand Down Expand Up @@ -358,9 +358,12 @@ style Config {..} = do
codeStyle = do
C.code ? do
sym margin auto
fontSize $ pct 90
"code, pre, tt" ? do
fontFamily ["SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New"] [monospace]
fontSize $ pct 100
-- This pretty much selects inline code elements
"p code, li code, ol code" ? do
sym padding $ em 0.2
backgroundColor "#f8f8f8"
-- This selects block code elements
pre ? do
sym padding $ em 0.5
C.overflow auto
Expand Down
1 change: 1 addition & 0 deletions src/lib/Neuron/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ neuronSpec =
-- TODO: This needs a proper renderer in reflex-dom-pandoc
CE.footnoteSpec,
CE.mathSpec,
CE.smartPunctuationSpec,
CM.defaultSyntaxSpec {CM.syntaxBlockSpecs = defaultBlockSpecsSansRawHtml}
]
where
Expand Down

0 comments on commit f545984

Please sign in to comment.