added terms pages and a footer

pull/26/head
Ondřej Hruška 6 years ago
parent aaf2a97627
commit 63e68ae0fe
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      porklib/Providers/BladeExtensionsProvider.php
  2. 3591
      public/css/app.css
  3. 1
      public/googlefb4c9edefa42af38.html
  4. 55172
      public/js/app.js
  5. 27
      resources/assets/js/app.js
  6. 50
      resources/assets/js/bootstrap.js
  7. 4
      resources/assets/sass/_bst-base.scss
  8. 32
      resources/assets/sass/_bst-modules.scss
  9. 10
      resources/assets/sass/_variables.scss
  10. 15
      resources/assets/sass/app.scss
  11. 20
      resources/views/auth/login.blade.php
  12. 8
      resources/views/auth/register.blade.php
  13. 16
      resources/views/layouts/app.blade.php
  14. 37
      resources/views/privacy.blade.php
  15. 46
      resources/views/terms.blade.php
  16. 9
      routes/web.php
  17. 17
      webpack.mix.js

@ -73,6 +73,10 @@ class BladeExtensionsProvider extends ServiceProvider
Blade::if('admin', function () { Blade::if('admin', function () {
return \Auth::user()->isAdmin(); return \Auth::user()->isAdmin();
}); });
Blade::if('set', function ($x) {
return config($x) != '';
});
} }
/** /**

3591
public/css/app.css vendored

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
google-site-verification: googlefb4c9edefa42af38.html

55172
public/js/app.js vendored

File diff suppressed because it is too large Load Diff

@ -7,16 +7,17 @@
require('./bootstrap'); require('./bootstrap');
window.Vue = require('vue'); //
// 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 // * Next, we will create a fresh Vue application instance and attach it to
* or customize the JavaScript scaffolding to fit your unique needs. // * 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')); //
// Vue.component('example-component', require('./components/ExampleComponent.vue'));
const app = new Vue({ //
el: '#app' // const app = new Vue({
}); // el: '#app'
// });

@ -1,6 +1,6 @@
window._ = require('lodash'); // window._ = require('lodash');
window.Popper = require('popper.js').default; // window.Popper = require('popper.js').default;
/** /**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support * We'll load jQuery and the Bootstrap jQuery plugin which provides support
@ -14,29 +14,29 @@ try {
require('bootstrap'); require('bootstrap');
} catch (e) {} } catch (e) {}
/** // /**
* We'll load the axios HTTP library which allows us to easily issue requests // * We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the // * to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie. // * CSRF token as a header based on the value of the "XSRF" token cookie.
*/ // */
//
window.axios = require('axios'); // window.axios = require('axios');
//
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; // window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
//
/** // /**
* Next we will register the CSRF Token as a common header with Axios so that // * Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just // * all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually. // * a simple convenience so we don't have to attach every token manually.
*/ // */
//
let token = document.head.querySelector('meta[name="csrf-token"]'); // let token = document.head.querySelector('meta[name="csrf-token"]');
//
if (token) { // if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; // window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else { // } else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); // console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
} // }
/** /**
* Echo exposes an expressive API for subscribing to channels and listening * Echo exposes an expressive API for subscribing to channels and listening

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

@ -0,0 +1,32 @@
@import "~bootstrap/scss/root";
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/type";
//@import "~bootstrap/scss/images";
@import "~bootstrap/scss/code";
@import "~bootstrap/scss/grid";
@import "~bootstrap/scss/tables";
@import "~bootstrap/scss/forms";
@import "~bootstrap/scss/buttons";
@import "~bootstrap/scss/transitions";
@import "~bootstrap/scss/dropdown";
@import "~bootstrap/scss/button-group";
//@import "~bootstrap/scss/input-group";
//@import "~bootstrap/scss/custom-forms";
//@import "~bootstrap/scss/nav";
@import "~bootstrap/scss/navbar";
@import "~bootstrap/scss/card";
//@import "~bootstrap/scss/breadcrumb";
@import "~bootstrap/scss/pagination";
@import "~bootstrap/scss/badge";
//@import "~bootstrap/scss/jumbotron";
@import "~bootstrap/scss/alert";
//@import "~bootstrap/scss/progress";
@import "~bootstrap/scss/media";
@import "~bootstrap/scss/list-group";
@import "~bootstrap/scss/close";
@import "~bootstrap/scss/modal";
//@import "~bootstrap/scss/tooltip";
//@import "~bootstrap/scss/popover";
//@import "~bootstrap/scss/carousel";
@import "~bootstrap/scss/utilities";
//@import "~bootstrap/scss/print";

@ -3,6 +3,12 @@
$body-bg: #f5f8fa; $body-bg: #f5f8fa;
// Typography // Typography
$font-family-sans-serif: "Raleway", sans-serif; $font-family-sans-serif: "IBM Plex Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
$font-size-base: 0.9rem; $font-size-base: 1rem;
$line-height-base: 1.6; $line-height-base: 1.6;
$link-color: $gray-800;
$link-decoration: none;
$link-hover-color: darken($link-color, 15%);
$link-hover-decoration: underline;

@ -3,12 +3,17 @@
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
// Variables // Variables
@import "bst-base";
@import "variables"; @import "variables";
@import "bst-modules";
// Bootstrap .page-navbar {
@import '~bootstrap/scss/bootstrap'; background: white;
border-bottom: 1px solid $gray-400;
}
.navbar-laravel { .page-footer {
background-color: #fff; font-size: 95%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); background: $body-bg;
border-top: 2px solid white;
} }

@ -63,18 +63,30 @@
</form> </form>
</div> </div>
<div class="card-body"> <div class="card-footer bg-white">
<div class="form-group row mb-0">
<span class="col-md-4 col-form-label text-md-right">{{ __('Log in with') }}</span>
<div class="col-md-6">
@set('services.oauth_providers.github.client_id')
<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark"> <a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark">
{{ __('Login with GitHub') }} {{ __('GitHub') }}
</a> </a>
@endset
@set('services.oauth_providers.google.client_id')
<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark"> <a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark">
{{ __('Login with Google') }} {{ __('Google') }}
</a> </a>
@endset
@set('services.oauth_providers.facebook.client_id')
<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark"> <a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark">
{{ __('Login with Facebook') }} {{ __('Facebook') }}
</a> </a>
@endset
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -70,6 +70,14 @@
</div> </div>
</form> </form>
</div> </div>
<div class="card-footer text-muted">
You can also log in with
<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>,
without the need to register.
</div>
</div> </div>
</div> </div>
</div> </div>

@ -18,7 +18,7 @@
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<nav class="navbar navbar-expand-md navbar-light navbar-laravel"> <nav class="navbar navbar-expand-md navbar-light page-navbar">
<div class="container"> <div class="container">
<a class="navbar-brand" href="{{ url('/') }}"> <a class="navbar-brand" href="{{ url('/') }}">
{{ config('app.name', 'Laravel') }} {{ config('app.name', 'Laravel') }}
@ -70,6 +70,20 @@
<main class="py-4"> <main class="py-4">
@yield('content') @yield('content')
</main> </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> </div>
</body> </body>
</html> </html>

@ -0,0 +1,37 @@
@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,46 @@
@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">Terms of Service</div>
<div class="card-body">
<p>
<i>datatable.directory</i> is provided, free of charge, to the public,
with the expectation of being a useful development tool for sharing
tables of structured data. The directory hosts user-provided contents
and disclaims any responsibility for the correctness and applicability
of the data for any purpose.
</p>
<p>
The goal of the website is to share structured data, such as the periodic
table, lists of countries, morse codes, word frequency and transliteration
tables, etc.
</p>
<p>
It is forbidden to share personal information ("doxxing"), proprietary
data that cannot be freely shared due to license terms, licensed data
without listing the author and the applicable license, sexually explicit
content, and anything against the law (this includes pirate download links,
torrent tracker lists, etc.).
</p>
<p>
The site operator reserves the right to hide any objectionable content
until the problem is rectified, or delete such content. Engagement in
harassment, racism, sexism, or other antisocial behavior within the site
may result in account closure, and any such content will be deleted.
Users can report problematic submissions using the report button on the
submission detail page.
</p>
</div>
</div>
</div>
</div>
</div>
@endsection

@ -16,6 +16,15 @@ use SocialNorm\Exceptions\InvalidAuthorizationCodeException;
Auth::routes(); Auth::routes();
Route::get('/about/terms', function () {
return view('terms');
});
Route::get('/about/privacy', function () {
return view('privacy');
});
Route::get('/', function () { Route::get('/', function () {
if (!Auth::guest()) { if (!Auth::guest()) {
return redirect('/home'); return redirect('/home');

17
webpack.mix.js vendored

@ -1,4 +1,5 @@
let mix = require('laravel-mix'); let mix = require('laravel-mix');
let webpack = require('webpack');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -11,5 +12,21 @@ let mix = require('laravel-mix');
| |
*/ */
mix.webpackConfig({
// Force jquery slim - https://code.luasoftware.com/tutorials/webpack/force-jquery-slim-import-in-webpack/
resolve: {
extensions: ['.js'],
alias: {
'jquery': 'jquery/dist/jquery.slim.js',
}
},
plugins: [
new webpack.ProvidePlugin({
'$': 'jquery',
jQuery: 'jquery',
}),
],
});
mix.js('resources/assets/js/app.js', 'public/js') mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css'); .sass('resources/assets/sass/app.scss', 'public/css');

Loading…
Cancel
Save