Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ca9703f
Add SortableTable plugin
Tim-Siu Mar 9, 2024
888ce62
Solve `include` not working
Tim-Siu Mar 11, 2024
7b1c13b
Solve undesired behavior when sorting numbers
Tim-Siu Mar 11, 2024
bce158d
Update tag to `<m-table sortable>`
Tim-Siu Mar 11, 2024
40519ac
Merge branch 'master' into table
Tim-Siu Mar 11, 2024
ddb6590
Switch to use dataTable
Tim-Siu Mar 13, 2024
a398c90
Include css and js in the project
Tim-Siu Mar 14, 2024
a65a158
Merge branch 'master' into table
Tim-Siu Mar 14, 2024
113f758
Include datatables js in the project
Tim-Siu Mar 14, 2024
d9806d4
Add functional test
Tim-Siu Mar 14, 2024
aacb32c
Update functional test
Tim-Siu Mar 15, 2024
4869d57
Update site.json for functional test
Tim-Siu Mar 15, 2024
e4f398b
Merge branch 'master' into table
Tim-Siu Mar 22, 2024
e38deb3
Fix the Vue related incompatibility
Tim-Siu Mar 22, 2024
812748a
Update functional test
Tim-Siu Mar 22, 2024
1533bd4
Fix styling inconsistency
Tim-Siu Mar 22, 2024
ffc23c4
Fix redundant scroll bar
Tim-Siu Mar 22, 2024
9ed03f4
Merge branch 'master' into table
Tim-Siu Mar 24, 2024
d9819fc
Add comments for the scroll bar fix
Tim-Siu Mar 24, 2024
8e45664
Improve performance and code quality
Tim-Siu Mar 25, 2024
53a492d
Merge branch 'master' into table
Tim-Siu Apr 1, 2024
83f166e
Add documentation
Tim-Siu Apr 1, 2024
3edcd6d
Migrate test cases to v5.4
Tim-Siu Apr 1, 2024
74d1c01
Add unit test
Tim-Siu Apr 1, 2024
deec097
Merge branch 'master' into table
Tim-Siu Apr 4, 2024
2dea59e
Improve code quality
Tim-Siu Apr 4, 2024
61910fe
Update test cases
Tim-Siu Apr 4, 2024
1f9e03b
Merge remote-tracking branch 'origin/table'
Tim-Siu Apr 4, 2024
743328e
Merge branch 'master' into table
Tim-Siu Apr 4, 2024
fbf0089
Fix typo in documentation
Tim-Siu Apr 4, 2024
ba9b648
Fix a bug
Tim-Siu Apr 4, 2024
588a471
Update expected functional test
Tim-Siu Apr 4, 2024
475189a
Merge branch 'master' into table
Tim-Siu Apr 5, 2024
c02de83
Update .gitignore to ignore image in functional test
Tim-Siu Apr 8, 2024
94a1d53
Remove generated diagrams
Tim-Siu Apr 8, 2024
b3c031f
Merge branch 'master' into table
Tim-Siu Apr 8, 2024
b88e401
Update syntax
Tim-Siu Apr 8, 2024
25dfe4f
Revert wrong modifications
Tim-Siu Apr 8, 2024
78e4ae8
Update functional test
Tim-Siu Apr 8, 2024
4d1119c
Merge branch 'master' into table
yucheng11122017 Apr 9, 2024
4d83ad4
Support Bootstrap icons
yiwen101 Apr 9, 2024
dd740c5
Add references between image and pic in UG
KevinEyo1 Apr 11, 2024
d443ac8
Add a reminder when contributor is new to ping all contributor bot
KevinEyo1 Apr 11, 2024
77775d5
Remove Overridden Question Attributes in Docs (#2513)
luminousleek Apr 12, 2024
75f0e77
Fix off-positioned close button in imported modal (#2487)
yiwen101 Apr 12, 2024
ba27fb6
Clean up functional test
Tim-Siu Apr 12, 2024
8d90deb
Further clean up functional test
Tim-Siu Apr 12, 2024
f011514
Merge branch 'master' into table
Tim-Siu Apr 12, 2024
2c6846e
Update documentation
Tim-Siu Apr 12, 2024
224e29a
Merge branch 'master' into table
Tim-Siu Apr 15, 2024
8253f82
Enable seamless panels to inherit any parent's colours (#2501)
jingting1412 Apr 17, 2024
122e9f2
Merge branch 'master' into table
Tim-Siu Apr 17, 2024
cf6e91b
Clean up code and documentation
Tim-Siu Apr 17, 2024
122fbd8
Merge branch 'master' into table
Tim-Siu Apr 19, 2024
5544ed4
Remove unnecessary pages in `site.json`
Tim-Siu Apr 19, 2024
a3180ac
Switch to guard clause
Tim-Siu Apr 19, 2024
989836d
Fix bugs in tests
Tim-Siu Apr 19, 2024
e254c05
Clean up code
Tim-Siu Apr 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/site.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"mathDelimiters",
"codeBlockWrapButtons",
"web3Form",
"codeBlockCopyButtons"
"codeBlockCopyButtons",
"dataTable"
],
"pluginsContext" : {
"filterTags" : {
Expand Down
66 changes: 66 additions & 0 deletions docs/userGuide/plugins/dataTable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
### Plugin: DataTable

The [DataTable](https://datatables.net) plugin enhances the functionality of tables in your MarkBind site by integrating the DataTables library. It allows you to add searching and sorting capabilities to your tables with minimal configuration. The necessary CSS and JavaScript files are already included in the project, so no additional CDN or plugin context configuration is required.

To enable this plugin, simply add `dataTable` to your site's plugins:

```js {heading="site.json"}
{
...
"plugins": [
"dataTable"
]
}
```

To create a table with DataTable features, use one of the following syntaxes:

{{ icon_example }} Sortable Table:

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">html</variable>
<variable name="code">
<d-table sortable>
| Product | Price | Quantity |
|-----------|-------|----------|
| Apple | $0.50 | 100 |
| Banana | $0.75 | 50 |
| Orange | $0.60 | 75 |
</d-table>
</variable>
</include>

{{ icon_example }} Searchable Table:

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">html</variable>
<variable name="code">
<d-table searchable>
| Book Title | Author | Year Published |
|---------------------------|------------------|----------------|
| To Kill a Mockingbird | Harper Lee | 1960 |
| 1984 | George Orwell | 1949 |
| Pride and Prejudice | Jane Austen | 1813 |
| The Great Gatsby | F. Scott Fitzgerald | 1925 |
</d-table>
</variable>
</include>

{{ icon_example }} Sortable and Searchable Table:

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">html</variable>
<variable name="code">
<d-table sortable searchable>
| City | Country | Population |
|-------------|-----------|------------|
| New York | USA | 8,336,817 |
| London | UK | 9,002,488 |
| Paris | France | 2,161,063 |
| Tokyo | Japan | 13,960,236 |
| Sydney | Australia | 5,367,206 |
</d-table>
</variable>
</include>

The DataTable plugin automatically renders the table with the specified features based on the presence of the `sortable` and `searchable` attributes in the `<d-table>` tag. You can use either one or both attributes to control the desired functionality for each table.
1 change: 1 addition & 0 deletions docs/userGuide/usingPlugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ MarkBind has a set of built-in plugins that can be used immediately without inst
<include src="plugins/disqus.md" />
<include src="plugins/mathDelimiters.md" />
<include src="plugins/web3Form.md" />
<include src="plugins/dataTable.md" />

## Using External Plugins

Expand Down
1 change: 1 addition & 0 deletions packages/cli/test/functional/testSites.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const testSites = [
'test_site',
'test_site_algolia_plugin',
'test_site_special_tags',
'test_site_table_plugin',
];

const testConvertSites = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<header>

</header>

<div id="flex-body">
<div id="content-wrapper">
{{ content }}
</div>
<scroll-top-button></scroll-top-button>
</div>

<footer>

</footer>
Loading