aboutsummaryrefslogtreecommitdiff
path: root/content/articles
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-26 11:03:18 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-26 11:03:18 -0400
commit654870d7610bf76fc335054e8abb2a53e1ff8bd3 (patch)
tree66ddbe99d25e6ba56f097b557f9bc15d813f4e58 /content/articles
parent812ca6650e0d44cb24f52ae052e77a69de9f6b4d (diff)
downloadpablotron.org-654870d7610bf76fc335054e8abb2a53e1ff8bd3.tar.bz2
pablotron.org-654870d7610bf76fc335054e8abb2a53e1ff8bd3.zip
articles/table-shortcode-examples.md: use bracket syntax for internal links, add tooltips to all links
Diffstat (limited to 'content/articles')
-rw-r--r--content/articles/table-shortcode-examples.md63
1 files changed, 35 insertions, 28 deletions
diff --git a/content/articles/table-shortcode-examples.md b/content/articles/table-shortcode-examples.md
index b3abd5d..3e30145 100644
--- a/content/articles/table-shortcode-examples.md
+++ b/content/articles/table-shortcode-examples.md
@@ -11,14 +11,7 @@ date: "2021-10-22T23:11:04-04:00"
# uncomment to show table of contents
toc: true
-# custom table config for all tables on this page
-table_config:
- table_class: "table"
- align_left: "has-text-left"
- align_center: "has-text-centered"
- align_justify: "has-text-weight-bold"
- align_right: "has-text-right"
-
+# table data
tables:
# available table properties
table_props:
@@ -45,7 +38,7 @@ tables:
notes: "Used as the `id` attribute of the `<table>` element."
- id: "`css`"
required: "No"
- text: "Table [CSS](https://en.wikipedia.org/wiki/CSS) class."
+ text: "Table [CSS](https://en.wikipedia.org/wiki/CSS \"Cascading Style Sheets\") class."
notes: "Appended to the `class` attribute of the `<table>` element."
- id: "`name`"
required: "No"
@@ -133,7 +126,7 @@ tables:
notes: "Used as the `id` attribute of the generated `<tr>` element."
- id: "`_css`"
required: "No"
- text: "Row [CSS class](https://en.wikipedia.org/wiki/CSS)."
+ text: "Row [CSS class](https://en.wikipedia.org/wiki/CSS \"Cascading Style Sheets\")."
notes: "Used as value of the `class` attribute of the generated `<tr>` element."
- id: "`_tip`"
required: "No"
@@ -169,7 +162,7 @@ tables:
notes: "Generated if the `_css` row property is specified."
- id: "`data-tr_y`"
text: "Zero-indexed Y offset of row position in table."
- notes: "Can be used to match specific rows using [CSS](https://en.wikipedia.org/wiki/CSS) selectors. Example `#some-table tr[data-tr_y='2']`."
+ notes: "Can be used to match specific rows using [CSS](https://en.wikipedia.org/wiki/CSS \"Cascading Style Sheets\") selectors. Example `#some-table tr[data-tr_y='2']`."
# available cell properties
cell_props:
@@ -240,15 +233,15 @@ tables:
text: "Row tooltip."
notes: "Set to the value of `tip` cell property is specified, or followed by the value of the `tip` column property. Defaults to the name of the column otherwise."
- id: "`class`"
- text: "Cell [CSS class](https://en.wikipedia.org/wiki/CSS)."
+ text: "Cell [CSS class](https://en.wikipedia.org/wiki/CSS \"Cascading Style Sheets\")."
notes: "Generated if the `css` cell property is specified, if
the cell `align` property is specified, or if the column `align` property is specified."
- id: "`data-td_x`"
text: "Zero-indexed X offset of cell position in table."
- notes: "Can be used to match specific columns using [CSS](https://en.wikipedia.org/wiki/CSS) selectors. Example `#some-table td[data-td_x='3']`."
+ notes: "Can be used to match specific columns using [CSS](https://en.wikipedia.org/wiki/CSS \"Cascading Style Sheets\") selectors. Example `#some-table td[data-td_x='3']`."
- id: "`data-td_id`"
text: "Cell column ID."
- notes: "Can be used to match specific columns using [CSS](https://en.wikipedia.org/wiki/CSS) selectors. Example `#some-table td[data-td_id='text']`."
+ notes: "Can be used to match specific columns using [CSS](https://en.wikipedia.org/wiki/CSS \"Cascading Style Sheets\") selectors. Example `#some-table td[data-td_id='text']`."
# available column alignments
align_classes:
@@ -581,7 +574,7 @@ tables:
&nbsp;
Defining a table as a hash allows you to specify several additional
-table properties. The [Table Properties section](#table-properties)
+table properties. The [Table Properties section][table-props]
contains a complete list of available table properties.
### Table Data Sources
@@ -732,9 +725,9 @@ Table columns can be defined in two ways:
* As an array of hashes.
Defining columns as an array of hashes allows you to specify several
-additional properties for each column. The [Column
-Properties section](#column-properties) contains a complete list of
-available column properties.
+additional properties for each column. The [Column Properties
+section][col-props] contains a complete list of available column
+properties.
### Columns Defined as an Array of Values
@@ -939,16 +932,15 @@ Rows are defined as:
* An array of values.
* Hashes. This is **required** if columns are [defined as an
- array of hashes](#columns-defined-as-an-array-of-hashes).
+ array of hashes][cols-as-hashes].
Defining a rows with hashes allows you to specify several additional
-properties. The [Row Properties section](#row-properties) contains a
-complete list of available properties.
+properties. The [Row Properties section][row-props] contains a complete
+list of available properties.
The `<tr>` elements generated by this shortcode are annotated with
several additional [HTML][] attributes. See the [Row HTML Attributes
-section](#row-html-attributes) for a complete list of [HTML][]
-attributes.
+section][row-attrs] for a complete list of [HTML][] attributes.
### Row Properties
@@ -975,13 +967,13 @@ Row cells can be specified as:
* a hash
Defining cells with hashes allows you to specify several additional
-properties. The [Cell Properties section](#cell-properties) contains a
+properties. The [Cell Properties section][cell-props] contains a
complete list of available properties.
The `<td>` elements generated by this shortcode for table cells are
annotated with several additional [HTML][] attributes. See the [Cell
-HTML Attributes section](#cell-html-attributes) for a complete list of
-[HTML][] attributes.
+HTML Attributes section][cell-attrs] for a complete list of [HTML][]
+attributes.
### Cells Defined as Values
@@ -1229,8 +1221,7 @@ These classes work out of the box with [Bulma][]. If you're using
another framework, you can change the [CSS class][css]
configuration on a per-table, per-page, or per-site basis.
-See the [Table Configuration Properties
-section](#table-configuration-properties "Table Configuration Properties")
+See the [Table Configuration Properties section][table-config-props]
for a full list of available table configuration properties.
### Table Override
@@ -1376,3 +1367,19 @@ Here is a full list of available table configuration properties:
"Hugo shortcode"
[git]: https://github.com/pablotron/hugo-shortcode-table
"hugo-shortcode-table github repository"
+[table-props]: #table-properties
+ "Table Properties section"
+[col-props]: #column-properties
+ "Column Properties section"
+[cols-as-hashes]: #columns-defined-as-an-array-of-hashes
+ "Columns Defined as an Array of Hashes"
+[row-props]: #row-properties
+ "Row Properties section"
+[row-attrs]: #row-html-attributes
+ "Row HTML Attributes section"
+[cell-props]: #cell-properties
+ "Cell Properties section"
+[cell-attrs]: #cell-html-attributes
+ "Cell HTML Attributes section"
+[table-config-props]: #table-configuration-properties
+ "Table Configuration Properties section"