new table form html, css

pull/26/head
Ondřej Hruška 6 years ago
parent ba721592cd
commit 3242ae9cbe
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 15
      app/Facades/WidgetFacade.php
  2. 10
      app/Http/Controllers/HomeController.php
  3. 20
      app/Http/Controllers/TableController.php
  4. 5
      app/Providers/AppServiceProvider.php
  5. 6
      app/Providers/RouteServiceProvider.php
  6. 108
      app/View/Widget.php
  7. 27
      app/View/WidgetFactory.php
  8. 1
      config/app.php
  9. 386
      public/fonts/fa-dtbl-1-preview.html
  10. 19
      public/fonts/fa-dtbl-1.css
  11. BIN
      public/fonts/fa-dtbl-1.eot
  12. 37
      public/fonts/fa-dtbl-1.svg
  13. BIN
      public/fonts/fa-dtbl-1.ttf
  14. BIN
      public/fonts/fa-dtbl-1.woff2
  15. 7
      resources/assets/js/app.js
  16. 4
      resources/assets/sass/_bst-modules.scss
  17. 4
      resources/assets/sass/_variables.scss
  18. 12
      resources/assets/sass/app.scss
  19. 11
      resources/views/form/_help.blade.php
  20. 21
      resources/views/form/input.blade.php
  21. 20
      resources/views/form/textarea.blade.php
  22. 119
      resources/views/table/create.blade.php
  23. 1
      routes/login.php
  24. 19
      routes/public.php
  25. 13
      routes/user.php
  26. 34
      routes/web.php

@ -0,0 +1,15 @@
<?php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
use App\View\WidgetFactory;
/** Facade for easy widget rendering in View */
class WidgetFacade extends Facade
{
protected static function getFacadeAccessor()
{
return WidgetFactory::class;
}
}

@ -6,16 +6,6 @@ use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*

@ -14,9 +14,9 @@ class TableController extends Controller
public function create()
{
$exampleColSpec =
"string, latin, Latin Name\n".
"string, common, Common Name\n".
"int, lifespan, Lifespan";
"latin, string, Latin Name\n".
"common, string, Common Name\n".
"lifespan, int, Lifespan (years)";
$exampleData =
"Mercenaria mercenaria, hard clam, 40\n" .
@ -27,4 +27,18 @@ class TableController extends Controller
compact('exampleColSpec', 'exampleData')
);
}
public function storeNew(Request $request)
{
$this->validate($request, [
'table-name' => 'required',
'table-descr' => 'string|nullable',
'license' => 'string|nullable',
'upstream' => 'string|nullable',
'col-spec' => 'required',
'row-data' => 'string|nullable',
]);
return "Ok.";
}
}

@ -2,6 +2,7 @@
namespace App\Providers;
use App\View\WidgetFactory;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@ -25,6 +26,8 @@ class AppServiceProvider extends ServiceProvider
*/
public function register()
{
//
$this->app->singleton(WidgetFactory::class, function () {
return new WidgetFactory();
});
}
}

@ -53,7 +53,11 @@ class RouteServiceProvider extends ServiceProvider
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
->group(base_path('routes/public.php'));
Route::middleware(['web', 'auth'])
->namespace($this->namespace)
->group(base_path('routes/user.php'));
}
/**

@ -0,0 +1,108 @@
<?php
namespace App\View;
/**
* Widget
*
* @property-read string $name
* @property-read string $id
* @property-read string $label
* @property-read string|null $help
* @property-read string|null $value
* @property-read string $attributes
*/
class Widget
{
private $attributes = [],
$id, $name, $label, $value,
$viewName,
$help,
$style = [];
public function __construct($viewName, $name, $label)
{
$this->id = 'field-'.$name;
$this->name = $name;
$this->label = $label;
$this->viewName = $viewName;
}
// setting attributes via magic method
public function __call($method, $args)
{
static $cssProps = [
'height', 'minHeight', 'maxHeight'
];
if (empty($args)) $args = [''];
$arg = $args[0];
// css
$lccamel = $method;
if (in_array($lccamel, $cssProps)) {
return $this->css(kebab_case($lccamel), $arg);
}
if (property_exists($this, $method)) {
$this->$method = $arg;
}
else {
$this->attributes[$method] = $arg;
}
return $this;
}
public function css($prop, $val)
{
$this->style[$prop] = $val;
return $this;
}
public function __get($name)
{
if ($name == 'attributes') {
return $this->compileAttribs();
}
if ($name == 'value') {
return old($this->name, $this->value);
}
if (property_exists($this, $name)) {
return $this->$name;
}
return null;
}
public function compileAttribs()
{
// compile attribs string
$attribs_s = array_reduce(array_keys($this->attributes), function ($carry, $key) {
return $carry . ' ' . $key . '="' . e($this->attributes[$key]) . '"';
}, '');
// add a compiled list of styles
if (!empty($this->style)) {
$attribs_s .= 'style="'.trim(e(array_reduce(array_keys($this->style), function ($carry, $key) {
return $carry . $key . ': ' . $this->style[$key] . '; ';
}, ''))).'"';
}
return trim($attribs_s);
}
public function render()
{
return view('form.'.$this->viewName)->with(['w' => $this]);
}
public function __toString()
{
return (string) $this->render();
}
}

@ -0,0 +1,27 @@
<?php
namespace App\View;
class WidgetFactory
{
public function text($name, $label)
{
return new Widget('input', $name, $label);
}
public function number($name, $label)
{
return new Widget('number', $name, $label);
}
public function email($name, $label)
{
return new Widget('email', $name, $label);
}
public function textarea($name, $label)
{
return (new Widget('textarea', $name, $label))->minHeight('4em');
}
}

@ -217,6 +217,7 @@ return [
// sideload
'SocialAuth' => AdamWathan\EloquentOAuth\Facades\OAuth::class,
'Widget' => App\Facades\WidgetFacade::class,
],
// -------------- added keys --------------

@ -0,0 +1,386 @@
<!DOCTYPE html>
<html>
<head>
<title>fa-dtbl-1 glyphs preview</title>
<style>
/* Page Styles */
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: #fff;
color: #444;
font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a,
a:visited {
color: #888;
text-decoration: underline;
}
a:hover,
a:focus { color: #000; }
header {
border-bottom: 2px solid #ddd;
margin-bottom: 20px;
overflow: hidden;
padding: 20px 0;
}
header h1 {
color: #888;
float: left;
font-size: 36px;
font-weight: 300;
}
header a {
float: right;
font-size: 14px;
}
.container {
margin: 0 auto;
max-width: 1200px;
min-width: 960px;
padding: 0 40px;
width: 90%;
}
.glyph {
border-bottom: 1px dotted #ccc;
padding: 10px 0 20px;
margin-bottom: 20px;
}
.preview-glyphs { vertical-align: bottom; }
.preview-scale {
color: #888;
font-size: 12px;
margin-top: 5px;
}
.step {
display: inline-block;
line-height: 1;
position: relative;
width: 10%;
}
.step .letters,
.step i {
-webkit-transition: opacity .3s;
-moz-transition: opacity .3s;
-ms-transition: opacity .3s;
-o-transition: opacity .3s;
transition: opacity .3s;
}
.step:hover .letters { opacity: 1; }
.step:hover i { opacity: .3; }
.letters {
opacity: .3;
position: absolute;
}
.characters-off .letters { display: none; }
.characters-off .step:hover i { opacity: 1; }
.size-12 { font-size: 12px; }
.size-14 { font-size: 14px; }
.size-16 { font-size: 16px; }
.size-18 { font-size: 18px; }
.size-21 { font-size: 21px; }
.size-24 { font-size: 24px; }
.size-36 { font-size: 36px; }
.size-48 { font-size: 48px; }
.size-60 { font-size: 60px; }
.size-72 { font-size: 72px; }
.usage { margin-top: 10px; }
.usage input {
font-family: monospace;
margin-right: 3px;
padding: 2px 5px;
text-align: center;
}
.usage .point { width: 150px; }
.usage .class { width: 250px; }
footer {
color: #888;
font-size: 12px;
padding: 20px 0;
}
/* Icon Font: fa-dtbl-1 */
@font-face {
font-family: "fa-dtbl-1";
src: url("./fa-dtbl-1.eot");
src: url("./fa-dtbl-1.eot?#iefix") format("embedded-opentype"),
url("./fa-dtbl-1.woff2") format("woff2"),
url("./fa-dtbl-1.woff") format("woff"),
url("./fa-dtbl-1.ttf") format("truetype"),
url("./fa-dtbl-1.svg#fa-dtbl-1") format("svg");
font-weight: normal;
font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "fa-dtbl-1";
src: url("./fa-dtbl-1.svg#fa-dtbl-1") format("svg");
}
}
[data-icon]:before { content: attr(data-icon); }
[data-icon]:before,
.fa-check:before,
.fa-facebook-square:before,
.fa-floppy-o:before,
.fa-github:before,
.fa-google:before,
.fa-question-circle:before,
.fa-sign-in:before,
.fa-sign-out:before,
.fa-times:before,
.fa-trash-o:before,
.fa-user-circle-o:before,
.fa-user-plus:before {
display: inline-block;
font-family: "fa-dtbl-1";
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: 1;
text-decoration: inherit;
text-rendering: optimizeLegibility;
text-transform: none;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
}
.fa-check:before { content: "\f100"; }
.fa-facebook-square:before { content: "\f101"; }
.fa-floppy-o:before { content: "\f102"; }
.fa-github:before { content: "\f103"; }
.fa-google:before { content: "\f104"; }
.fa-question-circle:before { content: "\f105"; }
.fa-sign-in:before { content: "\f106"; }
.fa-sign-out:before { content: "\f107"; }
.fa-times:before { content: "\f108"; }
.fa-trash-o:before { content: "\f109"; }
.fa-user-circle-o:before { content: "\f10a"; }
.fa-user-plus:before { content: "\f10b"; }
</style>
<!--[if lte IE 8]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script>
function toggleCharacters() {
var body = document.getElementsByTagName('body')[0];
body.className = body.className === 'characters-off' ? '' : 'characters-off';
}
</script>
</head>
<body class="characters-off">
<div id="page" class="container">
<header>
<h1>fa-dtbl-1 contains 12 glyphs:</h1>
<a onclick="toggleCharacters(); return false;" href="#">Toggle Preview Characters</a>
</header>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-check" class="fa-check"></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-check" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf100;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-facebook-square" class="fa-facebook-square"></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-facebook-square" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf101;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-o"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-floppy-o" class="fa-floppy-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-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;#xf102;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-github" class="fa-github"></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-github" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf103;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-google" class="fa-google"></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-google" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf104;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-question-circle" class="fa-question-circle"></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-question-circle" />
<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-sign-in" class="fa-sign-in"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-sign-in" class="fa-sign-in"></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-sign-in" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf106;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-sign-out" class="fa-sign-out"></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-sign-out" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf107;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-times" class="fa-times"></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-times" />
<input class="class" type="text" readonly="readonly" onClick="this.select();" value=".fa-close" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf108;" />
</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;#xf109;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-o"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-user-circle-o" class="fa-user-circle-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-user-circle-o" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10a;" />
</div>
</div>
<div class="glyph">
<div class="preview-glyphs">
<span class="step size-12"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-plus"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="fa-user-plus" class="fa-user-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-user-plus" />
<input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf10b;" />
</div>
</div>
<footer>
Made with love using <a href="http://fontcustom.com">Font Custom</a>.
</footer>
</div>
</body>
</html>

@ -38,10 +38,15 @@
font-smoothing: antialiased;
}
.fa-facebook-square::before { content: "\f100"; }
.fa-github::before { content: "\f101"; }
.fa-google::before { content: "\f102"; }
.fa-sign-in::before { content: "\f103"; }
.fa-sign-out::before { content: "\f104"; }
.fa-user-circle-o::before { content: "\f105"; }
.fa-user-plus::before { content: "\f106"; }
.fa-check::before { content: "\f100"; }
.fa-facebook-square::before { content: "\f101"; }
.fa-floppy-o::before, .fa-save::before { content: "\f102"; }
.fa-github::before { content: "\f103"; }
.fa-google::before { content: "\f104"; }
.fa-question-circle::before { content: "\f105"; }
.fa-sign-in::before { content: "\f106"; }
.fa-sign-out::before { content: "\f107"; }
.fa-times::before, .fa-close::before { content: "\f108"; }
.fa-trash-o::before { content: "\f109"; }
.fa-user-circle-o::before { content: "\f10a"; }
.fa-user-plus::before { content: "\f10b"; }

Binary file not shown.

@ -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-16: Created with FontForge (http://fontforge.org)
2018-7-21: 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 Mon Jul 16 22:14:13 2018
Created by FontForge 20170805 at Sat Jul 21 17:17:47 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,32 +22,49 @@ The Fork Awesome font is licensed under the SIL OFL 1.1 (http://scripts.sil.org/
bbox="0 -256 2048 1536"
underline-thickness="89.6"
underline-position="-179.2"
unicode-range="U+0020-F106"
unicode-range="U+0020-F10B"
/>
<missing-glyph />
<glyph glyph-name="space" unicode=" " horiz-adv-x="200"
/>
<glyph glyph-name="facebook-square" unicode="&#xf100;"
<glyph glyph-name="check" unicode="&#xf100;" horiz-adv-x="1550"
d="M1550 970c0 -25 -10 -50 -28 -68l-724 -724l-136 -136c-18 -18 -43 -28 -68 -28s-50 10 -68 28l-136 136l-362 362c-18 18 -28 43 -28 68s10 50 28 68l136 136c18 18 43 28 68 28s50 -10 68 -28l294 -295l656 657c18 18 43 28 68 28s50 -10 68 -28l136 -136
c18 -18 28 -43 28 -68z" />
<glyph glyph-name="facebook-square" unicode="&#xf101;"
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="github" unicode="&#xf101;"
<glyph glyph-name="floppy-o" unicode="&#xf102;"
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="&#xf103;"
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="google" unicode="&#xf102;" horiz-adv-x="1505"
<glyph glyph-name="google" unicode="&#xf104;" 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="sign-in" unicode="&#xf103;"
<glyph glyph-name="question-circle" unicode="&#xf105;"
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="&#xf106;"
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="&#xf104;" horiz-adv-x="1568"
<glyph glyph-name="sign-out" unicode="&#xf107;" 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="user-circle-o" unicode="&#xf105;" horiz-adv-x="1792"
<glyph glyph-name="times" unicode="&#xf108;" horiz-adv-x="1188"
d="M1188 214c0 -25 -10 -50 -28 -68l-136 -136c-18 -18 -43 -28 -68 -28s-50 10 -68 28l-294 294l-294 -294c-18 -18 -43 -28 -68 -28s-50 10 -68 28l-136 136c-18 18 -28 43 -28 68s10 50 28 68l294 294l-294 294c-18 18 -28 43 -28 68s10 50 28 68l136 136
c18 18 43 28 68 28s50 -10 68 -28l294 -294l294 294c18 18 43 28 68 28s50 -10 68 -28l136 -136c18 -18 28 -43 28 -68s-10 -50 -28 -68l-294 -294l294 -294c18 -18 28 -43 28 -68z" />
<glyph glyph-name="trash-o" unicode="&#xf109;" 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-circle-o" unicode="&#xf10a;" 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="&#xf106;" horiz-adv-x="2048"
<glyph glyph-name="user-plus" unicode="&#xf10b;" 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" />

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Binary file not shown.

@ -7,6 +7,13 @@
require('./bootstrap');
$(function () {
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
})
})
//
// window.Vue = require('vue');
//

@ -25,8 +25,8 @@
@import "~bootstrap/scss/list-group";
@import "~bootstrap/scss/close";
@import "~bootstrap/scss/modal";
//@import "~bootstrap/scss/tooltip";
//@import "~bootstrap/scss/popover";
@import "~bootstrap/scss/tooltip";
@import "~bootstrap/scss/popover";
//@import "~bootstrap/scss/carousel";
@import "~bootstrap/scss/utilities";
//@import "~bootstrap/scss/print";

@ -19,3 +19,7 @@ $card-border-radius: 5px;
$card-inner-border-radius: 2px;
$list-group-hover-bg: rgba($primary, .1);
$tooltip-max-width: 300px;
$tooltip-bg: darken($primary, 20%);
$tooltip-arrow-color: $tooltip-bg;

@ -7,6 +7,18 @@
@import "variables";
@import "bst-modules";
html {
overflow-y: scroll;
}
.tooltip-inner {
text-align: left;
}
.tooltip-inner {
box-shadow: 0 2px 5px rgba(black, .3);
}
.page-navbar {
background: white;
border-bottom: 1px solid $primary;

@ -0,0 +1,11 @@
<div class="col-md-1 pl-0">
@if($w->help)
<i class="fa-question-circle"
data-toggle="tooltip"
data-placement="right"
@if(false!==strpos($w->help, '<'))
data-html="true"
@endif
title="{{ $w->help }}"></i>
@endif
</div>

@ -0,0 +1,21 @@
@php
/** @var \App\View\Widget $w */
@endphp
<div class="row form-group">
<label for="field-{{ $w->name }}" class="col-md-3 col-form-label text-md-right">{{ $w->label }}</label>
<div class="col-md-8 pl-0">
<input id="field-{{ $w->name }}"
name="{{ $w->name }}"
class="form-control{{ $errors->has($w->name) ? ' is-invalid' : '' }}"
value="{{ $w->value }}"
{!! $w->attributes !!}>
@if ($errors->has($w->name))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first($w->name) }}</strong>
</span>
@endif
</div>
@include('form._help')
</div>

@ -0,0 +1,20 @@
@php
/** @var \App\View\Widget $w */
@endphp
<div class="row form-group">
<label for="field-{{ $w->name }}" class="col-md-3 col-form-label text-md-right">{{ $w->label }}</label>
<div class="col-md-8 pl-0">
<textarea id="field-{{ $w->name }}"
name="{{ $w->name }}"
class="form-control{{ $errors->has($w->name) ? ' is-invalid' : '' }}"
{!! $w->attributes !!}>{{$w->value}}</textarea>
@if ($errors->has($w->name))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first($w->name) }}</strong>
</span>
@endif
</div>
@include('form._help')
</div>

@ -2,92 +2,49 @@
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="row form-group">
<label for="table-name" class="col-md-3 col-form-label text-md-right">Title</label>
<input id="table-name" name="table-name" class="form-control col-md-8" value="{{old('table-name')}}">
@if ($errors->has('table-name'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('table-name') }}</strong>
</span>
@endif
</div>
<div class="row form-group">
<label for="table-descr" class="col-md-3 col-form-label text-md-right">Description</label>
<textarea id="table-descr" name="table-descr" class="form-control col-md-8" style="height: 6em">{{--
--}}{{old('table-descr')}}{{--
--}}</textarea>
<form method="POST" action="{{route('table.storeNew')}}" class="row justify-content-center">
<h2>New Table</h2>
@if ($errors->has('table-descr'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('table-descr') }}</strong>
</span>
@endif
</div>
<div class="row form-group">
<label for="license" class="col-md-3 col-form-label text-md-right">License</label>
<input id="license" name="license" class="form-control col-md-8" value="{{old('license')}}">
@if ($errors->has('license'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('license', 'CC0') }}</strong>
</span>
@endif
</div>
@csrf
<div class="col-md-8">
{!! Widget::text('table-name', 'Title')->help('Unique among your tables') !!}
{!! Widget::textarea('table-descr', 'Description')->height('8em')
->help('Description what data is in the table. Please use the dedicated
fields for License and data source. URLs in a full format will be clickable.') !!}
{!! Widget::text('license', 'License')
->help('License applicable to the table\'s data, if any. By default, all
tables are CC0 or Public Domain.') !!}
{!! Widget::text('upstream', 'Adapted from')
->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('col-spec', 'Columns')->value($exampleColSpec)->height('8em')
->help('
<div class="text-left">
Column parameters in CSV format:
<ul class="pl-3 mb-0">
<li><b>column identifier</b><br>letters, numbers, underscore
<li><b>column data type</b><br>int, string, float, bool
<li><b>column title</b><br>used for display (optional)
</ul>
</div>') !!}
{!! Widget::textarea('row-data', 'Initial data')->value($exampleData)->height('12em')
->help('
Initial table data in CSV format, columns corresponding to the
specification you entered above.') !!}
<div class="row form-group">
<label for="upstream" class="col-md-3 col-form-label text-md-right">Adapted from</label>
<input id="upstream" name="upstream" class="form-control col-md-8" value="{{old('upstream')}}">
@if ($errors->has('upstream'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('upstream') }}</strong>
</span>
@endif
</div>
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-8">
<p>Insert the initial table definition and data in CSV format. Columns are defined as CSV rows:</p>
<ul>
<li>type (int, string, float, bool)
<li>column identifier (letters, numbers, and underscore only)
<li>user-friendly column title
</ul>
<div class="col-md-8 offset-md-3 pl-0">
<button type="submit" class="btn btn-primary">
<i class="fa-save pr-2"></i>Create New Table
</button>
</div>
</div>
<div class="row form-group">
<label for="col-spec" class="col-md-3 col-form-label text-md-right">Columns specification</label>
<textarea id="col-spec" name="col-spec" class="form-control col-md-8" style="height: 6em">{{--
--}}{{old('col-spec', $exampleColSpec)}}{{--
--}}</textarea>
@if ($errors->has('col-spec'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('col-spec') }}</strong>
</span>
@endif
</div>
<div class="row">
<label for="row-data" class="col-md-3 col-form-label text-md-right">Initial data</label>
<textarea id="row-data" name="row-data" class="form-control col-md-8" style="height: 16em">{{--
--}}{{old('row-data', $exampleData)}}{{--
--}}</textarea>
@if ($errors->has('row-data'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('row-data') }}</strong>
</span>
@endif
</div>
</div>
</div>
</form>
</div>
@endsection

@ -1,4 +1,5 @@
<?php
// auth related routes, using the web middleware
use SocialNorm\Exceptions\ApplicationRejectedException;
use SocialNorm\Exceptions\InvalidAuthorizationCodeException;

@ -0,0 +1,19 @@
<?php
// Routes using the web middleware
require "login.php";
Route::get('/about/terms', function () {
return view('about.terms');
});
Route::get('/about/privacy', function () {
return view('about.privacy');
});
Route::get('/', function () {
if (!Auth::guest()) {
return redirect('/home');
}
return view('welcome');
});

@ -0,0 +1,13 @@
<?php
// Routes using the web+auth middlewares
Route::get('/home', 'HomeController@index')->name('home');
// Table resource
Route::group([
'prefix' => 'table',
], function () {
Route::get('create', 'TableController@create')->name('table.create');
Route::post('create', 'TableController@storeNew')->name('table.storeNew');
});

@ -1,34 +0,0 @@
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
require "login.php";
Route::get('/about/terms', function () {
return view('about.terms');
});
Route::get('/about/privacy', function () {
return view('about.privacy');
});
Route::get('/', function () {
if (!Auth::guest()) {
return redirect('/home');
}
return view('welcome');
});
Route::get('/home', 'HomeController@index')->name('home');
Route::get('/table/create', 'TableController@create')->name('table.create');
Loading…
Cancel
Save