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 9c627e5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
4 changes: 1 addition & 3 deletions guide/2011501.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ 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
instructions](https://github.com/NixOS/nix/issues/2925#issuecomment-539570232)
prior to installing Nix.

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
Expand All @@ -22,7 +20,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

0 comments on commit 9c627e5

Please sign in to comment.