Added a new post, added syntax highlighting CSS for code blocks
This commit is contained in:
@@ -227,7 +227,41 @@ setFontSize x = do
|
||||
-}
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
-- Syntax Highlighting via highlighting-kate
|
||||
scKeyword, scDataType, scDecimal, scBaseN, scFloat, scChar, scString :: Selector
|
||||
scComment, scOther, scAlert, scFunction, scRegion, scError :: Selector
|
||||
|
||||
scKeyword = ".kw"
|
||||
scDataType = ".dt"
|
||||
scDecimal = ".dv"
|
||||
scBaseN = ".bn"
|
||||
scFloat = ".fl"
|
||||
scChar = ".ch"
|
||||
scString = ".st"
|
||||
scComment = ".co"
|
||||
scOther = ".ot"
|
||||
scAlert = ".al"
|
||||
scFunction = ".fu"
|
||||
scRegion = ".re"
|
||||
scError = ".er"
|
||||
|
||||
syntaxHighlight = pre # ".sourceCode" ? do
|
||||
backgroundColor "#F9F9F9"
|
||||
borderLeft solid (px 3) accent2
|
||||
scKeyword <> scDataType ? color "#268BD2"
|
||||
scDecimal <> scBaseN <> scFloat ? color "#D33682"
|
||||
scChar ? color "#DC322F"
|
||||
scString ? color "#2AA198"
|
||||
scComment ? color "#93A1A1"
|
||||
scOther ? color "#A57800"
|
||||
scFunction ? color "#268BD2"
|
||||
scError ? do color "#D30102"
|
||||
fontWeight bold
|
||||
scAlert ? do color "#CB4B16"
|
||||
fontWeight bold
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
def =
|
||||
Layout { totalColumns = 12
|
||||
, columnWidth = Em 3
|
||||
@@ -247,7 +281,8 @@ headingColor = primary
|
||||
|
||||
main = putCss $ do
|
||||
typography
|
||||
|
||||
syntaxHighlight
|
||||
|
||||
"#container" ? do
|
||||
container
|
||||
|
||||
@@ -308,10 +343,8 @@ typography = do
|
||||
"#footer" ** p ? do
|
||||
color accent2
|
||||
|
||||
selectors [ p, ".info", "#logo" ] ? do
|
||||
selectors [ p, ".info", "#logo", pre ] ? do
|
||||
setFontSize baseFontPx
|
||||
|
||||
selectors [ p, ".info", "#logo" ] ? do
|
||||
marginBottom $ px baselinePx
|
||||
|
||||
selectors [ h1, h2, h3] ? do
|
||||
|
Reference in New Issue
Block a user