fix greeter cookie expiration, move greeter to own file

pull/26/head
Ondřej Hruška 6 years ago
parent 6d7fdca6d2
commit e81ab50e8c
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      app/Http/Controllers/DashController.php
  2. 36
      resources/views/greeter.blade.php
  3. 32
      resources/views/welcome.blade.php

@ -16,7 +16,7 @@ class DashController extends Controller
$dismiss = false; $dismiss = false;
if ($request->has('dismiss-greeter')) { if ($request->has('dismiss-greeter')) {
$dismiss = Utils::parseBool01($request->get('dismiss-greeter')); $dismiss = Utils::parseBool01($request->get('dismiss-greeter'));
\Cookie::queue('dismiss-greeter', $dismiss); \Cookie::queue('dismiss-greeter', $dismiss, 24*60*365*10);
return back(); return back();
} }

@ -0,0 +1,36 @@
<div class="row justify-content-center">
<div class="col-md-12 mb-2 mb-md-4">
<div class="card">
<div class="card-body">
<a href="{{ route('dash', ['dismiss-greeter' => 1]) }}" class="button close" aria-label="Close">
<span aria-hidden="true">&times;</span>@sr(Close)
</a>
<h2>Welcome to datatable.directory!</h2>
<p>
This website is a place for sharing useful tables of structured data.
These can be cipher tables, character maps, lists of electronic components,
paper grades, page formats, or scientific datasets, such as lists of countries,
geographic features, celestial bodies, elements, nutrition values, etc.
Anything you can put in a table can be shared here, as long as it conforms to our
<a href="{{route('terms')}}">Terms of Service</a>. You can search, filter, and export
data from our tables to many different formats, such as JSON, XML, C structs, or CSV.
</p>
@guest
<p>
The table directory is open to anyone, and can be used without login. However,
you will miss out on some features, like the ability to create or edit tables,
post comments, or save export presets. You can <a href="/register">register</a> using
your e-mail and a password, or through <a href="{{route('oauth-google-authorize')}}">Google</a>,
<a href="{{route('oauth-github-authorize')}}">GitHub</a>,
or <a href="{{route('oauth-facebook-authorize')}}">Facebook</a>.
</p>
@endif
</div>{{-- end body --}}
</div>{{-- end card --}}
</div>{{-- end col --}}
</div>{{-- end row --}}

@ -4,37 +4,7 @@
@section('content') @section('content')
@if($showGreeter) @if($showGreeter)
<div class="row justify-content-center"> @include('greeter')
<div class="col-md-12 mb-2 mb-md-4">
<div class="card">
<div class="card-body">
<a href="{{ route('dash', ['dismiss-greeter' => 1]) }}" class="button close" aria-label="Close">
<span aria-hidden="true">&times;</span>@sr(Close)
</a>
<h2>Welcome to datatable.directory!</h2>
<p>
This website is a place for sharing useful tables of structured data.
These can be cipher tables, character maps, lists of electronic components,
paper grades, page formats, or scientific datasets, such as lists of countries,
geographic features, celestial bodies, elements, nutrition values, etc.
Anything you can put in a table can be shared here, as long as it conforms to our
<a href="{{route('terms')}}">Terms of Service</a>. You can search, filter, and export
data from our tables to many different formats, such as JSON, XML, C structs, or CSV.
</p>
<p>
The table directory is open to anyone, and can be used without login. However,
you will miss out on some features, like the ability to create or edit tables,
post comments, or save export presets. You can <a href="/register">register</a> using
your e-mail and a password, or through <a href="{{route('oauth-google-authorize')}}">Google</a>,
<a href="{{route('oauth-github-authorize')}}">GitHub</a>,
or <a href="{{route('oauth-facebook-authorize')}}">Facebook</a>.
</p>
</div>
</div>
</div>
</div>
@endif @endif
<div class="row justify-content-center"> <div class="row justify-content-center">

Loading…
Cancel
Save