Browse Source

simple vue-based column editor

pull/26/head
Ondřej Hruška 4 years ago
parent
commit
e5a6527d18
Signed by: MightyPork GPG Key ID: 2C5FD5035250423D
  1. 2
      .env.example
  2. 43
      app/Http/Controllers/TableController.php
  3. 24
      app/helpers.php
  4. 1
      config/app.php
  5. 6
      porklib/Providers/BladeExtensionsProvider.php
  6. 144
      public/fonts/fa-dtbl-1-preview.html
  7. 51
      public/fonts/fa-dtbl-1.css
  8. BIN
      public/fonts/fa-dtbl-1.eot
  9. 63
      public/fonts/fa-dtbl-1.svg
  10. BIN
      public/fonts/fa-dtbl-1.ttf
  11. BIN
      public/fonts/fa-dtbl-1.woff2
  12. 25
      resources/assets/js/app.js
  13. 89
      resources/assets/js/components/ColumnEditor.vue
  14. 23
      resources/assets/js/components/ExampleComponent.vue
  15. 21
      resources/assets/js/components/Icon.vue
  16. 1
      resources/assets/js/components/_base.scss
  17. 5
      resources/assets/sass/_bootstrap-base.scss
  18. 6
      resources/assets/sass/_bootstrap.scss
  19. 55
      resources/assets/sass/_mixins.scss
  20. 5
      resources/assets/sass/bootstrap-customizations/_variables.scss
  21. 4
      resources/views/form/input.blade.php
  22. 31
      resources/views/table/create.blade.php

2
.env.example

@ -38,8 +38,6 @@ MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
PRETTY_JSON=true
OAUTH_GITHUB_ID=
OAUTH_GITHUB_SECRET=
OAUTH_GITHUB_REDIRECT=https://datatable.directory/auth/github/callback

43
app/Http/Controllers/TableController.php

@ -72,19 +72,22 @@ class TableController extends Controller
*/
public function create()
{
$exampleColumns =
"latin,string,Latin Name\n" .
"common,string,Common Name\n" .
"lifespan,int,Lifespan (years)";
$exampleData =
"Mercenaria mercenaria,hard clam,40\n" .
"Magallana gigas,pacific oyster,30\n" .
"Patella vulgata,common limpet,20";
return view('table.create',
compact('exampleColumns', 'exampleData')
);
$columns = Column::columnsFromJson([
['name' => 'latin', 'type' => 'string', 'title' => 'Latin Name'],
['name' => 'common', 'type' => 'string', 'title' => 'Common Name'],
['name' => 'lifespan', 'type' => 'int', 'title' => 'Lifespan (years)']
]);
return view('table.create', [
'exampleColumns' => '',
'columns' => $columns,
'exampleData' => $exampleData,
]);
}
public function settings(Request $request, User $user, string $table)
@ -141,7 +144,7 @@ class TableController extends Controller
'description' => ['nullable', VALI_TEXT],
'license' => ['nullable', VALI_TEXT],
'origin' => ['nullable', VALI_TEXT],
'columns' => 'required|string',
'columns' => 'required|json',
'data' => 'string|nullable',
]);
@ -156,28 +159,24 @@ class TableController extends Controller
/** @var Column[] $columns */
$columns = [];
$column_keys = []; // for checking duplicates
$colTable = array_map('str_getcsv', explode("\n", $input->columns));
$colsArray = fromJSON($input->columns);
// prevent griefing via long list of columns
if (count($colTable) > 100) return $this->backWithErrors(['columns' => "Too many columns"]);
if (count($colsArray) > 100) return $this->backWithErrors(['columns' => "Too many columns"]);
foreach ($colTable as $col) {
$col = array_map('trim', $col);
if (count($col) < 2 || strlen($col[0])==0) {
foreach ($colsArray as $col) {
if (!isset($col->name) || !isset($col->type) || empty($col->name) || empty($col->type)) {
return $this->backWithErrors(['columns' => "All columns must have at least name and type."]);
}
try {
if (in_array($col[0], $column_keys)) {
return $this->backWithErrors(['columns' => "Duplicate column: $col[0]"]);
if (in_array($col->name, $column_keys)) {
return $this->backWithErrors(['columns' => "Duplicate column: $col->name"]);
}
$column_keys[] = $col[0];
$column_keys[] = $col->name;
$columns[] = new Column([
'name' => $col[0],
'type' => $col[1],
'title' => count($col) >= 3 ? $col[2] : $col[0], // title falls back to =name if not specified,
]);
if (!isset($col->title)) $col->title = $col->name;
$columns[] = new Column($col);
} catch (\Exception $e) {
return $this->backWithErrors(['columns' => $e->getMessage()]);
}

24
app/helpers.php

@ -67,3 +67,27 @@ function vali($arr) {
}
return $result;
}
/**
* like old(), but decodes stringified json
*
* @param string $name
* @param object|array $default
* @return object|array
*/
function old_json($name, $default) {
$old = old($name, null);
if (is_string($old)) return json_decode($old);
return $default;
}
// Safe JSON funcs
function toJSON($object) {
return \GuzzleHttp\json_encode($object, JSON_UNESCAPED_SLASHES + JSON_UNESCAPED_UNICODE);
}
function fromJSON($object, $assoc=false) {
return \GuzzleHttp\json_decode($object, $assoc);
}

1
config/app.php

@ -222,7 +222,6 @@ return [
],
// -------------- added keys --------------
'pretty_json' => env('PRETTY_JSON', false),
'debug_blacklist' => [
'_COOKIE' => array_keys($_COOKIE),

6
porklib/Providers/BladeExtensionsProvider.php

@ -44,11 +44,7 @@ class BladeExtensionsProvider extends ServiceProvider
// json encode
Blade::directive('json', function ($x) {
if (config('app.pretty_json')) {
return "<?= json_encode(($x), JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES) ?>";
} else {
return "<?= json_encode(($x), JSON_UNESCAPED_SLASHES) ?>";
}
return "<?= json_encode(($x), JSON_UNESCAPED_SLASHES) ?>";
});
// json encode, escaped

144
public/fonts/fa-dtbl-1-preview.html

@ -166,6 +166,7 @@
.fa-code-fork:before,
.fa-comment:before,
.fa-download:before,
.fa-exclamation-triangle:before,
.fa-eye:before,
.fa-facebook-square:before,
.fa-floppy-o:before,
@ -178,6 +179,7 @@
.fa-key-modern:before,
.fa-link:before,
.fa-pencil:before,
.fa-plus:before,
.fa-question-circle:before,
.fa-sign-in:before,
.fa-sign-out:before,
@ -185,6 +187,7 @@
.fa-star-o:before,
.fa-table:before,
.fa-th-list:before,
.fa-trash-o:before,
.fa-user:before,
.fa-user-circle-o:before,
.fa-user-plus:before,
@ -209,30 +212,33 @@
.fa-code-fork:before { content: "\f102"; }
.fa-comment:before { content: "\f103"; }
.fa-download:before { content: "\f104"; }
.fa-eye:before { content: "\f105"; }
.fa-facebook-square:before { content: "\f106"; }
.fa-floppy-o:before { content: "\f107"; }
.fa-github:before { content: "\f108"; }
.fa-globe:before { content: "\f109"; }
.fa-google:before { content: "\f10a"; }
.fa-history:before { content: "\f10b"; }
.fa-home:before { content: "\f10c"; }
.fa-inbox:before { content: "\f10d"; }
.fa-key-modern:before { content: "\f10e"; }
.fa-link:before { content: "\f10f"; }
.fa-pencil:before { content: "\f110"; }
.fa-question-circle:before { content: "\f111"; }
.fa-sign-in:before { content: "\f112"; }
.fa-sign-out:before { content: "\f113"; }
.fa-star:before { content: "\f114"; }
.fa-star-o:before { content: "\f115"; }
.fa-table:before { content: "\f116"; }
.fa-th-list:before { content: "\f117"; }
.fa-user:before { content: "\f118"; }
.fa-user-circle-o:before { content: "\f119"; }
.fa-user-plus:before { content: "\f11a"; }
.fa-users:before { content: "\f11b"; }
.fa-wrench:before { content: "\f11c"; }
.fa-exclamation-triangle:before { content: "\f105"; }
.fa-eye:before { content: "\f106"; }
.fa-facebook-square:before { content: "\f107"; }
.fa-floppy-o:before { content: "\f108"; }
.fa-github:before { content: "\f109"; }
.fa-globe:before { content: "\f10a"; }
.fa-google:before { content: "\f10b"; }
.fa-history:before { content: "\f10c"; }
.fa-home:before { content: "\f10d"; }
.fa-inbox:before { content: "\f10e"; }
.fa-key-modern:before { content: "\f10f"; }
.fa-link:before { content: "\f110"; }
.fa-pencil:before { content: "\f111"; }
.fa-plus:before { content: "\f112"; }
.fa-question-circle:before { content: "\f113"; }
.fa-sign-in:before { content: "\f114"; }
.fa-sign-out:before { content: "\f115"; }
.fa-star:before { content: "\f116"; }
.fa-star-o:before { content: "\f117"; }
.fa-table:before { content: "\f118"; }
.fa-th-list:before { content: "\f119"; }
.fa-trash-o:before { content: "\f11a"; }
.fa-user:before { content: "\f11b"; }
.fa-user-circle-o:before { content: "\f11c"; }
.fa-user-plus:before { content: "\f11d"; }
.fa-users:before { content: "\f11e"; }
.fa-wrench:before { content: "\f11f"; }
</style>
<!--[if lte IE 8]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
@ -248,7 +254,7 @@
<body class="characters-off">
<div id="page" class="container">
<header>
<h1>fa-dtbl-1 contains 29 glyphs:</h1>
<h1>fa-dtbl-1 contains 32 glyphs:</h1>
<a onclick="toggleCharacters(); return false;" href="#">Toggle Preview Characters</a>
</header>
@ -319,6 +325,20 @@
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-exclamation-triangle" class="fa-exclamation-triangle"></i></span>
</div>
<div class="preview-scale">
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-exclamation-triangle" />
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-warning" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf105;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-eye" class="fa-eye"></i></span>
@ -328,7 +348,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-eye" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf105;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf106;" />
</div>
</div>
@ -341,7 +361,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-facebook-square" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf106;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf107;" />
</div>
</div>
@ -355,7 +375,7 @@
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-floppy-o" />
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-save" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf107;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf108;" />
</div>
</div>
@ -368,7 +388,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-github" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf108;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf109;" />
</div>
</div>
@ -381,7 +401,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-globe" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf109;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10a;" />
</div>
</div>
@ -394,7 +414,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-google" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10a;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10b;" />
</div>
</div>
@ -407,7 +427,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-history" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10b;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10c;" />
</div>
</div>
@ -420,7 +440,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-home" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10c;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10d;" />
</div>
</div>
@ -433,7 +453,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-inbox" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10d;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10e;" />
</div>
</div>
@ -446,7 +466,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-key-modern" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10e;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10f;" />
</div>
</div>
@ -459,7 +479,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-link" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10f;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf110;" />
</div>
</div>
@ -472,7 +492,20 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-pencil" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf110;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf111;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-plus" class="fa-plus"></i></span>
</div>
<div class="preview-scale">
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-plus" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf112;" />
</div>
</div>
@ -485,7 +518,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-question-circle" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf111;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf113;" />
</div>
</div>
@ -498,7 +531,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-sign-in" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf112;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf114;" />
</div>
</div>
@ -511,7 +544,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-sign-out" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf113;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf115;" />
</div>
</div>
@ -524,7 +557,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-star" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf114;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf116;" />
</div>
</div>
@ -537,7 +570,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-star-o" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf115;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf117;" />
</div>
</div>
@ -550,7 +583,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-table" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf116;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf118;" />
</div>
</div>
@ -563,7 +596,20 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-th-list" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf117;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf119;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-trash-o" class="fa-trash-o"></i></span>
</div>
<div class="preview-scale">
<span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-trash-o" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11a;" />
</div>
</div>
@ -576,7 +622,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-user" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf118;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11b;" />
</div>
</div>
@ -589,7 +635,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-user-circle-o" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf119;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11c;" />
</div>
</div>
@ -602,7 +648,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-user-plus" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11a;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11d;" />
</div>
</div>
@ -615,7 +661,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-users" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11b;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11e;" />
</div>
</div>
@ -628,7 +674,7 @@
</div>
<div class="usage">
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-wrench" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11c;" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf11f;" />
</div>
</div>

51
public/fonts/fa-dtbl-1.css

@ -43,27 +43,30 @@
.fa-code-fork::before { content: "\f102"; }
.fa-comment::before { content: "\f103"; }
.fa-download::before { content: "\f104"; }
.fa-eye::before { content: "\f105"; }
.fa-facebook-square::before { content: "\f106"; }
.fa-floppy-o::before, .fa-save::before { content: "\f107"; }
.fa-github::before { content: "\f108"; }
.fa-globe::before { content: "\f109"; }
.fa-google::before { content: "\f10a"; }
.fa-history::before { content: "\f10b"; }
.fa-home::before { content: "\f10c"; }
.fa-inbox::before { content: "\f10d"; }
.fa-key-modern::before { content: "\f10e"; }
.fa-link::before { content: "\f10f"; }
.fa-pencil::before { content: "\f110"; }
.fa-question-circle::before { content: "\f111"; }
.fa-sign-in::before { content: "\f112"; }
.fa-sign-out::before { content: "\f113"; }
.fa-star::before { content: "\f114"; }
.fa-star-o::before { content: "\f115"; }
.fa-table::before { content: "\f116"; }
.fa-th-list::before { content: "\f117"; }
.fa-user::before { content: "\f118"; }
.fa-user-circle-o::before { content: "\f119"; }
.fa-user-plus::before { content: "\f11a"; }
.fa-users::before { content: "\f11b"; }
.fa-wrench::before { content: "\f11c"; }
.fa-exclamation-triangle::before, .fa-warning::before { content: "\f105"; }
.fa-eye::before { content: "\f106"; }
.fa-facebook-square::before { content: "\f107"; }
.fa-floppy-o::before, .fa-save::before { content: "\f108"; }
.fa-github::before { content: "\f109"; }
.fa-globe::before { content: "\f10a"; }
.fa-google::before { content: "\f10b"; }
.fa-history::before { content: "\f10c"; }
.fa-home::before { content: "\f10d"; }
.fa-inbox::before { content: "\f10e"; }
.fa-key-modern::before { content: "\f10f"; }
.fa-link::before { content: "\f110"; }
.fa-pencil::before { content: "\f111"; }
.fa-plus::before { content: "\f112"; }
.fa-question-circle::before { content: "\f113"; }
.fa-sign-in::before { content: "\f114"; }
.fa-sign-out::before { content: "\f115"; }
.fa-star::before { content: "\f116"; }
.fa-star-o::before { content: "\f117"; }
.fa-table::before { content: "\f118"; }
.fa-th-list::before { content: "\f119"; }
.fa-trash-o::before { content: "\f11a"; }
.fa-user::before { content: "\f11b"; }
.fa-user-circle-o::before { content: "\f11c"; }
.fa-user-plus::before { content: "\f11d"; }
.fa-users::before { content: "\f11e"; }
.fa-wrench::before { content: "\f11f"; }

BIN
public/fonts/fa-dtbl-1.eot

Binary file not shown.

63
public/fonts/fa-dtbl-1.svg

@ -1,11 +1,11 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2018-7-29: Created with FontForge (http://fontforge.org)
2018-8-4: Created with FontForge (http://fontforge.org)
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata>
Created by FontForge 20170805 at Sun Jul 29 20:18:03 2018
Created by FontForge 20170805 at Sat Aug 4 10:56:23 2018
By ondra
The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/OFL). Fork Awesome is a fork based of off Font Awesome 4.7.0 by Dave Gandy. More info on licenses at https://forkawesome.github.io
</metadata>
@ -22,7 +22,7 @@ The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/
bbox="-0.14014 -256.168 2048 1536.01"
underline-thickness="89.6"
underline-position="-179.2"
unicode-range="U+0020-F11C"
unicode-range="U+0020-F11F"
/>
<missing-glyph />
<glyph glyph-name="space" unicode=" " horiz-adv-x="200"
@ -47,91 +47,100 @@ d="M1792 640c0 -354 -401 -640 -896 -640c-49 0 -98 3 -145 8c-131 -116 -287 -198 -
d="M1280 192c0 35 -29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64s64 29 64 64zM1536 192c0 35 -29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64s64 29 64 64zM1664 416v-320c0 -53 -43 -96 -96 -96h-1472c-53 0 -96 43 -96 96v320c0 53 43 96 96 96h465l135 -136
c37 -36 85 -56 136 -56s99 20 136 56l136 136h464c53 0 96 -43 96 -96zM1339 985c10 -24 5 -52 -14 -70l-448 -448c-12 -13 -29 -19 -45 -19s-33 6 -45 19l-448 448c-19 18 -24 46 -14 70c10 23 33 39 59 39h256v448c0 35 29 64 64 64h256c35 0 64 -29 64 -64v-448h256
c26 0 49 -16 59 -39z" />
<glyph glyph-name="eye" unicode="&#xf105;" horiz-adv-x="1792"
<glyph glyph-name="exclamation-triangle" unicode="&#xf105;" horiz-adv-x="1792"
d="M1024 161v190c0 18 -14 33 -32 33h-192c-18 0 -32 -15 -32 -33v-190c0 -18 14 -33 32 -33h192c18 0 32 15 32 33zM1022 535l18 459c0 6 -3 14 -10 19c-6 5 -15 11 -24 11h-220c-9 0 -18 -6 -24 -11c-7 -5 -10 -15 -10 -21l17 -457c0 -13 15 -23 34 -23h185
c18 0 33 10 34 23zM1008 1469l768 -1408c22 -39 21 -87 -2 -126s-65 -63 -110 -63h-1536c-45 0 -87 24 -110 63s-24 87 -2 126l768 1408c22 41 65 67 112 67s90 -26 112 -67z" />
<glyph glyph-name="eye" unicode="&#xf106;" horiz-adv-x="1792"
d="M1664 576c-95 147 -225 273 -381 353c40 -68 61 -146 61 -225c0 -247 -201 -448 -448 -448s-448 201 -448 448c0 79 21 157 61 225c-156 -80 -286 -206 -381 -353c171 -264 447 -448 768 -448s597 184 768 448zM944 960c0 26 -22 48 -48 48c-167 0 -304 -137 -304 -304
c0 -26 22 -48 48 -48s48 22 48 48c0 114 94 208 208 208c26 0 48 22 48 48zM1792 576c0 -25 -8 -48 -20 -69c-184 -303 -521 -507 -876 -507s-692 205 -876 507c-12 21 -20 44 -20 69s8 48 20 69c184 302 521 507 876 507s692 -205 876 -507c12 -21 20 -44 20 -69z" />
<glyph glyph-name="facebook-square" unicode="&#xf106;"
<glyph glyph-name="facebook-square" unicode="&#xf107;"
d="M1248 1408c159 0 288 -129 288 -288v-960c0 -159 -129 -288 -288 -288h-188v595h199l30 232h-229v148c0 67 18 112 115 112l122 1v207c-21 3 -94 9 -178 9c-177 0 -299 -108 -299 -306v-171h-200v-232h200v-595h-532c-159 0 -288 129 -288 288v960c0 159 129 288 288 288
h960z" />
<glyph glyph-name="floppy-o" unicode="&#xf107;"
<glyph glyph-name="floppy-o" unicode="&#xf108;"
d="M384 0h768v384h-768v-384zM1280 0h128v896c0 19 -17 60 -30 73l-281 281c-14 14 -53 30 -73 30v-416c0 -53 -43 -96 -96 -96h-576c-53 0 -96 43 -96 96v416h-128v-1280h128v416c0 53 43 96 96 96h832c53 0 96 -43 96 -96v-416zM896 928v320c0 17 -15 32 -32 32h-192
c-17 0 -32 -15 -32 -32v-320c0 -17 15 -32 32 -32h192c17 0 32 15 32 32zM1536 896v-928c0 -53 -43 -96 -96 -96h-1344c-53 0 -96 43 -96 96v1344c0 53 43 96 96 96h928c53 0 126 -30 164 -68l280 -280c38 -38 68 -111 68 -164z" />
<glyph glyph-name="github" unicode="&#xf108;"
<glyph glyph-name="github" unicode="&#xf109;"
d="M768 1408c424 0 768 -344 768 -768c0 -339 -220 -627 -525 -729c-39 -7 -53 17 -53 37c0 25 1 108 1 211c0 72 -24 118 -52 142c171 19 351 84 351 379c0 84 -30 152 -79 206c8 20 34 98 -8 204c-64 20 -211 -79 -211 -79c-61 17 -127 26 -192 26s-131 -9 -192 -26
c0 0 -147 99 -211 79c-42 -106 -16 -184 -8 -204c-49 -54 -79 -122 -79 -206c0 -294 179 -360 350 -379c-22 -20 -42 -54 -49 -103c-44 -20 -156 -54 -223 64c-42 73 -118 79 -118 79c-75 1 -5 -47 -5 -47c50 -23 85 -112 85 -112c45 -137 259 -91 259 -91
c0 -64 1 -124 1 -143c0 -20 -14 -44 -53 -37c-305 102 -525 390 -525 729c0 424 344 768 768 768zM291 305c-2 -4 -8 -5 -13 -2c-6 3 -9 8 -7 12c2 3 7 4 13 2c6 -3 9 -8 7 -12zM322 271c-4 -4 -11 -2 -16 3c-5 6 -6 13 -2 16c4 4 11 2 16 -3c5 -6 6 -13 2 -16zM352 226
c-4 -3 -12 0 -17 7s-5 15 0 18c5 4 13 1 17 -6c5 -7 5 -15 0 -19zM394 184c-4 -5 -13 -4 -20 3c-7 6 -9 15 -4 19c4 5 13 4 20 -3c6 -6 8 -15 4 -19zM451 159c-2 -6 -11 -9 -19 -6c-9 2 -15 9 -13 15s11 9 19 7c9 -3 15 -10 13 -16zM514 154c0 -6 -7 -11 -16 -11
c-10 -1 -17 4 -17 11c0 6 7 11 16 11c9 1 17 -4 17 -11zM572 164c1 -6 -5 -12 -14 -14s-17 2 -18 8c-1 7 5 13 14 15c9 1 17 -3 18 -9z" />
<glyph glyph-name="globe" unicode="&#xf109;"
<glyph glyph-name="globe" unicode="&#xf10a;"
d="M768 1404c424 0 768 -344 768 -768s-344 -768 -768 -768s-768 344 -768 768s344 768 768 768zM737 1186v0c-18 0 -40 -7 -58 -7c-27 0 -61 12 -81 0s-18 -37 -27 -55s-28 -34 -28 -54s19 -36 28 -54s2 -47 27 -54s54 36 81 54s69 32 81 54s0 36 0 54s16 39 0 55
c-5 5 -14 7 -23 7zM491 1178h-6s-44 -8 -76 -13c-136 -92 -261 -300 -278 -464c23 -12 46 -22 60 -36c27 -27 83 -27 88 -56s-24 -62 -33 -80s-31 -31 -27 -54s36 -36 54 -54s37 -22 54 -54s20 -98 27 -135c9 -47 23 -85 44 -118c27 -19 72 -44 102 -58c10 28 10 93 16 122
c7 37 13 109 27 135s19 19 28 28s18 15 28 28s17 34 26 52s30 31 26 53s-36 37 -54 55s-29 39 -55 54s-73 18 -101 25s-127 12 -129 13c-2 0 -1 -6 -7 2s-2 39 -2 57s11 34 24 66c13 18 5 10 25 24c10 9 43 -44 57 -44s-3 91 6 100c36 36 128 98 128 136s-37 36 -55 54
s-46 -30 -111 -30s76 103 85 112s23 17 27 27s0 18 0 27s12 22 8 25c-2 1 -4 1 -6 1zM1212 1096c-62 -8 -139 -10 -182 -26c-45 -17 -54 -36 -81 -54s-67 -28 -81 -54s0 -54 0 -81s-26 -68 0 -82s55 37 82 55s63 64 81 54s6 -7 0 -27s-51 -41 -52 -81s102 -73 68 -126
s-188 46 -232 17s-19 -54 -28 -81s-37 -52 -27 -81s52 -34 81 -54s81 -56 82 -58s20 -99 27 -135c14 -73 -27 -199 76 -231c31 14 78 41 106 60c13 34 24 72 35 94c22 44 71 123 80 161s0 37 0 55s7 30 0 54s-36 54 -54 81s-34 64 -54 81s-46 18 -54 27s-4 8 -4 13
s-4 7 5 14s34 8 54 0s36 -36 54 -54s25 -51 54 -54s54 36 81 54c25 17 52 56 76 55c-12 131 -98 312 -193 404z" />
<glyph glyph-name="google" unicode="&#xf10a;" horiz-adv-x="1505"
<glyph glyph-name="google" unicode="&#xf10b;" horiz-adv-x="1505"
d="M768 750h725c7 -39 12 -77 12 -128c0 -438 -294 -750 -737 -750c-425 0 -768 343 -768 768s343 768 768 768c207 0 381 -76 515 -201l-209 -201c-57 55 -157 119 -306 119c-262 0 -476 -217 -476 -485s214 -485 476 -485c304 0 418 218 436 331h-436v264z" />
<glyph glyph-name="history" unicode="&#xf10b;"
<glyph glyph-name="history" unicode="&#xf10c;"
d="M1536 640c0 -423 -345 -768 -768 -768c-229 0 -445 101 -591 277c-10 13 -9 32 2 43l137 138c7 6 16 9 25 9c9 -1 18 -5 23 -12c98 -127 245 -199 404 -199c282 0 512 230 512 512s-230 512 -512 512c-131 0 -255 -50 -348 -137l137 -138c19 -18 24 -46 14 -69
c-10 -24 -33 -40 -59 -40h-448c-35 0 -64 29 -64 64v448c0 26 16 49 40 59c23 10 51 5 69 -14l130 -129c141 133 332 212 529 212c423 0 768 -345 768 -768zM896 928v-448c0 -18 -14 -32 -32 -32h-320c-18 0 -32 14 -32 32v64c0 18 14 32 32 32h224v352c0 18 14 32 32 32h64
c18 0 32 -14 32 -32z" />
<glyph glyph-name="home" unicode="&#xf10c;" horiz-adv-x="1612"
<glyph glyph-name="home" unicode="&#xf10d;" horiz-adv-x="1612"
d="M1382 544v-480c0 -35 -29 -64 -64 -64h-384v384h-256v-384h-384c-35 0 -64 29 -64 64v480c0 2 1 4 1 6l575 474l575 -474c1 -2 1 -4 1 -6zM1605 613l-62 -74c-5 -6 -13 -10 -21 -11h-3c-8 0 -15 2 -21 7l-692 577l-692 -577c-7 -5 -15 -8 -24 -7c-8 1 -16 5 -21 11
l-62 74c-11 13 -9 34 4 45l719 599c42 35 110 35 152 0l244 -204v195c0 18 14 32 32 32h192c18 0 32 -14 32 -32v-408l219 -182c13 -11 15 -32 4 -45z" />
<glyph glyph-name="inbox" unicode="&#xf10d;"
<glyph glyph-name="inbox" unicode="&#xf10e;"
d="M1023 576h316c-2 5 -3 11 -5 16l-212 496h-708l-212 -496c-2 -5 -3 -11 -5 -16h316l95 -192h320zM1536 546v-482c0 -35 -29 -64 -64 -64h-1408c-35 0 -64 29 -64 64v482c0 36 11 89 25 123l238 552c14 33 54 59 89 59h832c35 0 75 -26 89 -59l238 -552
c14 -34 25 -87 25 -123z" />
<glyph glyph-name="key-modern" unicode="&#xf10e;" horiz-adv-x="1792"
<glyph glyph-name="key-modern" unicode="&#xf10f;" horiz-adv-x="1792"
d="M546 1536v0c139 1 278 -52 383 -158c142 -141 187 -343 137 -525l726 -726v-319c0 -35 -29 -64 -64 -64h-300l-45 45l135 226l-46 45l-225 -135l-45 46l134 225l-45 45l-225 -134l-46 45l135 225l-45 46l-243 -139l-186 186c-182 -50 -382 -5 -524 136
c-211 212 -209 556 4 770c107 106 246 159 385 160zM405 1290v0c-41 0 -82 -16 -113 -47c-63 -63 -63 -163 0 -226s164 -63 227 0s63 163 0 226c-31 31 -73 47 -114 47z" />
<glyph glyph-name="link" unicode="&#xf10f;" horiz-adv-x="1632"
<glyph glyph-name="link" unicode="&#xf110;" horiz-adv-x="1632"
d="M1440 320c0 26 -10 50 -28 68l-208 208c-18 18 -43 28 -68 28c-29 0 -52 -11 -72 -32c33 -33 72 -61 72 -112c0 -53 -43 -96 -96 -96c-51 0 -79 39 -112 72c-21 -20 -33 -43 -33 -73c0 -25 10 -50 28 -68l206 -207c18 -18 43 -27 68 -27s50 9 68 26l147 146
c18 18 28 42 28 67zM737 1025c0 25 -10 50 -28 68l-206 207c-18 18 -43 28 -68 28s-50 -10 -68 -27l-147 -146c-18 -18 -28 -42 -28 -67c0 -26 10 -50 28 -68l208 -208c18 -18 43 -27 68 -27c29 0 52 10 72 31c-33 33 -72 61 -72 112c0 53 43 96 96 96c51 0 79 -39 112 -72
c21 20 33 43 33 73zM1632 320c0 -76 -31 -150 -85 -203l-147 -146c-54 -54 -127 -83 -203 -83c-77 0 -150 30 -204 85l-206 207c-54 54 -83 127 -83 203c0 79 32 154 88 209l-88 88c-55 -56 -129 -88 -208 -88c-76 0 -150 30 -204 84l-208 208c-55 55 -84 127 -84 204
c0 76 31 150 85 203l147 146c54 54 127 83 203 83c77 0 150 -30 204 -85l206 -207c54 -54 83 -127 83 -203c0 -79 -32 -154 -88 -209l88 -88c55 56 129 88 208 88c76 0 150 -30 204 -84l208 -208c55 -55 84 -127 84 -204z" />
<glyph glyph-name="pencil" unicode="&#xf110;" horiz-adv-x="1515"
<glyph glyph-name="pencil" unicode="&#xf111;" horiz-adv-x="1515"
d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928c0 13 -9 22 -22 22c-6 0 -12 -2 -17 -7l-542 -542c-5 -5 -7 -11 -7 -17c0 -13 9 -22 22 -22c6 0 12 2 17 7l542 542c5 5 7 11 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024c0 -34 -14 -67 -37 -90
l-166 -166l-416 416l166 165c23 24 56 38 90 38s67 -14 91 -38l235 -234c23 -24 37 -57 37 -91z" />
<glyph glyph-name="question-circle" unicode="&#xf111;"
<glyph glyph-name="plus" unicode="&#xf112;" horiz-adv-x="1408"
d="M1408 800v-192c0 -53 -43 -96 -96 -96h-416v-416c0 -53 -43 -96 -96 -96h-192c-53 0 -96 43 -96 96v416h-416c-53 0 -96 43 -96 96v192c0 53 43 96 96 96h416v416c0 53 43 96 96 96h192c53 0 96 -43 96 -96v-416h416c53 0 96 -43 96 -96z" />
<glyph glyph-name="question-circle" unicode="&#xf113;"
d="M896 160v192c0 18 -14 32 -32 32h-192c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h192c18 0 32 14 32 32zM1152 832c0 183 -192 320 -364 320c-163 0 -285 -70 -371 -213c-9 -14 -5 -32 8 -42l132 -100c5 -4 12 -6 19 -6c9 0 19 4 25 12c47 60 67 78 86 92
c17 12 50 24 86 24c64 0 123 -41 123 -85c0 -52 -27 -78 -88 -106c-71 -32 -168 -115 -168 -212v-36c0 -18 14 -32 32 -32h192c18 0 32 14 32 32c0 23 29 72 76 99c76 43 180 101 180 253zM1536 640c0 -424 -344 -768 -768 -768s-768 344 -768 768s344 768 768 768
s768 -344 768 -768z" />
<glyph glyph-name="sign-in" unicode="&#xf112;"
<glyph glyph-name="sign-in" unicode="&#xf114;"
d="M1184 640c0 -17 -7 -33 -19 -45l-544 -544c-12 -12 -28 -19 -45 -19c-35 0 -64 29 -64 64v288h-448c-35 0 -64 29 -64 64v384c0 35 29 64 64 64h448v288c0 35 29 64 64 64c17 0 33 -7 45 -19l544 -544c12 -12 19 -28 19 -45zM1536 992v-704c0 -159 -129 -288 -288 -288
h-320c-17 0 -32 15 -32 32c0 28 -13 96 32 96h320c88 0 160 72 160 160v704c0 88 -72 160 -160 160h-288c-25 0 -64 -5 -64 32c0 28 -13 96 32 96h320c159 0 288 -129 288 -288z" />
<glyph glyph-name="sign-out" unicode="&#xf113;" horiz-adv-x="1568"
<glyph glyph-name="sign-out" unicode="&#xf115;" horiz-adv-x="1568"
d="M640 96c0 -28 13 -96 -32 -96h-320c-159 0 -288 129 -288 288v704c0 159 129 288 288 288h320c17 0 32 -15 32 -32c0 -28 13 -96 -32 -96h-320c-88 0 -160 -72 -160 -160v-704c0 -88 72 -160 160 -160h288c25 0 64 5 64 -32zM1568 640c0 -17 -7 -33 -19 -45l-544 -544
c-12 -12 -28 -19 -45 -19c-35 0 -64 29 -64 64v288h-448c-35 0 -64 29 -64 64v384c0 35 29 64 64 64h448v288c0 35 29 64 64 64c17 0 33 -7 45 -19l544 -544c12 -12 19 -28 19 -45z" />
<glyph glyph-name="star" unicode="&#xf114;" horiz-adv-x="1664"
<glyph glyph-name="star" unicode="&#xf116;" horiz-adv-x="1664"
d="M1664 889c0 -18 -13 -35 -26 -48l-363 -354l86 -500c1 -7 1 -13 1 -20c0 -26 -12 -50 -41 -50c-14 0 -28 5 -40 12l-449 236l-449 -236c-13 -7 -26 -12 -40 -12c-29 0 -42 24 -42 50c0 7 1 13 2 20l86 500l-364 354c-12 13 -25 30 -25 48c0 30 31 42 56 46l502 73
l225 455c9 19 26 41 49 41s40 -22 49 -41l225 -455l502 -73c24 -4 56 -16 56 -46z" />
<glyph glyph-name="star-o" unicode="&#xf115;" horiz-adv-x="1664"
<glyph glyph-name="star-o" unicode="&#xf117;" horiz-adv-x="1664"
d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889c0 -18 -13 -35 -26 -48l-363 -354l86 -500c1 -7 1 -13 1 -20c0 -27 -12 -50 -41 -50c-14 0 -28 5 -40 12l-449 236l-449 -236c-13 -7 -26 -12 -40 -12
c-29 0 -42 24 -42 50c0 7 1 13 2 20l86 500l-364 354c-12 13 -25 30 -25 48c0 30 31 42 56 46l502 73l225 455c9 19 26 41 49 41s40 -22 49 -41l225 -455l502 -73c24 -4 56 -16 56 -46z" />
<glyph glyph-name="table" unicode="&#xf116;" horiz-adv-x="1664"
<glyph glyph-name="table" unicode="&#xf118;" horiz-adv-x="1664"
d="M512 160v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM512 544v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM1024 160v192c0 18 -14 32 -32 32h-320
c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM512 928v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM1024 544v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192
c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM1536 160v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM1024 928v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32z
M1536 544v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM1536 928v192c0 18 -14 32 -32 32h-320c-18 0 -32 -14 -32 -32v-192c0 -18 14 -32 32 -32h320c18 0 32 14 32 32zM1664 1248v-1088c0 -88 -72 -160 -160 -160
h-1344c-88 0 -160 72 -160 160v1088c0 88 72 160 160 160h1344c88 0 160 -72 160 -160z" />
<glyph glyph-name="th-list" unicode="&#xf117;" horiz-adv-x="1792"
<glyph glyph-name="th-list" unicode="&#xf119;" horiz-adv-x="1792"
d="M512 288v-192c0 -53 -43 -96 -96 -96h-320c-53 0 -96 43 -96 96v192c0 53 43 96 96 96h320c53 0 96 -43 96 -96zM512 800v-192c0 -53 -43 -96 -96 -96h-320c-53 0 -96 43 -96 96v192c0 53 43 96 96 96h320c53 0 96 -43 96 -96zM1792 288v-192c0 -53 -43 -96 -96 -96h-960
c-53 0 -96 43 -96 96v192c0 53 43 96 96 96h960c53 0 96 -43 96 -96zM512 1312v-192c0 -53 -43 -96 -96 -96h-320c-53 0 -96 43 -96 96v192c0 53 43 96 96 96h320c53 0 96 -43 96 -96zM1792 800v-192c0 -53 -43 -96 -96 -96h-960c-53 0 -96 43 -96 96v192c0 53 43 96 96 96
h960c53 0 96 -43 96 -96zM1792 1312v-192c0 -53 -43 -96 -96 -96h-960c-53 0 -96 43 -96 96v192c0 53 43 96 96 96h960c53 0 96 -43 96 -96z" />
<glyph glyph-name="user" unicode="&#xf118;" horiz-adv-x="1280"
<glyph glyph-name="trash-o" unicode="&#xf11a;" horiz-adv-x="1408"
d="M512 800v-576c0 -18 -14 -32 -32 -32h-64c-18 0 -32 14 -32 32v576c0 18 14 32 32 32h64c18 0 32 -14 32 -32zM768 800v-576c0 -18 -14 -32 -32 -32h-64c-18 0 -32 14 -32 32v576c0 18 14 32 32 32h64c18 0 32 -14 32 -32zM1024 800v-576c0 -18 -14 -32 -32 -32h-64
c-18 0 -32 14 -32 32v576c0 18 14 32 32 32h64c18 0 32 -14 32 -32zM1152 76v948h-896v-948c0 -48 27 -76 32 -76h832c5 0 32 28 32 76zM480 1152h448l-48 117c-3 4 -12 10 -17 11h-317c-6 -1 -14 -7 -17 -11zM1408 1120v-64c0 -18 -14 -32 -32 -32h-96v-948
c0 -110 -72 -204 -160 -204h-832c-88 0 -160 90 -160 200v952h-96c-18 0 -32 14 -32 32v64c0 18 14 32 32 32h309l70 167c20 49 80 89 133 89h320c53 0 113 -40 133 -89l70 -167h309c18 0 32 -14 32 -32z" />
<glyph glyph-name="user" unicode="&#xf11b;" horiz-adv-x="1280"
d="M1280 137c0 -146 -96 -265 -213 -265h-854c-117 0 -213 119 -213 265c0 263 65 567 327 567c81 -79 191 -128 313 -128s232 49 313 128c262 0 327 -304 327 -567zM1024 1024c0 -212 -172 -384 -384 -384s-384 172 -384 384s172 384 384 384s384 -172 384 -384z" />
<glyph glyph-name="user-circle-o" unicode="&#xf119;" horiz-adv-x="1792"
<glyph glyph-name="user-circle-o" unicode="&#xf11c;" horiz-adv-x="1792"
d="M896 1536c495 0 896 -401 896 -896c0 -492 -399 -896 -896 -896c-496 0 -896 403 -896 896c0 495 401 896 896 896zM1515 185c93 128 149 285 149 455c0 423 -345 768 -768 768s-768 -345 -768 -768c0 -170 56 -327 149 -455c36 179 123 327 306 327
c81 -79 191 -128 313 -128s232 49 313 128c183 0 270 -148 306 -327zM1280 832c0 -212 -172 -384 -384 -384s-384 172 -384 384s172 384 384 384s384 -172 384 -384z" />
<glyph glyph-name="user-plus" unicode="&#xf11a;" horiz-adv-x="2048"
<glyph glyph-name="user-plus" unicode="&#xf11d;" horiz-adv-x="2048"
d="M704 640c-212 0 -384 172 -384 384s172 384 384 384s384 -172 384 -384s-172 -384 -384 -384zM1664 512h352c17 0 32 -15 32 -32v-192c0 -17 -15 -32 -32 -32h-352v-352c0 -17 -15 -32 -32 -32h-192c-17 0 -32 15 -32 32v352h-352c-17 0 -32 15 -32 32v192
c0 17 15 32 32 32h352v352c0 17 15 32 32 32h192c17 0 32 -15 32 -32v-352zM928 288c0 -70 58 -128 128 -128h256v-238c-49 -36 -111 -50 -171 -50h-874c-160 0 -267 96 -267 259c0 226 53 573 346 573c16 0 27 -7 39 -17c98 -75 193 -122 319 -122s221 47 319 122
c12 10 23 17 39 17c85 0 160 -32 217 -96h-223c-70 0 -128 -58 -128 -128v-192z" />
<glyph glyph-name="users" unicode="&#xf11b;" horiz-adv-x="1920"
<glyph glyph-name="users" unicode="&#xf11e;" horiz-adv-x="1920"
d="M593 640c-104 -3 -198 -48 -265 -128h-134c-100 0 -194 48 -194 159c0 81 -3 353 124 353c21 0 125 -85 260 -85c46 0 90 8 133 23c-3 -22 -5 -44 -5 -66c0 -91 29 -181 81 -256zM1664 3c0 -162 -107 -259 -267 -259h-874c-160 0 -267 97 -267 259c0 226 53 573 346 573
c34 0 158 -139 358 -139s324 139 358 139c293 0 346 -347 346 -573zM640 1280c0 -141 -115 -256 -256 -256s-256 115 -256 256s115 256 256 256s256 -115 256 -256zM1344 896c0 -212 -172 -384 -384 -384s-384 172 -384 384s172 384 384 384s384 -172 384 -384zM1920 671
c0 -111 -94 -159 -194 -159h-134c-67 80 -161 125 -265 128c52 75 81 165 81 256c0 22 -2 44 -5 66c43 -15 87 -23 133 -23c135 0 239 85 260 85c127 0 124 -272 124 -353zM1792 1280c0 -141 -115 -256 -256 -256s-256 115 -256 256s115 256 256 256s256 -115 256 -256z" />
<glyph glyph-name="wrench" unicode="&#xf11c;" horiz-adv-x="1641"
<glyph glyph-name="wrench" unicode="&#xf11f;" horiz-adv-x="1641"
d="M363 64c0 35 -29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64s64 29 64 64zM1007 484l-682 -682c-23 -23 -56 -37 -90 -37s-67 14 -91 37l-106 108c-24 23 -38 56 -38 90s14 67 38 91l681 681c52 -131 157 -236 288 -288zM1641 919c0 -33 -12 -74 -23 -106
c-63 -178 -234 -301 -423 -301c-247 0 -448 201 -448 448s201 448 448 448c73 0 168 -22 229 -63c10 -7 16 -16 16 -28c0 -11 -7 -22 -16 -28l-293 -169v-224l193 -107c33 19 265 165 285 165s32 -15 32 -35z" />
</font>

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
public/fonts/fa-dtbl-1.ttf

Binary file not shown.

BIN
public/fonts/fa-dtbl-1.woff2

Binary file not shown.

25
resources/assets/js/app.js

@ -9,6 +9,9 @@ require('./bootstrap')
let url_slug = require('./url-slug')
$(function () {
// Remove all noscript from forms etc
$('noscript').remove();
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
})
@ -62,17 +65,11 @@ $(document).on('input keypress paste keyup', 'input[data-autoalias]', function (
}
})
//
// window.Vue = require('vue');
//
// /**
// * Next, we will create a fresh Vue application instance and attach it to
// * the page. Then, you may begin adding components to this application
// * or customize the JavaScript scaffolding to fit your unique needs.
// */
//
// Vue.component('example-component', require('./components/ExampleComponent.vue'));
//
// const app = new Vue({
// el: '#app'
// });
window.Vue = require('vue');
Vue.component('column-editor', require('./components/ColumnEditor.vue'));
Vue.component('v-icon', require('./components/Icon.vue'));
const app = new Vue({
el: '#app'
});

89
resources/assets/js/components/ColumnEditor.vue

@ -0,0 +1,89 @@
<template>
<div>
<input type="hidden" :name="name" :value="JSON.stringify(columns)">
<table class="editor-table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Title</th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="(col, i) in columns">
<td>
<input v-model="col.name" class="form-control" type="text" style="width: 140px">
</td>
<td>
<select v-model="col.type" class="form-control custom-select" style="width: 110px">
<option v-for="t in colTypes" :value="t">{{t}}</option>
</select>
</td>
<td>
<input v-model="col.title" class="form-control" type="text" style="width: 170px">
</td>
<td class="text-nowrap">
<a href="" :class="['btn', 'btn-outline-secondary', {disabled: i==0}]" @click.prevent="delCol(i)">
<v-icon class="fa-trash-o" alt="Delete column" />
</a><!--
--><a href="" class="btn btn-outline-secondary" v-if="i === columns.length - 1"
@click.prevent="addCol()">
<v-icon class="fa-plus" alt="Add Column" />
</a>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<style lang="scss" scoped>
@import "base";
table {
border-collapse: collapse;
}
td, th {
@include pr(1);
}
td .btn {
@include py(1);
@include mr(1);
}
</style>
<script>
export default {
props: {
name: String,
initialColumns: Array,
},
data: function() {
return {
columns: this.initialColumns,
colTypes: ['string', 'int', 'float', 'bool'],
}
},
methods: {
delCol(n) {
if (n == 0) return
this.columns.splice(n, 1)
},
addCol() {
let nth = this.columns.length+1
this.columns.push({
name: `column-${nth}`,
type: 'string',
title: `Column ${nth}`,
})
}
}
}
</script>

23
resources/assets/js/components/ExampleComponent.vue

@ -1,23 +0,0 @@
<template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card card-default">
<div class="card-header">Example Component</div>
<div class="card-body">
I'm an example component.
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
mounted() {
console.log('Component mounted.')
}
}
</script>

21
resources/assets/js/components/Icon.vue

@ -0,0 +1,21 @@
<template>
<i :title="tooltipText">
<span class="sr-only" v-html=srHtml></span>
</i>
</template>
<script>
export default {
inheritAttrs: false,
props: {
alt: String,
srOnly: Boolean
},
data: function() {
return {
tooltipText: this.srOnly ? null : this.alt.replace(/~/g, ''),
srHtml: this.alt.replace(/~/g, '&nbsp;')
};
}
}
</script>

1
resources/assets/js/components/_base.scss

@ -0,0 +1 @@
@import "../../sass/bootstrap-base";

5
resources/assets/sass/_bootstrap-base.scss

@ -0,0 +1,5 @@
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";
@import "mixins";
@import "bootstrap-customizations/variables";

6
resources/assets/sass/_bootstrap.scss

@ -1,8 +1,4 @@
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";
@import "bootstrap-customizations/variables";
@import "bootstrap-base";
@import "bootstrap-customizations/_helpers-before";
@import "~bootstrap/scss/root";

55
resources/assets/sass/_mixins.scss

@ -0,0 +1,55 @@
@function dist($x) {
@return $spacer*.25*$x;
}
@mixin py($n) {
padding-top: dist($n);
padding-bottom: dist($n);
}
@mixin px($n) {
padding-left: dist($n);
padding-right: dist($n);
}
@mixin my($n) {
margin-top: dist($n);
margin-bottom: dist($n);
}
@mixin mx($n) {
margin-left: dist($n);
margin-right: dist($n);
}
@mixin pl($n) {
padding-left: dist($n);
}
@mixin pr($n) {
padding-right: dist($n);
}
@mixin pt($n) {
padding-top: dist($n);
}
@mixin pb($n) {
padding-bottom: dist($n);
}
@mixin ml($n) {
margin-left: dist($n);
}
@mixin mr($n) {
margin-right: dist($n);
}
@mixin mt($n) {
margin-top: dist($n);
}
@mixin mb($n) {
margin-bottom: dist($n);
}

5
resources/assets/sass/bootstrap-customizations/_variables.scss

@ -1,7 +1,10 @@
$sp0: 0;
$sp1_2: $spacer*.25;
$sp1: $spacer*.5;
$sp1_4: $spacer*.125;
$sp2_4: $sp1_2;
$sp3_4: $spacer*.75;
$sp1: $spacer*.5;
$sp2: $spacer*1;
$sp3: $spacer*1.5;

4
resources/views/form/input.blade.php

@ -29,8 +29,8 @@
@if ($errors->has($w->name))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first($w->name) }}</strong>
</span>
<strong>{{ $errors->first($w->name) }}</strong>
</span>
@endif
</div>
</div>

31
resources/views/table/create.blade.php

@ -30,7 +30,7 @@
->help('If you took the data from some external site, a book, etc., write it here.
URLs in a full format will be clickable.') !!}
{!! Widget::textarea('columns', 'Columns')->value($exampleColumns)->height('8em')
{{--!! Widget::textarea('columns', 'Columns')->value($exampleColumns)->height('8em')
->help('
<div class="text-left">
Column parameters in CSV format:
@ -39,7 +39,34 @@
<li><b>column data type</b><br>int, string, float, bool
<li><b>column title</b><br>used for display (optional)
</ul>
</div>') !!}
</div>') !!--}}
<div class="row form-group">
<label for="field-columns" class="col-md-3 col-form-label text-md-right">
Columns
</label>
<div class="col-md-8">
<column-editor name="columns" :initial-columns="{{old('columns', toJSON($columns))}}"></column-editor>
<noscript>
You have JavaScript disabled; enter columns as JSON array<br>
<textarea class="form-control" name="columns" rows="10">{{ old('columns', toJSON($columns)) }}</textarea>
</noscript>
@if ($errors->has('columns'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('columns') }}</strong>
</span>
@endif
@if($errors->has('columns'))
<span class="text-danger">
@icon(fa-warning, sr:Validation error:)
{{$errors->first('columns')}}
</span>
@endif
</div>
</div>
{!! Widget::textarea('data', 'Initial data')->value($exampleData)->height('12em')
->help('

Loading…
Cancel
Save