Skip to content

Commit b607840

Browse files
committed
refactor gh-pages example and readme
1 parent 65873a1 commit b607840

File tree

6 files changed

+39
-8
lines changed

6 files changed

+39
-8
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Allows CRUD-operations for Object-Arrays.
1616
## Install
1717

1818
```
19-
npm install svelte-generic-crud-table
19+
npm install svelte-generic-crud-table --save-dev
2020
```
2121

2222

@@ -42,7 +42,8 @@ Only wanted keys of your source array have to be mapped by columns_settings *nam
4242
{name: 'job', show: true, edit: true, width: '150px', description: 'The job'},
4343
{name: 'name', show: true, edit: true, width: '150px', tooltip: true},
4444
{name: 'private', show: true, edit: false, width: '200px', description: 'your things', tooltip: true},
45-
{name: 'html', show: true, edit: true, width: '500px', type: 'html', description: 'You can use HTML'} ],
45+
{name: 'html', show: true, edit: true, width: '500px', type: 'html', description: 'You can use HTML', tooltip: true}
46+
],
4647
details_text: 'detail' // replace the standard icon with an text-link
4748
}
4849
```

dist/global.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,16 @@ button:not(:disabled):active {
6464
button:focus {
6565
border-color: #666;
6666
}
67+
68+
pre {
69+
background: #f4f4f4;
70+
border-left: 3px solid #f36d33;
71+
color: #666;
72+
page-break-inside: avoid;
73+
font-family: monospace;
74+
overflow: auto;
75+
padding: 1em;
76+
display: block;
77+
word-wrap: break-word;
78+
width: fit-content;
79+
}

dist/index.html

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,35 @@
1212
<body>
1313
<h1>&lt;crud-table&gt;&lt;/crud-table&gt;</h1>
1414
<p>Agnostic web-component for object-arrays with CRUD functionality.</p>
15-
<span style="background-color: #dddddd; padding: 0.4em; display:inline-block">&gt; npm install svelte-generic-crud-table</span>
15+
<span style="background-color: #dddddd; padding: 0.4em; display:inline-block">&gt; npm install svelte-generic-crud-table --save-dev</span>
1616
<p></p>
17+
<blockquote><pre><code>
18+
const table_config = {
19+
name: 'Awesome',
20+
options: ['CREATE', 'EDIT', 'DELETE', 'DETAILS'],
21+
columns_setting: [
22+
{name: 'id', show: false, edit: true, width: '0px'},
23+
{name: 'job', show: true, edit: true, width: '150px', description: 'The job'},
24+
{name: 'name', show: true, edit: true, width: '150px', tooltip: true},
25+
{name: 'private', show: true, edit: false, width: '200px', description: 'your things', tooltip: true},
26+
{name: 'html', show: true, edit: true, width: '500px', type: 'html', description: 'You can use HTML', tooltip: true}
27+
],
28+
details_text: 'detail' // replace the standard icon with an text-link
29+
}
30+
</code></pre></blockquote>
1731
<hr>
1832
<crud-table></crud-table>
1933
<hr>
2034
</span style="text-align: right"><a href="https://ivolution.one">ivolution.one product - MIT License</a>
2135
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7V5M288MUT7GE&source=url">donate
2236
</a></p>
2337
<img src="https://travis-ci.com/ivosdc/svelte-generic-crud-table.svg?branch=master">
24-
<a rel="noopener noreferrer" href='https://coveralls.io/github/ivosdc/svelte-generic-crud-table?branch=master'><img src='https://coveralls.io/repos/github/ivosdc/svelte-generic-crud-table/badge.svg?branch=master' alt='Coverage Status' /></a>
38+
<a rel="noopener noreferrer" href='https://coveralls.io/github/ivosdc/svelte-generic-crud-table?branch=master'><img
39+
src='https://coveralls.io/repos/github/ivosdc/svelte-generic-crud-table/badge.svg?branch=master'
40+
alt='Coverage Status'/></a>
2541

26-
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7V5M288MUT7GE&source=url" target="_blank">
42+
<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7V5M288MUT7GE&source=url"
43+
target="_blank">
2744
<img src="https://github.com/ivosdc/svelte-generic-crud-table/raw/master/assets/donate.gif" title="donate">
2845
</a></p>
2946
</body>

dist/test-data.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "svelte-generic-crud-table",
3-
"version": "1.5.70",
3+
"version": "1.5.71",
44
"description": "<crud-table> renders object-arrays with options-panel and inline edit per row. Dispatches events for ongoing data handling. As self-containing webcomponent or for Svelte in 60KB",
55
"main": "dist/build/crud-table.js",
66
"module": "dist/build/crud-table.mjs",

src/SvelteGenericCrudTable.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
let targetElem = event.target;
176176
element.style.backgroundColor = 'white';
177177
element.style.width = event.target.width;
178-
element.style.maxWidth = '33%';
178+
element.style.maxWidth = '25%';
179179
element.style.padding = '3px'
180180
element.style.position = 'fixed';
181181
element.style.border = 'solid 1px black'

0 commit comments

Comments
 (0)