diff options
| author | Camil Staps | 2021-06-23 19:20:29 +0200 | 
|---|---|---|
| committer | Camil Staps | 2021-06-23 19:20:29 +0200 | 
| commit | bbc049b5c7749b8f9c4e1ade9cf1da4f91f37c0d (patch) | |
| tree | 9fe20b0549b51a7165b847ac1a6a5f56a128ff92 /resources/pug/include | |
| parent | Add author on articles (diff) | |
Add article series on the clean sandbox
Diffstat (limited to 'resources/pug/include')
| -rw-r--r-- | resources/pug/include/layout-articles.pug | 13 | ||||
| -rw-r--r-- | resources/pug/include/layout-ham.pug | 3 | ||||
| -rw-r--r-- | resources/pug/include/layout-sidebar.pug | 44 | ||||
| -rw-r--r-- | resources/pug/include/layout.pug | 1 | 
4 files changed, 43 insertions, 18 deletions
| 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 | 
