From 08591aff5a9b44cdf22f6714646346928f31d84d Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 30 Jan 2026 10:06:47 +0100 Subject: Split off linguistics and Clean pages --- resources/pug/include/layout-main.pug | 57 +++++++++++++++++++++++++ resources/pug/include/mixins.pug | 78 +++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 resources/pug/include/layout-main.pug (limited to 'resources/pug/include') diff --git a/resources/pug/include/layout-main.pug b/resources/pug/include/layout-main.pug new file mode 100644 index 0000000..46f6d65 --- /dev/null +++ b/resources/pug/include/layout-main.pug @@ -0,0 +1,57 @@ +extends layout.pug + +block extra_head + meta(name='description', content='Compiler engineer and theoretical linguist. Software projects and academic publications.') + +block titleContainer + +block content + header#introduction + div + img#profile(alt="Camil Staps", src="/assets/img/profile.jpg") + div#basicinfo + .container + h1 Camil Staps + p.text-muted + span [kaˈmil stɑps]  + span.opt-break he/his + br + span.tt.obfuscate.wrap-anywhere + | info@c + span dummy + | amilst + span dummy + | aps.nl + p(style="margin-bottom:1em;") + a(href="https://leidenuni.academia.edu/CamilStaps") + i.ai.ai-lg.ai-academia(title="Academia.edu") + |   + a(href="https://orcid.org/0000-0003-1164-6838") + i.ai.ai-lg.ai-orcid(title="ORCiD") + |   + a(href="https://gitlab.com/camilstaps") + i.fab.fa-lg.fa-gitlab(title="GitLab") + |   + a(href="https://github.com/camilstaps") + i.fab.fa-lg.fa-github(title="GitHub") + |   + a(href="https://nl.linkedin.com/in/camilstaps") + i.fab.fa-lg.fa-linkedin(title="LinkedIn") + + ul.nav.nav-tabs + block set_page + - + function item_is_active (item) { + return item.link == page; + } + items = [ + {name: 'About', link: '/'}, + {name: 'Linguistics', link: 'linguistics.html'}, + {name: 'Clean', link: 'clean.html'}, + ]; + + each item in items + li.nav-item(role='presentation') + a.nav-link(href=item.link, class=item_is_active(item) ? 'active' : '')= item.name + + block page diff --git a/resources/pug/include/mixins.pug b/resources/pug/include/mixins.pug index 6d0c6db..5c595f1 100644 --- a/resources/pug/include/mixins.pug +++ b/resources/pug/include/mixins.pug @@ -1,3 +1,81 @@ mixin githubIconLink(repo) a(href='https://github.com/' + repo, target='_blank', title='Source on GitHub') i.fab.fa-2x.fa-github(title='GitHub') + +mixin pub(year, title) + if attributes.lingbuzz + - attributes.url = 'https://lingbuzz.net/lingbuzz/' + attributes.lingbuzz + - attributes.oa = true + td.icon + if attributes.type + if attributes.type == 'phd-thesis' + i.fa.fa-graduation-cap(title="PhD thesis") + else if attributes.type == 'master-thesis' + i.fa.fa-graduation-cap(title="Master thesis") + else if attributes.type == 'bachelor-thesis' + i.fa.fa-graduation-cap(title="Bachelor thesis") + else if attributes.type == 'review' + i.far.fa-comment(title="Book review") + else if attributes.type == 'chapter' + i.fa.fa-book-open(title="Book chapter") + else + - throw 'pub: unknown type' + else + i.far.fa-file-lines(title="Journal article") + td.icon + if attributes.oa + if attributes.url + - var oaurl = attributes.url + else if attributes.doi + - var oaurl = 'https://doi.org/'+attributes.doi + else + - throw 'pub: oa set but no doi or url' + a.oa(href!=oaurl, target='_blank') + i.ai.ai-lg.ai-open-access(title="Open Access") + + td + p + if !attributes.authors + - attributes.authors = 'Staps, Camil' + | !{attributes.authors}. #{year}. + | + if attributes.url + a(href!=attributes.url, target='_blank')!= title + else if attributes.publisher && !attributes.pages + i!= title + else + | !{title} + | + if attributes.journal + |. !{attributes.prejournal}#[em!=attributes.journal] + if attributes.volume + | #{attributes.volume} + if attributes.issue + | (#{attributes.issue}) + else if attributes.booktitle + | . In !{attributes.editors} (eds.), #[em!=attributes.booktitle] + else if attributes.misc + | . #{attributes.misc} + if attributes.pages + - attributes.pages = attributes.pages.replace('-', '–') + if attributes.journal + | :!{attributes.pages} + else + | , !{attributes.pages} + | . + if attributes.address + | #{attributes.address}: + if attributes.publisher + | #{attributes.publisher}. + if attributes.doi + | #[span.sc doi]: + - var doiurl = 'https://doi.org/'+attributes.doi + a(href!=doiurl, target='_blank')!= attributes.doi + | . + if attributes.errata + | (There are #[a(href!=attributes.errata) errata].) + +mixin review(year, author, title) + - attributes.type = 'review' + +pub(year, 'Review of: ' + author + ', ' + title)&attributes(attributes) + -- cgit v1.2.3