parent
25cb60d377
commit
eeaa837c29
@ -0,0 +1,18 @@ |
||||
<?php |
||||
|
||||
namespace App\Http\Controllers; |
||||
|
||||
use Illuminate\Http\Request; |
||||
|
||||
class TableController extends Controller |
||||
{ |
||||
/** |
||||
* SHow a form for creating a new table |
||||
* |
||||
* @return \Illuminate\Http\Response |
||||
*/ |
||||
public function create() |
||||
{ |
||||
return view('table.create'); |
||||
} |
||||
} |
@ -0,0 +1,47 @@ |
||||
/*! |
||||
* Based on Fork Awesome 1.1.0, originaly by Dave Gandy - http://forkawesome.github.io/Fork-Awesome/ |
||||
* License - http://forkawesome.github.io/Fork-Awesome//license (Font: SIL OFL 1.1, CSS: MIT License) |
||||
*/ |
||||
@font-face { |
||||
font-family: 'fa-dtbl-1'; |
||||
src: url('./fa-dtbl-1.eot?v=1.1.0'); |
||||
src: url('./fa-dtbl-1.eot?#iefix&v=1.1.0') format('embedded-opentype'), |
||||
url('./fa-dtbl-1.woff2?v=1.1.0') format('woff2'), |
||||
url('./fa-dtbl-1.ttf?v=1.1.0') format('truetype'), |
||||
url('./fa-dtbl-1.svg?v=1.1.0#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, [class^="fa-"]::before, [class*=" fa-"]::before { |
||||
display: inline-block; |
||||
font-family: "fa-dtbl-1"; |
||||
font-style: normal; |
||||
font-weight: normal; |
||||
font-variant: normal; |
||||
line-height: 1; |
||||
text-decoration: inherit; |
||||
font-size: inherit; |
||||
text-rendering: optimizeLegibility; |
||||
text-transform: none; |
||||
-moz-osx-font-smoothing: grayscale; |
||||
-webkit-font-smoothing: antialiased; |
||||
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"; } |
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,27 @@ |
||||
@extends('layouts.app') |
||||
|
||||
@section('content') |
||||
<div class="container"> |
||||
<div class="row justify-content-center"> |
||||
<div class="col-md-8"> |
||||
<div class="card"> |
||||
<div class="card-header">Privacy Statement</div> |
||||
|
||||
<div class="card-body"> |
||||
<p> |
||||
<i>datatable.directory</i> does not collect anything beyond what users |
||||
themselves enter in the application, plus limited data from OAuth providers |
||||
when a social login is used. User IP addresses and other data, such as the |
||||
user agent, are briefly stored in the web server log as a byproduct of the |
||||
server operation, and serve debugging purposes only. |
||||
</p> |
||||
|
||||
<p> |
||||
We do not share private data with any third parties. |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -1,23 +1,50 @@ |
||||
@extends('layouts.app') |
||||
|
||||
@section('content') |
||||
<div class="container"> |
||||
<div class="container"> |
||||
|
||||
<div class="row justify-content-center"> |
||||
<div class="col-md-8"> |
||||
<div class="card"> |
||||
<div class="card-header">Dashboard</div> |
||||
|
||||
<div class="card-body"> |
||||
@if (session('status')) |
||||
<div class="alert alert-success" role="alert"> |
||||
{{ session('status') }} |
||||
</div> |
||||
@endif |
||||
|
||||
You are logged in! |
||||
</div> |
||||
</div> |
||||
|
||||
{{-- Dash card --}} |
||||
<div class="col-md-8"> |
||||
<div class="card"> |
||||
<div class="card-header">Dashboard</div> |
||||
|
||||
<div class="card-body"> |
||||
@if (session('status')) |
||||
<div class="alert alert-success" role="alert"> |
||||
{{ session('status') }} |
||||
</div> |
||||
@endif |
||||
|
||||
<p>You are logged in!</p> |
||||
|
||||
<p>blabla dashboard things ...</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
{{-- Table list card --}} |
||||
<div class="col-md-4"> |
||||
<div class="card"> |
||||
<div class="card-header"> |
||||
<span class="d-inline-block">Your Tables</span> |
||||
<a href="{{route('table.create')}}" class="btn btn-sm btn-outline-light float-right" |
||||
style="margin-top:-2px; margin-bottom:-2px;">New</a> |
||||
</div> |
||||
|
||||
<div class="list-group list-group-flush"> |
||||
@if(count($tables) == 0) |
||||
<span class="list-group-item">No tables yet.</span> |
||||
@else |
||||
@foreach($tables as $table) |
||||
<a class="list-group-item list-group-item-action" href="">{{ $table->title }}</a> |
||||
@endforeach |
||||
{{ $tables->links() }} |
||||
@endif |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
||||
|
@ -1,89 +1,31 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
|
||||
<!-- CSRF Token --> |
||||
<meta name="csrf-token" content="{{ csrf_token() }}"> |
||||
<!-- CSRF Token --> |
||||
<meta name="csrf-token" content="{{ csrf_token() }}"> |
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title> |
||||
<title>{{ config('app.name', 'Laravel') }}</title> |
||||
|
||||
<!-- Scripts --> |
||||
<script src="{{ asset('js/app.js') }}" defer></script> |
||||
<!-- Scripts --> |
||||
<script src="{{ asset('js/app.js') }}" defer></script> |
||||
|
||||
<!-- Styles --> |
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet"> |
||||
<!-- Styles --> |
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet"> |
||||
<link href="{{ asset('fonts/fa-dtbl-1.css') }}" rel="stylesheet"> |
||||
</head> |
||||
<body> |
||||
<div id="app"> |
||||
<nav class="navbar navbar-expand-md navbar-light page-navbar"> |
||||
<div class="container"> |
||||
<a class="navbar-brand" href="{{ url('/') }}"> |
||||
{{ config('app.name', 'Laravel') }} |
||||
</a> |
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}"> |
||||
<span class="navbar-toggler-icon"></span> |
||||
</button> |
||||
<div id="app"> |
||||
@include('layouts.main-nav') |
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> |
||||
<!-- Left Side Of Navbar --> |
||||
<ul class="navbar-nav mr-auto"> |
||||
<main class="py-4"> |
||||
@yield('content') |
||||
</main> |
||||
|
||||
</ul> |
||||
|
||||
<!-- Right Side Of Navbar --> |
||||
<ul class="navbar-nav ml-auto"> |
||||
<!-- Authentication Links --> |
||||
@guest |
||||
<li class="nav-item"> |
||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a> |
||||
</li> |
||||
<li class="nav-item"> |
||||
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a> |
||||
</li> |
||||
@else |
||||
<li class="nav-item dropdown"> |
||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre> |
||||
{{ Auth::user()->name }} <span class="caret"></span> |
||||
</a> |
||||
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown"> |
||||
<a class="dropdown-item" href="{{ route('logout') }}" |
||||
onclick="event.preventDefault(); |
||||
document.getElementById('logout-form').submit();"> |
||||
{{ __('Logout') }} |
||||
</a> |
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"> |
||||
@csrf |
||||
</form> |
||||
</div> |
||||
</li> |
||||
@endguest |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</nav> |
||||
|
||||
<main class="py-4"> |
||||
@yield('content') |
||||
</main> |
||||
|
||||
<footer class="page-footer text-muted mt-2"> |
||||
<div class="container py-2 py-md-4"> |
||||
<ul class="d-flex p-0"> |
||||
<li class="d-inline-block mr-3"><a href="/about/privacy">Privacy Statement</a> |
||||
<li class="d-inline-block mr-3"><a href="/about/terms">Terms of Service</a> |
||||
</ul> |
||||
<p> |
||||
Maintained by <a href="https://www.ondrovo.com/">Ondřej Hruška</a> |
||||
(<a href="mailto:ondra@ondrovo.com">ondra@ondrovo.com</a>).<br> |
||||
Data tables are licensed CC0 (public domain), unless specified otherwise. |
||||
</p> |
||||
</div> |
||||
</footer> |
||||
</div> |
||||
@include('layouts.footer') |
||||
</div> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,13 @@ |
||||
<footer class="page-footer text-muted mt-2"> |
||||
<div class="container py-2 py-md-4"> |
||||
<ul class="d-flex p-0"> |
||||
<li class="d-inline-block mr-3"><a href="/about/privacy">Privacy Statement</a> |
||||
<li class="d-inline-block mr-3"><a href="/about/terms">Terms of Service</a> |
||||
</ul> |
||||
<p> |
||||
Maintained by <a href="https://www.ondrovo.com/">Ondřej Hruška</a> |
||||
(<a href="mailto:ondra@ondrovo.com">ondra@ondrovo.com</a>).<br> |
||||
Data tables are licensed CC0 (public domain), unless specified otherwise. |
||||
</p> |
||||
</div> |
||||
</footer> |
@ -0,0 +1,57 @@ |
||||
<nav class="navbar navbar-expand-md navbar-light page-navbar"> |
||||
<div class="container"> |
||||
<a class="navbar-brand" href="{{ url('/') }}"> |
||||
{{ config('app.name', 'Laravel') }} |
||||
</a> |
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" |
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}"> |
||||
<span class="navbar-toggler-icon"></span> |
||||
</button> |
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> |
||||
<!-- Left Side Of Navbar --> |
||||
<ul class="navbar-nav mr-auto"> |
||||
|
||||
</ul> |
||||
|
||||
<!-- Right Side Of Navbar --> |
||||
<ul class="navbar-nav ml-auto"> |
||||
<!-- Authentication Links --> |
||||
@guest |
||||
<li class="nav-item"> |
||||
<a class="nav-link" href="{{ route('login') }}"> |
||||
<i class="fa-sign-in pr-1"></i> |
||||
{{ __('Login') }} |
||||
</a> |
||||
</li> |
||||
<li class="nav-item"> |
||||
<a class="nav-link" href="{{ route('register') }}"> |
||||
<i class="fa-user-plus pr-1"></i> |
||||
{{ __('Register') }} |
||||
</a> |
||||
</li> |
||||
@else |
||||
<li class="nav-item dropdown"> |
||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" |
||||
aria-haspopup="true" aria-expanded="false" v-pre> |
||||
<i class="fa-user-circle-o pr-1"></i> |
||||
{{ Auth::user()->name }} <span class="caret"></span> |
||||
</a> |
||||
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown"> |
||||
<a class="dropdown-item" href="{{ route('logout') }}" |
||||
onclick="event.preventDefault(); document.getElementById('logout-form').submit();"> |
||||
<i class="fa-sign-out pr-1"></i> |
||||
{{ __('Logout') }} |
||||
</a> |
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;"> |
||||
@csrf |
||||
</form> |
||||
</div> |
||||
</li> |
||||
@endguest |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</nav> |
@ -1,37 +0,0 @@ |
||||
@extends('layouts.app') |
||||
|
||||
@section('content') |
||||
<div class="container"> |
||||
<div class="row justify-content-center"> |
||||
<div class="col-md-8"> |
||||
<div class="card"> |
||||
<div class="card-header">Privacy Statement</div> |
||||
|
||||
<div class="card-body"> |
||||
<p> |
||||
<i>datatable.directory</i> collects visit counts the purpose of submission |
||||
popularity ranking and internal statistics. User IP addresses and other |
||||
data, such as the user agent string, is briefly stored in the web server |
||||
log. This data is the byproduct of the server operation and serves debugging |
||||
purposes only. |
||||
</p> |
||||
|
||||
<p> |
||||
We store users' e-mail addresses for the purpose of login authentication, |
||||
together with other profile information entered by the user. Passwords |
||||
are securely hashed in the database; nonetheless users are encouraged to |
||||
use a unique password generated by a password manager, or use one of the |
||||
social login options, which removes the use of a password altogether. |
||||
</p> |
||||
|
||||
<p> |
||||
We do not share any data with any third parties, and do not use advertising |
||||
that would compromise user privacy. The website is supported entirely by |
||||
donations. |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -0,0 +1,12 @@ |
||||
@extends('layouts.app') |
||||
|
||||
@section('content') |
||||
<div class="container"> |
||||
<div class="row justify-content-center"> |
||||
{{-- Dash card --}} |
||||
<div class="col-md-8"> |
||||
asdf |
||||
</div> |
||||
</div> |
||||
</div> |
||||
@endsection |
@ -0,0 +1,67 @@ |
||||
<?php |
||||
|
||||
use SocialNorm\Exceptions\ApplicationRejectedException; |
||||
use SocialNorm\Exceptions\InvalidAuthorizationCodeException; |
||||
use SocialNorm\ProviderUser; |
||||
|
||||
Auth::routes(); |
||||
|
||||
// ----------------- SOCIAL LOGIN -------------------- |
||||
|
||||
function _loginVia($method) { |
||||
try { |
||||
SocialAuth::login($method, function (\App\Models\User $user, ProviderUser $details) { |
||||
// update user name first time user logs in |
||||
if (!$user->exists) { |
||||
$user->name = $details->nickname ?: ($details->full_name ?: $details->email); |
||||
} |
||||
|
||||
// set e-mail from provider data, only if user e-mail is empty |
||||
if ("$user->email" === "") { |
||||
$user->email = $details->email; |
||||
} |
||||
}); |
||||
} catch (ApplicationRejectedException $e) { |
||||
abort(401, $e->getMessage()); |
||||
} catch (InvalidAuthorizationCodeException $e) { |
||||
abort(401, $e->getMessage()); |
||||
} |
||||
return Redirect::intended(); |
||||
}; |
||||
|
||||
|
||||
Route::get('/auth/github/authorize', function() { |
||||
return SocialAuth::authorize('github'); |
||||
})->name('oauth-github-authorize'); |
||||
|
||||
Route::get('/auth/github/callback', function() { |
||||
return _loginVia('github'); |
||||
})->name('oauth-github-callback'); |
||||
|
||||
|
||||
Route::get('/auth/google/authorize', function() { |
||||
return SocialAuth::authorize('google'); |
||||
})->name('oauth-google-authorize'); |
||||
|
||||
Route::get('/auth/google/callback', function() { |
||||
return _loginVia('google'); |
||||
})->name('oauth-google-callback'); |
||||
|
||||
|
||||
Route::get('/auth/facebook/authorize', function() { |
||||
return SocialAuth::authorize('facebook'); |
||||
})->name('oauth-facebook-authorize'); |
||||
|
||||
Route::get('/auth/facebook/callback', function() { |
||||
return _loginVia('facebook'); |
||||
})->name('oauth-facebook-callback'); |
||||
|
||||
/* |
||||
Route::get('/auth/stack/authorize', function() { |
||||
return SocialAuth::authorize('stack'); |
||||
})->name('oauth-stack-authorize'); |
||||
|
||||
Route::get('/auth/stack/callback', function() { |
||||
return _loginVia('stack'); |
||||
})->name('oauth-stack-callback'); |
||||
*/ |
Loading…
Reference in new issue