public dash and view counting
This commit is contained in:
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
.fa-large {
|
||||
font-size: 1.6em;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.fa-huge {
|
||||
|
||||
Vendored
+3
@@ -1,5 +1,8 @@
|
||||
// help bubble icon
|
||||
.form-help {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.form-help-wrapper .form-help {
|
||||
margin-top: $form-text-margin-top;
|
||||
}
|
||||
Vendored
-41
@@ -13,48 +13,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:767px){
|
||||
.mobile-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-no-border {
|
||||
border: 0 none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.border-dashed {
|
||||
border-style: dashed !important;
|
||||
}
|
||||
|
||||
.border-dotted {
|
||||
border-style: dotted !important;
|
||||
}
|
||||
|
||||
.last-p-mb-0 {
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@each $color, $value in $colors {
|
||||
.border-#{$color} {
|
||||
border-color: $value !important;
|
||||
}
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 2px 3px rgba(black, .3);
|
||||
}
|
||||
|
||||
.small2 {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
a.link-no-color {
|
||||
color: unset;
|
||||
}
|
||||
|
||||
.btn-square {
|
||||
min-width: 2.5em;
|
||||
}
|
||||
|
||||
Vendored
+6
-1
@@ -8,10 +8,15 @@ html {
|
||||
@import "helpers";
|
||||
@import "fa-utils";
|
||||
@import "block-collapse";
|
||||
@import "form-help";
|
||||
|
||||
@import "bootstrap-customizations/paginate";
|
||||
@import "bootstrap-customizations/card";
|
||||
@import "bootstrap-customizations/tooltip";
|
||||
@import "bootstrap-customizations/navbar";
|
||||
@import "bootstrap-customizations/footer";
|
||||
@import "bootstrap-customizations/help";
|
||||
@import "bootstrap-customizations/link";
|
||||
@import "bootstrap-customizations/border";
|
||||
@import "bootstrap-customizations/button";
|
||||
@import "bootstrap-customizations/responsive";
|
||||
@import "bootstrap-customizations/typography";
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
.border-dashed {
|
||||
border-style: dashed !important;
|
||||
}
|
||||
|
||||
.border-dotted {
|
||||
border-style: dotted !important;
|
||||
}
|
||||
|
||||
@each $color, $value in $colors {
|
||||
.border-#{$color} {
|
||||
border-color: $value !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.btn-square {
|
||||
min-width: 2.5em;
|
||||
}
|
||||
@@ -20,6 +20,7 @@
|
||||
.card-header-extra {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
// special styles for buttons in card header
|
||||
@@ -31,3 +32,10 @@
|
||||
.card-header .fa-large {
|
||||
margin: -.6em 0; // fix icon alignment
|
||||
}
|
||||
|
||||
.card-body .close {
|
||||
margin-top:-$sp1;
|
||||
margin-right:-$sp1;
|
||||
min-width: 1.5rem;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
a.link-no-color {
|
||||
color: unset;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
@media (max-width:767px) {
|
||||
.mobile-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-no-border {
|
||||
border: 0 none !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.small2 {
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
@if($help)
|
||||
<i class="fa-question-circle form-help"
|
||||
data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
@if(false!==strpos($help, '<'))
|
||||
data-html="true"
|
||||
@endif
|
||||
title="{{ $help }}"></i>
|
||||
@endif
|
||||
@@ -1,11 +1,3 @@
|
||||
<div class="col-md-1 {{$mobile ? 'd-inline pl-1 d-md-none':'d-none d-md-block'}} pl-0">
|
||||
@if($w->help)
|
||||
<i class="fa-question-circle form-help"
|
||||
data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
@if(false!==strpos($w->help, '<'))
|
||||
data-html="true"
|
||||
@endif
|
||||
title="{{ $w->help }}"></i>
|
||||
@endif
|
||||
<div class="form-help-wrapper col-md-1 {{$mobile ? 'd-inline pl-1 d-md-none':'d-none d-md-block'}} pl-0">
|
||||
@include('form._help-inner', ['help' => $w->help])
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<nav class="navbar navbar-expand-md navbar-light page-navbar">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ url('/') }}" aria-label="Go to Dashboard">
|
||||
<a class="navbar-brand" href="{{ route('dash') }}" 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>
|
||||
|
||||
@@ -6,7 +6,7 @@ $aclass = $dropdown ? 'dropdown-item' : 'nav-link';
|
||||
@endphp
|
||||
|
||||
{!! $li !!}
|
||||
<a class="{{ $aclass }}" href="{{ route('profile.view', user()->name) }}">
|
||||
<a class="{{ $aclass }}" href="{{ route('home') }}">
|
||||
<i class="fa-home fa-pr"></i>{{ __('Your Profile') }}
|
||||
</a>
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
@else
|
||||
@foreach($tables as $table)
|
||||
@php
|
||||
$forks = $table->forks()->count();
|
||||
$faves = $table->favouritingUsers()->count();
|
||||
$revs = $table->revisions()->count();
|
||||
$forks = $table->forks_count;
|
||||
$faves = $table->favourites_count;
|
||||
$revs = $table->revisions_count;
|
||||
$rows = $table->revision->row_count;
|
||||
@endphp
|
||||
<a class="list-group-item list-group-item-action"
|
||||
@@ -16,6 +16,9 @@
|
||||
@icon(fa-table fa-pr){{ $table->title }}
|
||||
</div>{{--
|
||||
--}}<div class="d-inline-block col-5 small text-right">{{--
|
||||
--}}<span title="Visits" class="d-inline-block" style="min-width: 60px;">
|
||||
{{ $table->visits }}@icon(fa-eye fa-pl, ~Visits~~)
|
||||
</span>{{--
|
||||
--}}<span title="Forks" class="d-inline-block {{$forks==0?'hidden':''}}" style="min-width: 60px;">
|
||||
{{ $forks }}@icon(fa-code-fork fa-pl, ~Forks~~)
|
||||
</span>{{--
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
<div class="col-md-8 mt-2 mt-md-0">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-extra">
|
||||
@icon(fa-table fa-pr fa-large)
|
||||
<h2>
|
||||
@if(authed() && user()->is($user))
|
||||
Your Tables
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
@if(guest() || user()->ownsTable($table))
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Forks"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->forks()->count() ?: '–' }}
|
||||
{{ $table->forks_count ?: '–' }}
|
||||
@icon(fa-code-fork, sr:Forks)
|
||||
</a>
|
||||
|
||||
<a href="#" class="btn btn-outline-primary py-1 btn-sm"
|
||||
title="Favourites" data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->favouritingUsers()->count() ?: '–' }}
|
||||
{{ $table->favourites_count ?: '–' }}
|
||||
@icon(fa-star, sr:Favourites)
|
||||
</a>
|
||||
@else
|
||||
@@ -40,7 +40,7 @@
|
||||
</a>
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Fork Count"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->forks()->count() ?: '–' }}
|
||||
{{ $table->forks_count ?: '–' }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Favourite Count"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->favouritingUsers()->count() ?: '–' }}
|
||||
{{ $table->favourites_count ?: '–' }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<a href="" class="btn btn-outline-primary py-1 btn-sm" title="Comments"
|
||||
data-toggle="tooltip" data-placement="top">
|
||||
{{ $table->comments()->count() ?: '–' }}
|
||||
{{ $table->comments_count ?: '–' }}
|
||||
@icon(fa-comment, sr:Comments)
|
||||
</a>
|
||||
</nav>
|
||||
@@ -91,7 +91,7 @@
|
||||
@endif
|
||||
|
||||
@if($table->origin)
|
||||
<p class="last-p-mb-0">
|
||||
<p>
|
||||
<b>Adapted From</b><br>
|
||||
{!! Widget::tryLink($table->origin) !!}
|
||||
</p>
|
||||
@@ -118,17 +118,30 @@
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Created</th>
|
||||
<td>{{ $table->created_at->format("M j, Y") }}</td>
|
||||
<td>
|
||||
<span data-toggle="tooltip" data-placement="right" title="{{ $table->created_at->format("G:i:s") }}">
|
||||
{{ $table->created_at->format("M j, Y") }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Updated</th>
|
||||
<td>{{ $table->updated_at->format("M j, Y") }}</td>
|
||||
<td>
|
||||
<span data-toggle="tooltip" data-placement="right" title="{{ $table->updated_at->format("G:i:s") }}">
|
||||
{{ $table->updated_at->format("M j, Y") }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Revisions</th>
|
||||
<td>{{ $table->revisions()->count() }}</td>
|
||||
<td>{{ $table->revisions_count }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="text-right pr-2">Visits</th>
|
||||
<td>{{ $table->visits }} {!! Widget::help('Visitors counted once per day') !!}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
@@ -3,15 +3,81 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">Dashboard</div>
|
||||
@guest
|
||||
<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="" class="button close" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>@sr(Close)
|
||||
</a>
|
||||
|
||||
<div class="card-body">
|
||||
<h1>Welcome to the public landing page.</h1>
|
||||
<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
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-4">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-extra">
|
||||
@icon(fa-users fa-pr fa-large)
|
||||
<h2>Users</h2>
|
||||
|
||||
<nav class="ml-auto" aria-label="Pages of the user list">
|
||||
{{ $users->links(null, ['ulClass' => 'pagination-sm mb-0 pagination-outline-light']) }}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="list-group list-group-flush">
|
||||
@if(count($users) == 0)
|
||||
<span class="list-group-item">No users yet.</span>
|
||||
@else
|
||||
@foreach($users as $user)
|
||||
<a class="list-group-item list-group-item-action"
|
||||
href="{{ route('profile.view', $user->name) }}">
|
||||
@icon(fa-user-circle-o fa-pr){{ $user->title }}<br>
|
||||
<small>{{ $user->handle }}</small>
|
||||
</a>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 mt-2 mt-md-0">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-extra">
|
||||
@icon(fa-table fa-pr fa-large)
|
||||
<h2>Popular Tables</h2>
|
||||
|
||||
<nav class="ml-auto" aria-label="Pages of the table list">
|
||||
{{ $tables->links(null, ['ulClass' => 'pagination-sm mb-0 pagination-outline-light']) }}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@include('profile._table-list')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user