diff options
Diffstat (limited to 'resources/pug')
10 files changed, 113 insertions, 36 deletions
diff --git a/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-1-introduction.pug b/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-1-introduction.pug new file mode 100644 index 0000000..9d5cf91 --- /dev/null +++ b/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-1-introduction.pug @@ -0,0 +1,18 @@ +extends /layout-articles.pug + +block prepend title + | Compiling Clean in the browser - + +block prepend menu + - var page = '2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-1-introduction' + +block append breadcrumbs + +breadcrumb('Compiling Clean in the browser with WebAssembly, part 1: Introduction') + +block subtitle + | Compiling Clean in the browser with WebAssembly, part 1: Introduction +block subtitleDate + | 23 June 2021 + +block page + include:markdown ../../../md/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-1-introduction.md diff --git a/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-2-the-pipeline.pug b/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-2-the-pipeline.pug new file mode 100644 index 0000000..713e97a --- /dev/null +++ b/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-2-the-pipeline.pug @@ -0,0 +1,18 @@ +extends /layout-articles.pug + +block prepend title + | Compiling Clean in the browser - + +block prepend menu + - var page = '2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-2-the-pipeline' + +block append breadcrumbs + +breadcrumb('Compiling Clean in the browser with WebAssembly, part 2: The pipeline') + +block subtitle + | Compiling Clean in the browser with WebAssembly, part 2: The pipeline +block subtitleDate + | 23 June 2021 + +block page + include:markdown ../../../md/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-2-the-pipeline.md diff --git a/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-3-putting-it-all-together.pug b/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-3-putting-it-all-together.pug new file mode 100644 index 0000000..e684350 --- /dev/null +++ b/resources/pug/finals/articles/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-3-putting-it-all-together.pug @@ -0,0 +1,18 @@ +extends /layout-articles.pug + +block prepend title + | Compiling Clean in the browser - + +block prepend menu + - var page = '2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-3-putting-it-all-together' + +block append breadcrumbs + +breadcrumb('Compiling Clean in the browser with WebAssembly, part 3: Putting it all together') + +block subtitle + | Compiling Clean in the browser with WebAssembly, part 3: Putting it all together +block subtitleDate + | 23 June 2021 + +block page + include:markdown ../../../md/2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-3-putting-it-all-together.md diff --git a/resources/pug/finals/articles/2021-06-23-running-the-clean-compiler-in-the-browser-with-webassembly.pug b/resources/pug/finals/articles/2021-06-23-running-the-clean-compiler-in-the-browser-with-webassembly.pug deleted file mode 100644 index 6506192..0000000 --- a/resources/pug/finals/articles/2021-06-23-running-the-clean-compiler-in-the-browser-with-webassembly.pug +++ /dev/null @@ -1,12 +0,0 @@ -extends /layout-articles.pug - -block prepend menu - - var page = '2021-06-23-running-the-clean-compiler-in-the-browser-with-webassembly' - -block subtitle - | Running the Clean compiler in the browser with WebAssembly -block subtitleDate - | 23 June 2021 - -block page - include:markdown ../../../md/2021-06-23-running-the-clean-compiler-in-the-browser-with-webassembly.md diff --git a/resources/pug/finals/articles/index.pug b/resources/pug/finals/articles/index.pug index 3c6f618..b3100dd 100644 --- a/resources/pug/finals/articles/index.pug +++ b/resources/pug/finals/articles/index.pug @@ -9,6 +9,16 @@ block subtitle block subtitleExtra block page - p. - This is a collection of some software-related articles I wrote. - Perhaps it will be larger than this one day. + p + | This is a collection of some software-related articles I wrote. + | Perhaps it will be larger than this one day. + | You can also go back to my #[a(href='/') home page]. + + h1 + a(href='2021-06-23-compiling-clean-in-the-browser-with-webassembly-part-1-introduction.html'). + 23 June 2021: Compiling Clean in the browser with WebAssembly + blockquote. + My interpreter for the pure, functional language Clean allows interpretation in both C and WebAssembly. + The Clean compiler is written in Clean, with a C backend. + In my Clean Sandbox, I compile the C backend with Emscripten to WebAssembly, and interpret the Clean frontend in the WebAssembly interpreter. + Combined with a simple make-like tool and an editor, this allows you to compile and run Clean code in the browser. diff --git a/resources/pug/finals/ham/cw-decoder.pug b/resources/pug/finals/ham/cw-decoder.pug index b4285eb..ba8d727 100644 --- a/resources/pug/finals/ham/cw-decoder.pug +++ b/resources/pug/finals/ham/cw-decoder.pug @@ -4,14 +4,14 @@ block prepend menu - var page = 'cw-decoder' - var sections = ['Porting to PIC', 'Finishing', 'Future plans'] +block append breadcrumbs + +breadcrumb('CW Decoder') + block subtitle | CW Decoder block subtitleDate | January 2017 -block subtitle-right - +githubIconLink('camilstaps/CWDecoder') - block page h4 Introduction p. diff --git a/resources/pug/include/layout-articles.pug b/resources/pug/include/layout-articles.pug index 2672a36..10feaab 100644 --- a/resources/pug/include/layout-articles.pug +++ b/resources/pug/include/layout-articles.pug @@ -1,10 +1,21 @@ extends layout-sidebar.pug +block append breadcrumbs + +breadcrumb('/articles/', 'Articles') + block append menu - var base_url = '/articles/' +menu( {name: 'Home', link: ''}, {name: 2021, menu: [ - {name: 'Running the Clean compiler in the browser with WebAssembly', year: 2021, month: 6, day: 23}, + { name: 'Compiling Clean in the browser with WebAssembly, part 3: Putting it all together', + year: 2021, month: 6, day: 23 + }, + { name: 'Compiling Clean in the browser with WebAssembly, part 2: The pipeline', + year: 2021, month: 6, day: 23 + }, + { name: 'Compiling Clean in the browser with WebAssembly, part 1: Introduction', + year: 2021, month: 6, day: 23 + }, ]}, ) diff --git a/resources/pug/include/layout-ham.pug b/resources/pug/include/layout-ham.pug index bb20ef0..9c7ea79 100644 --- a/resources/pug/include/layout-ham.pug +++ b/resources/pug/include/layout-ham.pug @@ -3,6 +3,9 @@ extends layout-sidebar.pug block title | PA5ET +block append breadcrumbs + +breadcrumb('/ham/', 'Ham Radio') + block append menu - var base_url = '/ham/' +menu( diff --git a/resources/pug/include/layout-sidebar.pug b/resources/pug/include/layout-sidebar.pug index e53476b..9ce6566 100644 --- a/resources/pug/include/layout-sidebar.pug +++ b/resources/pug/include/layout-sidebar.pug @@ -18,7 +18,7 @@ block content function item_link (item) { if (!('link' in item)) { - item.link = new String(item.name).toLowerCase().replace(/\W/g, '-'); + item.link = new String(item.name).toLowerCase().replace(/\W/g, '-').replace(/--+/g, '-'); if ('year' in item && 'month' in item && 'day' in item) item.link = item.year + '-' + pad_zero(item.month) + '-' + pad_zero(item.day) + '-' + item.link; @@ -38,7 +38,7 @@ block content - const id = 'menu-' + item_link(item); a(href='#' + id, data-toggle='collapse', role='button', aria-expanded=active.toString(), aria-controls=id)= item.name div.collapse(id=id, class=active ? 'in' : '') - ul.nav.nav-pills.nav-stacked.col-xs-12.col-md-10.pull-right + ul.nav.nav-pills.nav-stacked.col-xs-11.col-md-10.pull-right +menu(...item.menu) br(style='clear:both;') @@ -47,18 +47,30 @@ block content li(role='presentation', class=item_is_active(item) ? 'active' : '') a(href=base_url + (link == '' ? '' : link + '.html'))= item.name - div.col-lg-7.col-md-6 - h3 - block subtitle - block subtitleExtra - small - |  by - block subtitleAuthor - | Camil Staps - | , - block subtitleDate - div.col-lg-2.col-md-2.text-right - block subtitle-right + div.col-lg-9.col-md-8 + ol.breadcrumb.hidden-xs.hidden-sm + mixin breadcrumb(link, title) + li + if typeof title != 'undefined' + a(href=link)= title + else + a(href=base_url + page + '.html')= link - div.col-lg-9.col-md-8.text-justify.markdown - block page + block breadcrumbs + +breadcrumb('/', 'Home') + + div.row.article + div.col-lg-12 + h3 + strong + block subtitle + block subtitleExtra + small + |  by + block subtitleAuthor + | Camil Staps + | , + block subtitleDate + + article.col-lg-12.text-justify.markdown + block page diff --git a/resources/pug/include/layout.pug b/resources/pug/include/layout.pug index afb8c8d..81f133d 100644 --- a/resources/pug/include/layout.pug +++ b/resources/pug/include/layout.pug @@ -12,7 +12,6 @@ html(lang="en") block titleHeading block title | Camil Staps - hr block content |