diff options
Diffstat (limited to 'themes/hugo-pt2021/layouts/shortcodes/table.html')
-rw-r--r-- | themes/hugo-pt2021/layouts/shortcodes/table.html | 76 |
1 files changed, 1 insertions, 75 deletions
diff --git a/themes/hugo-pt2021/layouts/shortcodes/table.html b/themes/hugo-pt2021/layouts/shortcodes/table.html index 6fa778b..1493a9b 100644 --- a/themes/hugo-pt2021/layouts/shortcodes/table.html +++ b/themes/hugo-pt2021/layouts/shortcodes/table.html @@ -41,82 +41,8 @@ Notes: alignment, id, colspan, and rowspan, class) * row tooltip with _row and id with _id -Example: - - {{< table "favorite-fruits" "fruits" >}} - -And the corresponding `data/favorite-fruits/fruits.yaml`: - - --- - # table name (required) - name: "Favorite Fruits" - - # column list (required) - cols: - - id: "name" - name: "Name" - - id: "color" - name: "Color" - - id: "description" - name: "Description" - - # table rows (required) - rows: - - name: "Apple" - color: "Red or Green" - description: "Sweet if red, or sour if green." - - name: "Banana" - color: "Yellow" - description: "Skin is slipping hazard on floor." - - name: "Orange" - color: "Orange" - description: "Citrus bonanza." - - name: "Peach" - color: "Orange" - description: "Don't eat the core!" - -This shortcode will render the following table: - - <table class='table' title='Favorite Fruits' aria-label='Favorite Fruits'> - <caption>My favorite fruits.</caption> - - <thead> - <tr> - <th title='Name' aria-label='Name' data-th_x='0' data-col_id='name'> - Name - </th> - - <th title='Color' aria-label='Color' data-th_x='1' data-col_id='color'> - Color - </th> +Remove complicated example (moved to table-shortcode-examples article) - <th title='Description' aria-label='Description' data-th_x='2' data-col_id='description'> - Description - </th> - </tr> - </thead> - - <tbody> - <tr data-tr_y='0'> - <td title='Name' aria-label='Name' data-td_x='0' data-col_id='name'> - Apple - </td> - - <td title='Color' aria-label='Color' data-td_x='1' data-col_id='color'> - Red or Green - </td> - - <td title='Description' aria-label='Description' data-td_x='2' data-col_id='description'> - Sweet if red, or sour if green. - </td> - </tr> - - ... (other rows omitted for brevity) ... - </tbody> - </table> - -You can also configure alignment on a per-column or per-cell basis, and -you can override the `class` attribute for individual cells. */}} {{/* get table config |