Skip to content

Commit

Permalink
Merge pull request #73 from brmighell/update-html-demos
Browse files Browse the repository at this point in the history
Minor changes to existent HTML demos
  • Loading branch information
brmighell committed Dec 6, 2021
2 parents 09d2a13 + 2f7d6aa commit 0582e45
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
10 changes: 10 additions & 0 deletions docs/github-pages-example-0.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div>
<div id="wrapper-0">
</div>

<script type="text/javascript">
dtCreateDataTable({
wrapperDivId: 'wrapper-0',
});
</script>
</div>
2 changes: 1 addition & 1 deletion docs/github-pages-example-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<script type="text/javascript">
dtCreateDataTable({
wrapperDivId: 'wrapper-0',
wrapperDivId: 'wrapper-1',
});
</script>
</div>
11 changes: 7 additions & 4 deletions docs/github-pages-example-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

<script type="text/javascript">
dtCreateDataTable({
wrapperDivId: 'wrapper-1',
wrapperDivId: 'wrapper-2',
numRows: 6,
numColumns: 6,
numColumns: 4,
rowsNamePlural: 'fruits',
columnsName: 'Round',
rowsName: 'Type of fruit'
columnsName: 'Season',
rowsName: 'Type of fruit',
names: ["Number", "In Season"],
types: [Number, Boolean],
values: [0, false],
});
</script>
</div>
4 changes: 2 additions & 2 deletions docs/readme-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def create_derived_files(input_filename, output_static_filename, output_dynamic_
# 3. What file to include in the static file?
magic_keys = {
'{{ deps }}\n': ('deps', 'docs/deps.html', None),
'{{ ex0 }}\n': ('ex0', 'docs/github-pages-example-1.html', None),
'{{ ex0 }}\n': ('ex0', 'docs/github-pages-example-0.html', None),
'{{ ex1 }}\n': ('ex1', 'docs/github-pages-example-1.html', None),
'{{ ex2 }}\n': ('ex2', 'docs/github-pages-example-2.html', None),
}
Expand All @@ -62,7 +62,7 @@ def create_derived_files(input_filename, output_static_filename, output_dynamic_
if static_content is not None:
# Replace the static content
static_lines.append(
f'\n[\[interactive demo\]](https://artoonie.github.io/timeline-range-slider)\n')
f'\n[\[interactive demo\]](https://brmighell.github.io/rcv-entry)\n')
static_lines.append(f'![{key}]({static_content})\n')

# Include the actual content + the dynamic content
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: default
# A lightweight, extendable, dependency-free javascript HTML table plugin

The default configuration:
{% capture ex0 %}{% include_relative docs/github-pages-example-1.html %}{% endcapture %}
{% capture ex0 %}{% include_relative docs/github-pages-example-0.html %}{% endcapture %}
{{ ex0 }}

## Features & Benefits
Expand Down

0 comments on commit 0582e45

Please sign in to comment.