more sr friendly

This commit is contained in:
2018-07-28 12:01:12 +02:00
parent 72011feea9
commit 59e6649a1d
23 changed files with 432 additions and 250 deletions
+24 -20
View File
@@ -5,7 +5,9 @@
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Login') }}</div>
<div class="card-header">
<h1>{{ __('Login') }}</h1>
</div>
<div class="card-body">
<form method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}">
@@ -18,11 +20,11 @@
{!! Widget::checkbox('remember', 'Remember Me')->checked(false) !!}
<div class="form-group row mb-0">
<div class="col-md-8 offset-md-4">
<button type="submit" class="btn btn-primary">{{ __('Login') }}</button>{{--
--}}<a class="btn btn-link" href="{{ route('password.request') }}">{{ __('Forgot Your Password?') }}</a>{{--
--}}<a class="btn btn-link pl-0" href="{{ route('register') }}">{{ __('Register') }}</a>
</div>
<ul class="col-md-8 offset-md-4 sr-list">
<li><button type="submit" class="btn btn-primary">{{ __('Login') }}</button>
<li><a class="btn btn-link pr-1 pl-2" href="{{ route('password.request') }}">{{ __('Forgot Your Password?') }}</a>
<li><a class="btn btn-link px-1" href="{{ route('register') }}">{{ __('Register') }}</a>
</ul>
</div>
</form>
</div>
@@ -31,28 +33,30 @@
<div class="form-group row mb-0">
<span class="col-md-4 col-form-label text-md-right text-muted">…or authenticate with</span>
<div class="col-md-6">
<ul class="col-md-6 sr-list">
{{-- end-li's deliberately missing to suppress spaces --}}
@set('services.oauth_providers.github.client_id')
<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark">
<i class="fa-github pr-1"></i>
{{ __('GitHub') }}
</a>
<li>
<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark">
@icon(fa-github fa-pr){{ __('GitHub') }}
</a>
@endset
@set('services.oauth_providers.google.client_id')
<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark">
<i class="fa-google pr-1"></i>
{{ __('Google') }}
</a>
<li>
<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark">
@icon(fa-google fa-pr){{ __('Google') }}
</a>
@endset
@set('services.oauth_providers.facebook.client_id')
<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark">
<i class="fa-facebook-square pr-1"></i>
{{ __('Facebook') }}
</a>
<li>
<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark">
@icon(fa-facebook-square){{ __('Facebook') }}
</a>
@endset
</div>
</ul>
</div>
</div>
</div>
+3 -1
View File
@@ -5,7 +5,9 @@
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Register') }}</div>
<div class="card-header">
<h1>{{ __('Register') }}</h1>
</div>
<div class="card-body">
<form method="POST" action="{{ route('register') }}" aria-label="{{ __('Register') }}">
+11 -6
View File
@@ -1,18 +1,23 @@
{{-- Global footer --}}
<footer class="page-footer text-muted mt-2">
<h2 class="sr-only">Footer</h2>
<div class="container py-2 py-md-4">
<nav aria-label="Footer links" class="d-flex">
<div>
Developed & maintained by <a href="https://www.ondrovo.com/">Ondřej Hruška</a>
&lt;<a href="mailto:ondra@ondrovo.com">ondra@ondrovo.com</a>&gt; &copy; 2018<br>
Data tables are licensed CC0 (public domain), unless specified otherwise.
&copy; 2018<br>
Data tables are CC0 / Public Domain, unless specified otherwise.
</div>
<div class="ml-auto">
<a href="/about/privacy" class="ml-3">Privacy</a>
<a href="/about/terms" class="ml-3">Terms</a>
</div>
<nav class="ml-auto d-block">
<h3 class="sr-only">Useful links:</h3>
<ul class="sr-list">
<li><a href="/about/privacy" class="ml-2">Privacy</a>
<li><a href="/about/terms" class="ml-2">Terms</a>
<li><a href="mailto:admin@datatable.directory?subject=Feedback" class="ml-2">Contact</a>
</ul>
</nav>
</nav>
</div>
</footer>
+6 -7
View File
@@ -2,8 +2,8 @@
<nav class="navbar navbar-expand-md navbar-light page-navbar">
<div class="container">
<a class="navbar-brand" href="{{ url('/') }}">
<img src="/images/logo.svg" alt="Logo" height="32px" style="margin: -10px 0" class="mr-2">{{--
<a class="navbar-brand" href="{{ url('/') }}" aria-label="Go to Dashboard">
<img src="/images/logo.svg" aria-hidden=true alt="LOGO" height="32px" style="margin: -10px 0" class="mr-2">{{--
--}}datatable.directory
</a>
@@ -14,6 +14,7 @@
aria-controls="mainNavContent"
aria-expanded="false"
aria-label="{{ __('Toggle navigation') }}">
<span class="sr-only">Toggle navigation</span>
<span class="navbar-toggler-icon"></span>
</button>
@@ -23,24 +24,22 @@
@guest()
<li class="nav-item">
<a class="nav-link" href="{{ route('login') }}">
<i class="fa-sign-in pr-1"></i>
@icon(fa-sign-in pr-1)
{{ __('Login') }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">
<i class="fa-user-plus pr-1"></i>
@icon(fa-user-plus pr-1)
{{ __('Register') }}
</a>
</li>
@else
@include('layouts.nav-buttons', ['dropdown' => false])
<li class="nav-item dropdown mobile-only">
<a id="mainNavDropdown" 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 fa-pr"></i>{{--
@icon(fa-user-circle-o fa-pr){{--
--}}{{ user()->title }} <span class="caret"></span>
</a>
@@ -1,7 +1,6 @@
@php
$li = $dropdown ? '' : '<li class="nav-item ml-1 d-md-none">';
$endli = $dropdown ? '' : '</li>';
$aclass = $dropdown ? 'dropdown-item' : 'nav-link';
@endphp
@@ -10,13 +9,11 @@ $aclass = $dropdown ? 'dropdown-item' : 'nav-link';
<a class="{{ $aclass }}" href="{{ route('profile.edit') }}">
<i class="fa-sliders fa-pr"></i>{{ __('Profile') }}
</a>
{!! $endli !!}
{!! $li !!}
<a class="{{ $aclass }}" href="{{ route('account.edit') }}">
<i class="fa-key-modern fa-pr"></i>{{ __('Account') }}
</a>
{!! $endli !!}
{!! $li !!}
<a class="{{ $aclass }}" href="{{ route('logout') }}"
@@ -24,4 +21,3 @@ $aclass = $dropdown ? 'dropdown-item' : 'nav-link';
{{-- this is some hack against CSRF - logout only via POST --}}
<i class="fa-sign-out fa-pr"></i>{{ __('Logout') }}
</a>
{!! $endli !!}
+33 -15
View File
@@ -3,25 +3,43 @@
<span class="list-group-item">No tables yet.</span>
@else
@foreach($tables as $table)
@php
$forks = $table->forks()->count();
$faves = $table->favouritingUsers()->count();
$revs = $table->revisions()->count();
$rows = $table->revision->row_count;
@endphp
<a class="list-group-item list-group-item-action"
href="{{$table->viewPage}}">
<span class="d-block row">
<span class="d-inline-block col-10">
<i class="fa-table fa-pr"></i>{{ $table->title }}
</span>{{--
--}}<span class="d-inline-block col-2 small text-right">
{{ $table->revision->row_count }} rows
</span>
<span class="d-block row">{{-- this must be span so that Lynx includes the table name in the anchor --}}
<div class="d-inline-block col-7">
@icon(fa-table fa-pr){{ $table->title }}
</div>{{--
--}}<div class="d-inline-block col-5 small text-right">{{--
--}}<span title="Forks" class="d-inline-block {{$forks==0?'hidden':''}}" style="min-width: 60px;">
{{ $forks }}@icon(fa-code-fork fa-pl, ~Forks~~)
</span>{{--
--}}<span title="Favourites" class="d-inline-block {{$faves==0?'hidden':''}}" style="min-width: 60px;">
{{ $faves }}@icon(fa-star fa-pl, ~Favourites~~)
</span>{{--
--}}<span title="Revisions" class="d-inline-block" style="min-width: 60px;">
{{ $revs }}@icon(fa-history fa-pl, ~Revisions~~)
</span>{{--
--}}<span title="Rows" class="d-inline-block" style="min-width: 60px;">
{{ $rows }}@icon(fa-th-list fa-pl, ~Rows)
</span>{{--
--}}
</div>
</span>
<span class="d-block small row">
<span class="d-inline-block col-8">
{{ ellipsis($table->description, 215) }}
</span>{{--
--}}<span class="d-inline-block col-4 text-right text-muted">
Last change {{ $table->updated_at->diffForHumans() }}
</span>
</span>
<div class="d-block small row">
<div class="d-inline-block col-8">
@sr(Description:~){{ ellipsis($table->description, 215) }}
</div>{{--
--}}<div class="d-inline-block col-4 text-right text-muted">
Last change {{ $table->updated_at->diffForHumans() }}
</div>
</div>
</a>
@endforeach
@endif
+17 -16
View File
@@ -40,7 +40,7 @@
<div class="row form-group">
<div class="col-md-7 offset-md-3">
<button type="submit" class="btn btn-primary">
<i class="fa-save pr-2"></i>Apply Changes
@icon(fa-save fa-pr)Apply Changes
</button>
</div>
</div>
@@ -78,7 +78,8 @@
<table>
<tr>
<td rowspan=4>
<i class="fa-{{ $icons[$identity->provider] }} fa-huge py-3 px-4"></i>
<i class="fa-{{ $icons[$identity->provider] }} fa-huge py-3 px-4" aria-hidden=true></i>
<span class="sr-only">{{ucfirst($identity->provider)}}</span>
</td>
<th>Nickname</th>
<td class="pl-2">{{ $identity->nick_name }}</td>
@@ -111,28 +112,28 @@
<div class="col-md-3 col-form-label text-md-right">
Add identity
</div>
<div class="col-md-7">
<ul class="col-md-7 sr-list">
@set('services.oauth_providers.github.client_id')
<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark">
<i class="fa-github pr-1"></i>
{{ __('GitHub') }}
</a>
<li>
<a type="submit" href="{{route('oauth-github-authorize')}}" class="btn btn-dark">
@icon(fa-github fa-pr){{ __('GitHub') }}
</a>
@endset
@set('services.oauth_providers.google.client_id')
<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark">
<i class="fa-google pr-1"></i>
{{ __('Google') }}
</a>
<li>
<a type="submit" href="{{route('oauth-google-authorize')}}" class="btn btn-dark">
@icon(fa-google fa-pr){{ __('Google') }}
</a>
@endset
@set('services.oauth_providers.facebook.client_id')
<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark">
<i class="fa-facebook-square pr-1"></i>
{{ __('Facebook') }}
</a>
<li>
<a type="submit" href="{{route('oauth-facebook-authorize')}}" class="btn btn-dark">
@icon(fa-facebook-square fa-pr){{ __('Facebook') }}
</a>
@endset
</div>
</ul>
</div>
</div>
</form>
@@ -28,7 +28,7 @@
<div class="row form-group">
<div class="col-md-7 offset-md-3">
<button type="submit" class="btn btn-primary">
<i class="fa-save pr-2"></i>Save Changes
@icon(fa-save fa-pr)Save Changes
</button>
</div>
</div>
+40 -26
View File
@@ -13,52 +13,66 @@
<div class="col-md-4">
<div class="card">
<div class="card-header card-header-extra">
<i class="fa-user-circle-o fa-pr fa-large"></i>{{ $user->title }}
@icon(fa-user-circle-o fa-pr fa-large)
<h1>
@if(authed() && user()->is($user))
@sr(Your dashboard -)
@else
@sr(User's page -)
@endif
{{ $user->title }}
</h1>
@if(authed() && user()->is($user))
<a href="{{route('profile.edit')}}" class="btn ml-auto">Edit</a>
<a href="{{route('profile.edit')}}" class="btn ml-auto" aria-label="Edit Profile">Edit</a>
@endif
</div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
@endif
@if($user->bio)
@if(mb_strlen($user->bio) > 250)
<p id="bio-short" aria-hidden=true>
<p id="bio-short mb-1" aria-hidden=true>
@sr(About me:)
{{mb_substr($user->bio, 0, 250)}}
<a class="text-muted small" title="Show more" href="#" onclick="$('#bio-short').addClass('hidden'); $('#bio-full').removeClass('hidden'); return false;">
<a class="text-muted small" @tooltip(Show more) href="#" onclick="$('#bio-short').addClass('hidden'); $('#bio-full').removeClass('hidden'); return false;">
[more]
</a>
</p>
<p id="bio-full" class="hidden">
<p id="bio-full" class="hidden mb-1">
@sr(About me:)
{{ $user->bio }}
<a class="text-muted small" title="Collapse" href="#" onclick="$('#bio-full').addClass('hidden'); $('#bio-short').removeClass('hidden'); return false;">
<a class="text-muted small" @tooltip(Collapse) href="#" onclick="$('#bio-full').addClass('hidden'); $('#bio-short').removeClass('hidden'); return false;">
[collapse]
</a>
</p>
@else
<p>
<p class="mb-1">
@sr(About me:)
{{ $user->bio }}
</p>
@endif
@endif
@if($user->website)
<p>
<i class="fa-link fa-pr" aria-label="User's Website" title="User's Website"></i>{{--
--}}<a href="{{ $user->website }}">{{ $user->website }}</a>
</p>
@endif
<table>
<tbody>
@if($user->website)
<tr>
<td class="text-center pr-2">@icon(fa-link, User's Website:)</td>
<td><a href="{{ $user->website }}">{{ $user->website }}</a></td>
</tr>
@endif
<p class="mb-0">
<i class="fa-calendar fa-pr" aria-hidden=true></i>{{--
--}}Joined {{ $user->created_at->diffForHumans() }}
</p>
<tr>
<td class="text-center pr-2">@icon(fa-vcard-o, User's handle:)</td>
<td><a href="{{ route('profile.view', $user->name) }}">{{ $user->handle }}</a></td>
</tr>
<tr>
<td class="text-center pr-2">@icon(fa-calendar, Join date:)</td>
<td>Joined {{ $user->created_at->diffForHumans() }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@@ -67,20 +81,20 @@
<div class="col-md-8">
<div class="card">
<div class="card-header card-header-extra">
<span>
<h2>
@if(authed() && user()->is($user))
Your Tables
@else
User's Tables
@endif
</span>
</h2>
<nav class="ml-auto" aria-label="Pages of the table list">
{{ $tables->links(null, ['ulClass' => 'pagination-sm mb-0 pagination-outline-light']) }}
</nav>
@if(authed() && user()->is($user))
<a href="{{route('table.create')}}" class="btn ml-3">New</a>
<a href="{{route('table.create')}}" class="btn ml-3" aria-label="New Table">New</a>
@endif
</div>
+1 -1
View File
@@ -49,7 +49,7 @@
<div class="row form-group">
<div class="col-md-7 offset-md-3">
<button type="submit" class="btn btn-primary">
<i class="fa-save pr-2"></i>Create Table
@icon(fa-save fa-pr)Create Table
</button>
</div>
</div>