Initial pages, based on CV

This commit is contained in:
Mysaa Java
2026-03-29 17:15:34 +02:00
commit 497de9f127
24 changed files with 12579 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
function Meta(m)
if m.date == nil then
m.date = os.date("%e %B %Y")
return m
end
end
+210
View File
@@ -0,0 +1,210 @@
function jsondata(data)
local newdata = {}
newdata.title = data.title or {}
newdata.url = data.url or ""
newdata.authors = data.authors or {}
newdata.venue = data.venue
newdata.year = data.year
newdata.files = data.files or pandoc.List()
newdata.awards = data.awards or pandoc.List()
return newdata
end
function yamldata(data)
local newdata = {}
newdata.title = pandoc.utils.stringify(data["title"])
newdata.url = pandoc.write(pandoc.Pandoc{data["url"]}, 'html')
newdata.authors = data["authors"] or {}
if data.venue then
newdata.venue = pandoc.utils.stringify(data["venue"])
end
if data.year then
newdata.year = pandoc.utils.stringify(data["year"])
end
local files = data["files"] or pandoc.List()
newdata.files = files:map(function(data)
local newfile = {}
newfile.text = pandoc.utils.stringify(data.text)
newfile.type = pandoc.utils.stringify(data.type)
newfile.src = pandoc.write(pandoc.Pandoc{data.src}, 'html')
return newfile
end)
local awards = data["awards"] or pandoc.List()
if pandoc.utils.type(awards) == 'List' then
newdata.awards = awards:map(function(data)
return pandoc.utils.stringify(data)
end)
else
newdata.awards = pandoc.utils.stringify(awards)
end
return newdata
end
function paper(data)
local title = data.title
local url = data.url
local authors = data.authors
local awards = data.awards
local venue = data.venue
local year = data.year
local files = data.files
local header = {}
if url and not (url == "") then
header = { pandoc.Link(title, url) }
else
header = { title }
end
local award_info = {}
if awards then
if not (pandoc.utils.type(awards) == 'List') then
awards = pandoc.List({awards})
end
award_info = awards:map(function(awd)
local icon = "<i class=\" fa-solid fa-award\"></i>"
local html_output = string.format(
"<span>%s %s</span>",
icon, awd
)
return pandoc.RawBlock("html", html_output)
end)
end
local sub = {}
if venue and year then
sub = { pandoc.Str(string.format("%s (%s)", venue, year)) }
elseif venue then
sub = { venue }
elseif year then
sub = { year }
end
local file_info = files:map(function(data)
local s = data.text or ""
local type = data.type
local src = data.src or ""
local icon = ""
if type == "pdf" then
icon = "<i class=\"fa-solid fa-file-pdf\"></i>"
elseif type == "bib" then
icon = "<i class=\"fa-solid fa-quote-left\"></i>"
elseif type == "code" then
icon = "<i class=\"fa-solid fa-file-code\"></i>"
elseif type == "video" then
icon = "<i class=\"fa-solid fa-file-video\"></i>"
elseif type == "txt" then
icon = "<i class=\"fa-solid fa-file-lines\"></i>"
elseif type == "img" then
icon = "<i class=\"fa-solid fa-file-image\"></i>"
elseif type == "zip" then
icon = "<i class=\"fa-solid fa-file-zipper\"></i>"
elseif type == "slides" then
icon = "<i class=\"fa-solid fa-file-powerpoint\"></i>"
elseif type == "link" then
icon = "<i class=\"fa-solid fa-link\"></i>"
elseif type == "git" then
icon = "<i class=\"fa-brands fa-git-alt\"></i>"
else
icon = "<i class=\"fa-solid fa-file\"></i>"
end
local html_output = string.format(
"<a href=\"%s\">%s %s</a>",
src, icon, s
)
return pandoc.RawBlock("html", html_output)
end)
local div_content = {
pandoc.Header(3, header),
pandoc.Div(award_info, {class = "awards"}),
pandoc.Div(authors, {class = "authors"}),
pandoc.Para(sub),
pandoc.Div(file_info, {class = "files"})
}
local div = pandoc.Div(div_content, {class = "paper"})
return div
end
function CodeBlock(el)
if el.classes[1] == "paper" and el.classes[2] == "yaml" then
local content = string.format("---\n%s\n---", el.text)
local doc = pandoc.read(content)
if not doc then
error("Failed to decode yaml:\n" .. content)
end
return paper(yamldata(doc.meta))
end
if el.classes[1] == "paper" and el.classes[2] == "json" then
local content = string.format("{ %s }", el.text)
local data = pandoc.json.decode(content, false)
if not data then
error("Failed to decode JSON:\n" .. content)
end
return paper(jsondata(data))
end
if el.classes[1] == "papers" and el.classes[2] == "yaml" then
local content = string.format("---\n%s\n---", el.text)
local doc = pandoc.read(content)
if not doc then
error("Failed to decode yaml:\n" .. content)
end
local content = doc.meta.papers:map(function(d)
return paper(yamldata(d))
end)
return pandoc.Blocks(content)
end
if el.classes[1] == "papers" and el.classes[2] == "json" then
local content = string.format("[ %s ]", el.text)
local data = pandoc.json.decode(content, false)
if not data then
error("Failed to decode JSON:\n" .. content)
end
local content = data:map(function(d)
return paper(jsondata(d))
end)
return pandoc.Blocks(content)
end
end
+185
View File
@@ -0,0 +1,185 @@
<!--
This webpage is based on the template provided by https://basicpage.github.io/
under MIT license:
https://github.com/basicpage/basicpage.github.io?tab=MIT-1-ov-file
Authors:
- Yannick Forster
- Théo Winterhalter
-->
<!DOCTYPE html>
<html prefix="og: https://ogp.me/ns#" lang="en">
<head>
<meta name="viewport" content="width=device-width">
<meta name="generator" content="pandoc">
<meta property="og:type" content="website">
$for(author-meta)$
<meta name="author" content="$author-meta$">
$endfor$
$if(date-meta)$
<meta name="date" content="$date-meta$">
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$">
$endif$
$if(description-meta)$
<meta name="description" content="$description-meta$">
<meta property="og:description" content="$description-meta$">
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
$if(title-prefix)$<meta property="og:site_name" content="$title-prefix$">$endif$
<meta property="og:title" content="$pagetitle$">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css">
<link rel="stylesheet" href="academicons/css/academicons.min.css">
$for(css)$
<link rel="stylesheet" href="$css$">
$endfor$
$if(disable-dark-mode)$$else$
<link rel="stylesheet" href="dark.css">
$endif$
$if(og-picture)$
<meta property="og:image" content="$og-picture$">
$endif$
$if(og-url)$
<meta property="og:url" content="$og-url$">
$endif$
$for(header-includes)$
$header-includes$
$endfor$
$if(math)$
$if(mathjax)$
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
$endif$
$math$
$endif$
<!-- Favicon -->
<link rel="icon" type="image/png" href="img/favicon-96x96.png" sizes="96x96" />
<link rel="shortcut icon" href="img/favicon-96x96.png" />
<link rel="apple-touch-icon" sizes="180x180" href="img/favicon-96x96.png" />
<link rel="manifest" href="img/site.webmanifest" />
</head>
<body>
$if(side-by-side)$
<header class="split">
$else$
<header>
$endif$
$if(picture)$
$if(picture-round)$
<img class="round-image" src="$picture$" alt="My picture">
$else$
<img src="$picture$" alt="My picture">
$endif$
$endif$
<aside>
$if(author)$
<h1>$author$</h1>
$endif$
$if(shortbio)$
<h2>$shortbio$</h2>
$endif$
$if(pronouns)$
<p>$pronouns$</p>
$endif$
$if(location)$
<p><i class="fa-solid fa-location-dot fa-fw"></i> $location$</p>
$endif$
$if(email)$
$for(email)$
<p>
$if(clickable-email)$<a href="mailto:$email$">$endif$
<i class="fa-regular fa-envelope fa-fw"></i> <code>$email$</code>
$if(clickable-email)$</a>$endif$
</p>
$endfor$
$endif$
<div class="icons">
$if(orcid)$
<a href="https://orcid.org/$orcid$" title="ORCID">
<i class="ai ai-orcid ai-fw icon-pad-right"></i>
</a>
$endif$
$if(dblp)$
<a href="$dblp$" title="DBLP">
<i class="ai ai-dblp ai-fw icon-pad-right"></i>
</a>
$endif$
$if(hal)$
<a href="$hal$" title="HAL">
<i class="ai ai-hal ai-fw icon-pad-right"></i>
</a>
$endif$
$if(scholar)$
<a href="$scholar$" title="Google Scholar">
<i class="ai ai-google-scholar ai-fw icon-pad-right"></i>
</a>
$endif$
$if(github)$
<a href="https://github.com/$github$" title="Github: $github$">
<i class="fa-brands fa-github fa-fw"></i>
</a>
$endif$
$if(gitlab)$
<a href="https://gitlab.com/$gitlab$" title="Gitlab">
<i class="fa-brands fa-gitlab fa-fw"></i>
</a>
$endif$
$if(bitbucket)$
<a href="$bitbucket$" title="BitBucket">
<i class="fa-brands fa-bitbucket fa-fw"></i>
</a>
$endif$
$if(mastodon)$
<a href="$mastodon$" title="Mastodon">
<i class="fa-brands fa-mastodon fa-fw"></i>
</a>
$endif$
$if(bluesky)$
<a href="$bluesky$" title="BlueSky">
<i class="fa-brands fa-bluesky fa-fw"></i>
</a>
$endif$
$if(linkedin)$
<a href="$linkedin$" title="LinkedIn">
<i class="fa-brands fa-linkedin fa-fw"></i>
</a>
$endif$
$if(discord)$
<a href="https://discord.com/channels/@me" title="Discord: @$discord$">
<i class="fa-brands fa-discord fa-fw"></i>
</a>
$endif$
$if(git)$
<a href="$git$" title="Git">
<i class="fa-brands fa-git-alt fa-fw"></i>
</a>
$endif$
</div>
</aside>
</header>
$if(toc)$
<nav>
$table-of-contents$
</nav>
$endif$
<main>
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
</main>
$if(footer)$
<footer>
$footer$
<span class="lastupdate">Last updated: $date$</span>
</footer>
$endif$
</body>
</html>