Skip to content

Commit

Permalink
Add support for tables and icons
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Dec 23, 2020
1 parent d6ec6e6 commit b5c32f8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
21 changes: 20 additions & 1 deletion api/documentation/docs/Material for mkdocs Formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ print("Hello world!") if __name__ == "__main__"
( _ => console.log("Hello world!"))();
```
```

This is an inline Java highlight `#!java system.out.println("Hello world!")`


## Content Tabs

See: [Material for mkdocs: Content Tabs](https://squidfunk.github.io/mkdocs-material/reference/content-tabs/#content-tabs)

### Basic Tabs
Expand Down Expand Up @@ -83,4 +85,21 @@ See: [Material for mkdocs: Content Tabs](https://squidfunk.github.io/mkdocs-mate
=== "JavaScript"
```js
( _ => console.log("Hello world!"))();
```
```

## Data Tables
See: [Material for mkdocs: Data Tables](https://squidfunk.github.io/mkdocs-material/reference/data-tables/#data-tables)

```
| Method | Description |
| ----------- | ------------------------------------ |
| `GET` | :material-check: Fetch resource |
| `PUT` | :material-check-all: Update resource |
| `DELETE` | :material-close: Delete resource |
```

| Method | Description |
| ----------- | ------------------------------------ |
| `GET` | :material-check: Fetch resource |
| `PUT` | :material-check-all: Update resource |
| `DELETE` | :material-close: Delete resource |
File renamed without changes.
11 changes: 11 additions & 0 deletions api/documentation/docs/javascript/tablesort.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Configure Tablesort for sortable tables
* See: https://squidfunk.github.io/mkdocs-material/reference/data-tables/#sortable-tables
*/

app.document$.subscribe(function() {
var tables = document.querySelectorAll("article table")
tables.forEach(function(table) {
new Tablesort(table)
})
})
7 changes: 6 additions & 1 deletion api/documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ markdown_extensions:
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.tabbed
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- mkautodoc


Expand Down Expand Up @@ -53,6 +56,8 @@ extra:

extra_javascript:
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js
- javascript/config.js
- javascript/highlight.js
- https://cdnjs.cloudflare.com/ajax/libs/tablesort/5.2.1/tablesort.min.js
- javascript/tablesort.js
extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css

0 comments on commit b5c32f8

Please sign in to comment.