From dacf3684105df492503163bb27d080d738c3160b Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 13 Mar 2022 10:10:47 +0100 Subject: More table options --- tpl/index.pug | 10 +++++----- tpl/objects/table.pug | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'tpl') diff --git a/tpl/index.pug b/tpl/index.pug index 016f6be..be9f407 100644 --- a/tpl/index.pug +++ b/tpl/index.pug @@ -603,7 +603,7 @@ html +rule('medium') +box - +table + +table(interactive=true) +table-head +table-row +table-head-cell= 'Title' @@ -661,19 +661,19 @@ html +table-head-cell= 'Title' +table-body +table-row - +table-cell= 'Row 1,1' + +table-cell(divider=true)= 'Row 1,1' +table-cell= 'Row 1,2' +table-cell= 'Row 1,3' +table-row - +table-cell= 'Row 2,1' + +table-cell(divider=true)= 'Row 2,1' +table-cell= 'Row 2,2' +table-cell= 'Row 2,3' +table-row - +table-cell= 'Row 3,1' + +table-cell(divider=true)= 'Row 3,1' +table-cell= 'Row 3,2' +table-cell= 'Row 3,3' +table-row - +table-cell= 'Row 4,1' + +table-cell(divider=true)= 'Row 4,1' +table-cell= 'Row 4,2' +table-cell= 'Row 4,3' diff --git a/tpl/objects/table.pug b/tpl/objects/table.pug index b7ec881..e635589 100644 --- a/tpl/objects/table.pug +++ b/tpl/objects/table.pug @@ -1,10 +1,11 @@ mixin table - let classes = { - 'o-table': true, - 'o-table--flush': attributes.flush, - 'o-table--box': attributes.box, - 'o-table--50': attributes.size50, + 'o-table': true, + 'o-table--flush': attributes.flush, + 'o-table--box': attributes.box, + 'o-table--interactive': attributes.interactive, + 'o-table--50': attributes.size50, } table(class=classes) @@ -27,5 +28,11 @@ mixin table-row block mixin table-cell - td.o-table__cell + - + let classes = { + 'o-table__cell': true, + 'o-table__cell--divider': attributes.divider, + } + + td(class=classes) block -- cgit v1.2.3-70-g09d2