summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2025-02-27 10:49:54 -0600
committerChris Wells <chris@mathematicaster.org>2025-02-27 10:49:54 -0600
commit0fd0b322a504d31c54153fdefc7588ce0d4953b5 (patch)
tree312b0dc7ca38d78d969bae0e482caafa05a813ee
parented300e0b45bb46adec77b85474544f8908445a14 (diff)
downloadmain-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.gz
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.bz2
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.lz
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.xz
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.tar.zst
main-0fd0b322a504d31c54153fdefc7588ce0d4953b5.zip
Adding pages
-rw-r--r--app/Main.hs20
-rw-r--r--templates/default.html4
-rw-r--r--www/contact/index.html26
-rw-r--r--www/credits/index.md19
-rw-r--r--www/credits/javascript.html17
5 files changed, 81 insertions, 5 deletions
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 @@
<div class="pull-left">
<button class="toggle-color-button" onclick='toggleColorMode()'><i class="fas fa-adjust"></i></button>
- <a href="/credits.html"><i class="fas fa-info-circle"></i></a>
+ <a href="/credits/"><i class="fas fa-info-circle"></i></a>
+
+ <a href="/credits/javascript.html" data-jslicense="1"><i class="fa-brands fa-js"></i></a>
</div>
<div class="pull-right">
<a href="mailto:$workEmail$"><i class="fa fa-envelope"></i> $workEmail$</a>
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
+---
+
+<h1>Contact</h1>
+
+<div class="bare">
+ <table>
+ <tr>
+ <td><i class="fa fa-envelop"></i></td>
+ <td><a href="mailto:$workEmail$">$workEmail$</a></td>
+ </tr>
+ <tr>
+ <td><i class="fa fa-building"></i></td>
+ <td>
+ <ul>
+ <li>112 Parker Hall [<a href="https://www.openstreetmap.org/way/127012139" target="_blank">map</a>]</li>
+ <li>Department of Mathematics and Statistics</li>
+ <li>Auburn University</li>
+ <li>Auburn, AL 36849</li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+</div>
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:
+
+<ul>
+ <li>Static site generator: <a href="https://hackage.haskell.org/package/hakyll">hakyll</a></li>
+ <li>$$\LaTeX$$ typesetting: <a href="https://katex.org/">$$\KaTeX$$</a></li>
+ <li>Color scheme: <a href="https://github.com/morhetz/gruvbox">gruvbox</a></li>
+ <li>Fonts: <a href="https://github.com/mozilla/Fira">FiraSans</a> and <a href="https://github.com/tonsky/FiraCode">FiraCode</a></li>
+ <li>Icons: <a href="https://fontawesome.com/">Font Awesome</a></li>
+</ul>
+
+I'm happy to share the code used to generate this webpage with anyone who's interested &mdash; 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
+---
+
+<table id="jslicense-labels1">
+ <tr>
+ <td><a href="/js/colors.min.js">colors.min.js</a></td>
+ <td><a href="http://www.wtfpl.net/txt/copying/">WTFPL</a></td>
+ <td><a href="/js/colors.js">colors.js</a></td>
+ </tr>
+ <tr>
+ <td><a href="/js/toggle.min.js">toggle.min.js</a></td>
+ <td><a href="http://www.wtfpl.net/txt/copying/">WTFPL</a></td>
+ <td><a href="/js/toggle.js">toggle.js</a></td>
+ </tr>
+</table>