From 0fd0b322a504d31c54153fdefc7588ce0d4953b5 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Thu, 27 Feb 2025 10:49:54 -0600 Subject: Adding pages --- app/Main.hs | 20 ++++++++++++++++---- templates/default.html | 4 +++- www/contact/index.html | 26 ++++++++++++++++++++++++++ www/credits/index.md | 19 +++++++++++++++++++ www/credits/javascript.html | 17 +++++++++++++++++ 5 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 www/contact/index.html create mode 100644 www/credits/index.md create mode 100644 www/credits/javascript.html diff --git a/app/Main.hs b/app/Main.hs index f739cae..1e935e8 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -4,6 +4,7 @@ import Prolog import Hakyll import Hakyll.Alias +import Hakyll.Util import Data.Alias (AliasMap) import Data.Name (Name_) import Data.Person (Person_) @@ -12,7 +13,7 @@ import Data.License (License_) import Hakyll.Aeson (yamlCompiler) import Hakyll.TeX.BibTeX (bibtexCompiler) import WWW.Base (baseHakyll, domain) -import WWW.Templates (myContext) +import WWW.Templates (myContext, defaultTemplate) @@ -20,9 +21,9 @@ main :: IO () main = baseHakyll domain $ do match "templates/**" $ compile templateCompiler match "data/*.bib" $ compile bibtexCompiler - -- match "data/people.yaml" $ compile $ yamlCompiler @(AliasMap Name_ Person_) - -- match "data/licenses.yaml" $ compile $ yamlCompiler @(AliasMap StrictText License_) - -- match "data/journals.yaml" $ compile $ yamlCompiler @(AliasMap StrictText Journal_) + match "data/people.yaml" $ compile $ yamlCompiler @(AliasMap Name_ Person_) + match "data/licenses.yaml" $ compile $ yamlCompiler @(AliasMap StrictText License_) + match "data/journals.yaml" $ compile $ yamlCompiler @(AliasMap StrictText Journal_) let baseCtxt :: Compiler (Context String) baseCtxt = fold <$> sequence [ pure myContext @@ -30,4 +31,15 @@ main = baseHakyll domain $ do , licenseCtxt @StrictText <$> loadBody "data/licenses.yaml" , journalCtxt @StrictText <$> loadBody "data/journals.yaml" ] + match "www/research/index.html" $ do + route $ dropParentRoute 1 + compile $ do + papers <- undefined + match "www/teaching/index.md" $ do + route $ dropParentRoute 1 `composeRoutes` setExtension ".html" + compile $ myPandocCompiler >>= applyTemplate defaultTemplate baseCtxt pure () + + +myPandocCompiler :: Compiler (Item String) +myPandocCompiler = pandocCompilerWith myHakyllReaderOptions myHakyllWriterOptions diff --git a/templates/default.html b/templates/default.html index 615206d..dcb7da6 100644 --- a/templates/default.html +++ b/templates/default.html @@ -53,7 +53,9 @@
- + + +
$workEmail$ diff --git a/www/contact/index.html b/www/contact/index.html new file mode 100644 index 0000000..1945684 --- /dev/null +++ b/www/contact/index.html @@ -0,0 +1,26 @@ +--- +title: Contact +short_title: Contact +--- + +

Contact

+ +
+ + + + + + + + + +
$workEmail$
+
    +
  • 112 Parker Hall [map]
  • +
  • Department of Mathematics and Statistics
  • +
  • Auburn University
  • +
  • Auburn, AL 36849
  • +
+
+
diff --git a/www/credits/index.md b/www/credits/index.md new file mode 100644 index 0000000..6c7fb44 --- /dev/null +++ b/www/credits/index.md @@ -0,0 +1,19 @@ +--- +title: Credits +title_short: Credits +math: True +--- + +# Credits + +This website is possible thanks to some lovely projects: + + + +I'm happy to share the code used to generate this webpage with anyone who's interested — simply send me an email. diff --git a/www/credits/javascript.html b/www/credits/javascript.html new file mode 100644 index 0000000..0ce864d --- /dev/null +++ b/www/credits/javascript.html @@ -0,0 +1,17 @@ +--- +title: JavaScript +title_short: JavaScript +--- + + + + + + + + + + + + +
colors.min.jsWTFPLcolors.js
toggle.min.jsWTFPLtoggle.js
-- cgit v1.2.3