Compare commits

..

No commits in common. "747518600c8eeb63a4d8a0f0a62c88dc2f6bdaf5" and "c7e378122d41ace44704cb07362f7399e5f3c495" have entirely different histories.

6 changed files with 2 additions and 29 deletions

View File

@ -7,13 +7,11 @@
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeOperators #-}
module Main (main) where module Main (main) where
import Data.Char (chr) import Data.Char (chr)
import Data.FileEmbed (embedFile)
import Data.Foldable (for_) import Data.Foldable (for_)
import Data.List (intercalate) import Data.List (intercalate)
import Data.Maybe (fromMaybe, maybeToList) import Data.Maybe (fromMaybe, maybeToList)
@ -108,7 +106,7 @@ instance MimeRender HTML BytesModel where
H.head $ do H.head $ do
H.meta ! A.charset "utf-8" H.meta ! A.charset "utf-8"
H.title "utoy" H.title "utoy"
H.style $ H.toHtml $ Encoding.decodeUtf8 $(embedFile "utoy.css") H.style "html { font-size: 32px; font-family: 'Noto Sans', sans-serif; } td { padding: 0.5em 1em; } pre { margin: 0; font-size: 0.5em; } body { display: flex; justify-content: center; }"
H.body $ do H.body $ do
H.table $ for_ model.codepoints $ \(bytes, eiC) -> do H.table $ for_ model.codepoints $ \(bytes, eiC) -> do
H.tr $ do H.tr $ do

View File

@ -2,7 +2,6 @@ haskellPackages: with haskellPackages; [
attoparsec attoparsec
blaze-html blaze-html
bytestring bytestring
file-embed
http-media http-media
servant-server servant-server
text text

View File

@ -10,7 +10,6 @@ copyright: "2023 Paul Brinkmeier"
extra-source-files: extra-source-files:
- README.md - README.md
- utoy.css
dependencies: dependencies:
- base >= 4.7 && < 5 - base >= 4.7 && < 5
@ -43,7 +42,6 @@ executables:
- utoy - utoy
- blaze-html - blaze-html
- bytestring - bytestring
- file-embed
- http-media - http-media
- servant-server - servant-server
- text - text

View File

@ -1,4 +1,5 @@
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module UToy.Table (Cell, cl, cr, render) where module UToy.Table (Cell, cl, cr, render) where

View File

@ -14,7 +14,6 @@ license-file: LICENSE
build-type: Simple build-type: Simple
extra-source-files: extra-source-files:
README.md README.md
utoy.css
source-repository head source-repository head
type: git type: git
@ -46,7 +45,6 @@ executable utoy-exe
, base >=4.7 && <5 , base >=4.7 && <5
, blaze-html , blaze-html
, bytestring , bytestring
, file-embed
, http-media , http-media
, servant-server , servant-server
, text , text

View File

@ -1,21 +0,0 @@
html {
font-size: 24px;
font-family: 'Noto Sans', sans-serif;
}
body {
display: flex;
justify-content: center;
}
td {
padding: 0.5em 1em;
}
pre, code {
font-family: 'Noto Sans Mono', monospace;
}
pre {
margin: 0; font-size: 0.5em;
}