From e9dd9fada06fa7ea743238e23d3ffdfcb5f1a56c Mon Sep 17 00:00:00 2001 From: JJ Date: Thu, 25 Jul 2024 12:22:07 -0700 Subject: add back syntax highlighting --- _templates/header.html | 6 +-- _templates/post.html | 1 - css/code.css | 101 +++++++++++++++++++++++++++++++++++++++++++++++++ css/style.css | 3 +- index.html | 6 +-- site.hs | 9 ++--- 6 files changed, 113 insertions(+), 13 deletions(-) create mode 100644 css/code.css diff --git a/_templates/header.html b/_templates/header.html index bfd4deb..8ddb638 100644 --- a/_templates/header.html +++ b/_templates/header.html @@ -4,10 +4,10 @@ diff --git a/_templates/post.html b/_templates/post.html index 44537b9..5d18844 100644 --- a/_templates/post.html +++ b/_templates/post.html @@ -5,7 +5,6 @@ - $title$ diff --git a/css/code.css b/css/code.css new file mode 100644 index 0000000..b32a3bf --- /dev/null +++ b/css/code.css @@ -0,0 +1,101 @@ +pre > code.sourceCode { + white-space: pre; + position: relative; + font-size: 0.80em; +} +pre > code.sourceCode > span { + line-height: 1.25; +} +pre > code.sourceCode > span:empty { + height: 1.2em; +} +.sourceCode { + overflow: scroll; +} +code.sourceCode > span { + color: inherit; + text-decoration: inherit; +} +div.sourceCode { + margin: 1em 0; +} +pre.sourceCode { + margin: 0; + padding: 10px; + border-radius: 10px; + color: #abb2bf; + background: #282c34; +} +pre.numberSource { + margin-left: 3em; + border-left: 1px solid #aaaaaa; + padding-left: 4px; +} +pre.numberSource code { + counter-reset: source-line 0; +} +pre.numberSource code > span { + position: relative; + left: -4em; + counter-increment: source-line; +} +pre.numberSource code > span > a:first-child::before { + content: counter(source-line); + position: relative; + left: -1em; + text-align: right; + vertical-align: baseline; + border: none; + display: inline-block; + user-select: none; + padding: 0 4px; + width: 4em; + color: #aaaaaa; +} +@media screen { + div.sourceCode { + overflow: auto; + } + pre > code.sourceCode > span > a:first-child::before { + text-decoration: underline; + } +} +@media print { + pre > code.sourceCode { + white-space: pre-wrap; + } + pre > code.sourceCode > span { + display: inline-block; + text-indent: -5em; + padding-left: 5em; + } +} +code span.kw { color: #C678DD; font-weight: bold; } /* Keyword */ +code span.cf { color: #C678DD; font-weight: bold; } /* ControlFlow */ +code span.op { color: #C678DD; } /* Operator */ +code span.ot { color: #C678DD; } /* Other */ +code span.va { color: #E06C75; } /* Variable */ +code span.cn { color: #E06C75; } /* Constant */ +code span.bu { color: #E06C75; } /* BuiltIn */ +code span.im { color: #E06C75; font-weight: bold; } /* Import */ +code span.fl { color: #de935f; } /* Float */ +code span.dv { color: #de935f; } /* DecVal */ +code span.bn { color: #de935f; } /* BaseN */ +code span.dt { color: #56B6C2; } /* DataType */ +code span.at { color: #56B6C2; } /* Attribute */ +code span.an { color: #56B6C2; font-weight: bold; font-style: italic; } /* Annotation */ +code span.fu { color: #61AFEF; } /* Function */ +code span.pp { color: #61AFEF; } /* Preprocessor */ +code span.ch { color: #40a070; } /* Char */ +code span.st { color: #40a070; } /* String */ +code span.vs { color: #40a070; } /* VerbatimString */ +code span.sc { color: #40a070; } /* SpecialChar */ +code span.ss { color: #40a070; } /* SpecialString */ +code span.co { color: #5c6370; font-style: italic; } /* Comment */ +code span.do { color: #5c6370; font-weight: bold; font-style: italic; } /* Documentation */ +code span.cv { color: #5c6370; font-weight: bold; font-style: italic; } /* CommentVar */ +code span.in { color: #5c6370; font-weight: bold; font-style: italic; } /* Information */ +code span.al { color: #ff0000; font-weight: bold; } /* Alert */ +code span.er { color: #ff0000; font-weight: bold; } /* Error */ +code span.wa { color: #ff8000; font-weight: bold; font-style: italic; } /* Warning */ +code span.ex { } /* Extension */ diff --git a/css/style.css b/css/style.css index 3920f27..1e9d011 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,6 @@ @import url("normalize.css"); @import url("fonts.css"); +@import url("code.css"); body { font-family: Alegreya, serif; @@ -23,7 +24,7 @@ a:hover { code { font-family: NotoSansMono, monospace; - font-size: 18px; + font-size: 0.8em; } header { diff --git a/index.html b/index.html index 6cb2f5b..7aaff38 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ title: my special corner of the web
-

Research

+

research

I am particularly interested in language and its relation to meaning.
This manifests itself in different fashions in different fields. @@ -25,8 +25,8 @@ title: my special corner of the web In computer science: I care about language interoperability: the preservation of meaning across languages with differing types systems, operational semantics, and conventions.

  • - In mathematics: I have a particular interest in foundations and category theory. + In mathematics: I have a particular interest in foundations and category theory: and how they inform what we mean by proof. This in turn has manifested an interest in theorem provers and proof mechanization.
  • -

    I am actively looking for a research position on this topic, starting Sep. 2025. If you know a professor who is hiring students and working on any of the above, please send me an email!

    +

    I am actively looking for a research position on this topic, to start Sep. 2025. If you know a professor who is hiring students and working on any of the above, please send me an email!

    diff --git a/site.hs b/site.hs index 47a385b..a87a46e 100644 --- a/site.hs +++ b/site.hs @@ -12,8 +12,7 @@ pandocCompiler = removedExtensions = extensionsFromList [Ext_blank_before_header, Ext_blank_before_blockquote] writerOptions = defaultHakyllWriterOptions { writerExtensions = disableExtensions (defaultExtensions <> pandocExtensions <> addedExtensions) removedExtensions, - writerHTMLMathMethod = MathML, - writerHighlightStyle = Just zenburn + writerHTMLMathMethod = MathML } in pandocCompilerWith defaultHakyllReaderOptions writerOptions @@ -45,16 +44,16 @@ main = hakyll $ do >>= relativizeUrls -- Match all other renderable files and apply their template, if it exists - match ("**.md" .||. "**.markdown") $ do + match ("**.md" .||. "**.rst" .||. "**.org" .||. "**.adoc") $ do route $ setExtension "html" compile $ pandocCompiler >>= loadLayoutTemplate defaultContext >>= relativizeUrls -- Additionally copy non-HTML files verbatium - match ("**.md" .||. "**.markdown") $ version "raw" $ do + match ("**.md" .||. "**.rst" .||. "**.org" .||. "**.adoc") $ version "raw" $ do route idRoute - compile pandocCompiler + compile getResourceBody -- Copy all additional files verbatium match "**" $ do -- cgit v1.2.3-70-g09d2