[WIP] Setup of skeleton

This commit is contained in:
Ludovic CANDELLIER
2020-03-25 00:08:27 +01:00
parent baf8e13c25
commit 36267139a1
377 changed files with 18248 additions and 26 deletions

View File

@@ -0,0 +1,14 @@
@component('mail::message')
# Hello!
Your {{ config('app.name') }} account logged in from a new device.
> **Account:** {{ $account->email }}<br>
> **Time:** {{ $time->toCookieString() }}<br>
> **IP Address:** {{ $ipAddress }}<br>
> **Browser:** {{ $browser }}
If this was you, you can ignore this alert. If you suspect any suspicious activity on your account, please change your password.
Regards,<br>{{ config('app.name') }}
@endcomponent

View File

@@ -0,0 +1,3 @@
# Charts Views
All the charts views are located in this folder

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,29 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
window.{{ $chart->id }} = c3.generate({
bindto: '#{{ $chart->id }}',
data: data,
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
{{ $chart->id }}.load(data);
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,2 @@
<canvas style="display: none;" id="{{ $chart->id }}" {!! $chart->formatContainerOptions('html') !!}></canvas>
@include('charts::loader')

View File

@@ -0,0 +1,41 @@
@foreach ($chart->plugins as $plugin)
@include($chart->pluginsViews[$plugin]);
@endforeach
<script {!! $chart->displayScriptAttributes() !!}>
var ctvChart = document.getElementById('{{ $chart->id }}').getContext('2d');
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
window.{{ $chart->id }} = new Chart(document.getElementById("{{ $chart->id }}").getContext("2d"), {
type: {!! $chart->type ? "'{$chart->type}'" : 'data[0].type' !!},
data: {
labels: {!! $chart->formatLabels() !!},
datasets: data
},
options: {!! $chart->formatOptions(true) !!},
plugins: {!! $chart->formatPlugins(true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.data.datasets = data;
{{ $chart->id }}.update();
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,29 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
window.{{ $chart->id }} = echarts.init(document.getElementById("{{ $chart->id }}"),'{{ $chart->theme }}');
window.{{ $chart->id }}.setOption({
series: data,
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.setOption({series: data});
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}">
</div>
@include('charts::loader')

View File

@@ -0,0 +1,44 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_getType(data) {
var special_datasets = {!! json_encode($chart->special_datasets) !!};
for (var i = 0; i < special_datasets.length; i++) {
for (var k = 0; k < data.length; k++) {
if (special_datasets[i] == data[k].chartType) {
return special_datasets[i];
}
}
}
return 'axis-mixed';
}
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
window.{{ $chart->id }} = new frappe.Chart("#{{ $chart->id }}", {
{!! $chart->formatContainerOptions('js') !!}
labels: {!! $chart->formatLabels() !!},
type: {{ $chart->id }}_getType(data),
data: {
labels: {!! $chart->formatLabels() !!},
datasets: data
},
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.update({labels: {!! $chart->formatLabels() !!}, datasets: data});
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,48 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
@if ($chart->type)
let {{ $chart->id }}_type = {{ $chart->type }}
@else
let {{ $chart->id }}_type = data[0].renderAs;
@endif
if (!{!! json_encode($chart->keepType) !!}.includes({{ $chart->id }}_type)) {
{{ $chart->id }}_type = "{{ $chart->comboType }}"
}
FusionCharts.ready(function () {
window.{{ $chart->id }} = new FusionCharts({
type: {{ $chart->id }}_type,
renderAt: "{{ $chart->id }}",
dataFormat: 'json',
{!! $chart->formatContainerOptions('js', true) !!}
dataSource: {
categories: [{
category: {!! $chart->formatLabels() !!}
}],
dataset: data,
chart: {!! $chart->formatOptions(true) !!}
}
}).render();
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
let chartData = {{ $chart->id }}.getChartData("json");
chartData.dataset = data;
{{ $chart->id }}.setChartData(chartData, "json");
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,3 @@
<div id="{{ $chart->id }}" {!! $chart->formatContainerOptions('css') !!}>
</div>
@include('charts::loader')

View File

@@ -0,0 +1,27 @@
<script {!! $chart->displayScriptAttributes() !!}>
function {{ $chart->id }}_create(data) {
{{ $chart->id }}_rendered = true;
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
window.{{ $chart->id }} = new Highcharts.Chart("{{ $chart->id }}", {
series: data,
{!! $chart->formatOptions(false, true) !!}
});
}
@if ($chart->api_url)
let {{ $chart->id }}_refresh = function (url) {
document.getElementById("{{ $chart->id }}").style.display = 'none';
document.getElementById("{{ $chart->id }}_loader").style.display = 'flex';
if (typeof url !== 'undefined') {
{{ $chart->id }}_api_url = url;
}
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => {
document.getElementById("{{ $chart->id }}_loader").style.display = 'none';
document.getElementById("{{ $chart->id }}").style.display = 'block';
{{ $chart->id }}.update({series: data});
});
};
@endif
@include('charts::init')
</script>

View File

@@ -0,0 +1,17 @@
let {{ $chart->id }}_rendered = false;
@if ($chart->api_url)
let {{ $chart->id }}_api_url = "{!! $chart->api_url !!}";
@endif
let {{ $chart->id }}_load = function () {
if (document.getElementById("{{ $chart->id }}") && !{{ $chart->id }}_rendered) {
@if ($chart->api_url)
fetch({{ $chart->id }}_api_url)
.then(data => data.json())
.then(data => { {{ $chart->id }}_create(data) });
@else
{{ $chart->id }}_create({!! $chart->formatDatasets() !!})
@endif
}
};
window.addEventListener("load", {{ $chart->id }}_load);
document.addEventListener("turbolinks:load", {{ $chart->id }}_load);

View File

@@ -0,0 +1,40 @@
<div id="{{ $chart->id }}_loader" style="
display: flex;
justify-content: center;
opacity: {{ $chart->loader ? '1' : '0' }};
align-items: center;
{{ $chart->height ? 'height: ' . $chart->height . 'px;' : '' }}
{{ $chart->width ? 'width: ' . $chart->width . 'px;' : '' }}
">
<svg width="50" height="50" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
<stop stop-color="{{ $chart->loaderColor }}" stop-opacity="0" offset="0%"/>
<stop stop-color="{{ $chart->loaderColor }}" stop-opacity=".631" offset="63.146%"/>
<stop stop-color="{{ $chart->loaderColor }}" offset="100%"/>
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<g transform="translate(1 1)">
<path d="M36 18c0-9.94-8.06-18-18-18" id="Oval-2" stroke="url(#a)" stroke-width="2">
<animateTransform
attributeName="transform"
type="rotate"
from="0 18 18"
to="360 18 18"
dur="0.9s"
repeatCount="indefinite" />
</path>
<circle fill="{{ $chart->loaderColor }}" cx="36" cy="18" r="1">
<animateTransform
attributeName="transform"
type="rotate"
from="0 18 18"
to="360 18 18"
dur="0.9s"
repeatCount="indefinite" />
</circle>
</g>
</g>
</svg>
</div>

View File

@@ -0,0 +1,12 @@
(function(window,$){
$.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{csrf_token()}}'}});
window.LaravelDataTables = window.LaravelDataTables || {};
@foreach($editors as $editor)
var {{$editor->instance}} = window.LaravelDataTables["%1$s-{{$editor->instance}}"] = new $.fn.dataTable.Editor({!! $editor->toJson() !!});
{!! $editor->scripts !!}
@foreach ((array) $editor->events as $event)
{{$editor->instance}}.on('{!! $event['event'] !!}', {!! $event['script'] !!});
@endforeach
@endforeach
window.LaravelDataTables["%1$s"] = $("#%1$s").DataTable(%2$s);
})(window,jQuery);

View File

@@ -0,0 +1,6 @@
window.LaravelDataTables = window.LaravelDataTables || {};
window.LaravelDataTables.options = %2$s
window.LaravelDataTables.editors = [];
@foreach($editors as $editor)
window.LaravelDataTables.editors["{{$editor->instance}}"] = {!! $editor->toJson() !!}
@endforeach

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Print Table</title>
<meta charset="UTF-8">
<meta name=description content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<style>
body {margin: 20px}
</style>
</head>
<body>
<table class="table table-bordered table-condensed table-striped">
@foreach($data as $row)
@if ($row == reset($data))
<tr>
@foreach($row as $key => $value)
<th>{!! $key !!}</th>
@endforeach
</tr>
@endif
<tr>
@foreach($row as $key => $value)
@if(is_string($value) || is_numeric($value))
<td>{!! $value !!}</td>
@else
<td></td>
@endif
@endforeach
</tr>
@endforeach
</table>
</body>
</html>

View File

@@ -0,0 +1 @@
(function(window,$){window.LaravelDataTables=window.LaravelDataTables||{};window.LaravelDataTables["%1$s"]=$("#%1$s").DataTable(%2$s);})(window,jQuery);

View File

@@ -0,0 +1,56 @@
<script>
jQuery(document).ready(function(){
$("<?= $validator['selector']; ?>").each(function() {
$(this).validate({
errorElement: 'span',
errorClass: 'help-block error-help-block',
errorPlacement: function (error, element) {
if (element.parent('.input-group').length ||
element.prop('type') === 'checkbox' || element.prop('type') === 'radio') {
error.insertAfter(element.parent());
// else just place the validation message immediately after the input
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error'); // add the Bootstrap error class to the control group
},
<?php if (isset($validator['ignore']) && is_string($validator['ignore'])): ?>
ignore: "<?= $validator['ignore']; ?>",
<?php endif; ?>
/*
// Uncomment this to mark as validated non required fields
unhighlight: function(element) {
$(element).closest('.form-group').removeClass('has-error').addClass('has-success');
},
*/
success: function (element) {
$(element).closest('.form-group').removeClass('has-error').addClass('has-success'); // remove the Boostrap error class from the control group
},
focusInvalid: false, // do not focus the last invalid input
<?php if (Config::get('jsvalidation.focus_on_error')): ?>
invalidHandler: function (form, validator) {
if (!validator.numberOfInvalids())
return;
$('html, body').animate({
scrollTop: $(validator.errorList[0].element).offset().top
}, <?= Config::get('jsvalidation.duration_animate') ?>);
$(validator.errorList[0].element).focus();
},
<?php endif; ?>
rules: <?= json_encode($validator['rules']); ?>
});
});
});
</script>

View File

@@ -0,0 +1,55 @@
<script>
jQuery(document).ready(function(){
$("<?= $validator['selector']; ?>").each(function() {
$(this).validate({
errorElement: 'span',
errorClass: 'invalid-feedback',
errorPlacement: function (error, element) {
if (element.parent('.input-group').length ||
element.prop('type') === 'checkbox' || element.prop('type') === 'radio') {
error.insertAfter(element.parent());
// else just place the validation message immediately after the input
} else {
error.insertAfter(element);
}
},
highlight: function (element) {
$(element).closest('.form-control').removeClass('is-valid').addClass('is-invalid'); // add the Bootstrap error class to the control group
},
<?php if (isset($validator['ignore']) && is_string($validator['ignore'])): ?>
ignore: "<?= $validator['ignore']; ?>",
<?php endif; ?>
unhighlight: function(element) {
$(element).closest('.form-control').removeClass('is-invalid').addClass('is-valid');
},
success: function (element) {
$(element).closest('.form-control').removeClass('is-invalid').addClass('is-valid'); // remove the Boostrap error class from the control group
},
focusInvalid: false, // do not focus the last invalid input
<?php if (Config::get('jsvalidation.focus_on_error')): ?>
invalidHandler: function (form, validator) {
if (!validator.numberOfInvalids())
return;
$('html, body').animate({
scrollTop: $(validator.errorList[0].element).offset().top
}, <?= Config::get('jsvalidation.duration_animate') ?>);
$(validator.errorList[0].element).focus();
},
<?php endif; ?>
rules: <?= json_encode($validator['rules']); ?>
});
});
});
</script>

View File

@@ -0,0 +1,11 @@
@component('mail::message')
One last step!
@component('mail::button', ['url' => route('email-verification.check', $user->verification_token) . '?email=' . urlencode($user->email) ])
Click here to verify your account
@endcomponent
Thanks,<br>
{{ config('app.name') }}
@endcomponent

View File

@@ -0,0 +1 @@
Click here to verify your account: <a href="{{ $link = route('email-verification.check', $user->verification_token) . '?email=' . urlencode($user->email) }}">{{ $link }}</a>

View File

@@ -0,0 +1,26 @@
@extends('layouts.app')
<!-- Main Content -->
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">{!! trans('laravel-user-verification::user-verification.verification_error_header') !!}</div>
<div class="panel-body">
<span class="help-block">
<strong>{!! trans('laravel-user-verification::user-verification.verification_error_message') !!}</strong>
</span>
<div class="form-group">
<div class="col-md-12">
<a href="{{url('/')}}" class="btn btn-primary">
{!! trans('laravel-user-verification::user-verification.verification_error_back_button') !!}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

View File

@@ -0,0 +1 @@
<img{!! $attributeString !!} src="{{ $media->getUrl($conversion) }}" alt="{{ $media->name }}">

View File

@@ -0,0 +1,6 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0"
y="0" viewBox="0 0 {{ $originalImageWidth }} {{ $originalImageHeight }}">
<image width="{{ $originalImageWidth }}" height="{{ $originalImageHeight }}" xlink:href="{{ $tinyImageBase64 }}">
</image>
</svg>

After

Width:  |  Height:  |  Size: 429 B

View File

@@ -0,0 +1 @@
<img{!! $attributeString !!} srcset="{{ $media->getSrcset($conversion) }}" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}">

View File

@@ -0,0 +1 @@
<img{!! $attributeString !!} srcset="{{ $media->getSrcset($conversion) }}" onload="this.onload=null;this.sizes=Math.ceil(this.getBoundingClientRect().width/window.innerWidth*100)+'vw';" sizes="1px" src="{{ $media->getUrl($conversion) }}" width="{{ $width }}">