1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-25 17:26:43 +00:00

Merge pull request #620 from pixelfed/frontend-ui-refactor

Frontend ui refactor
This commit is contained in:
daniel 2018-12-04 13:46:51 -07:00 committed by GitHub
commit 18978b5861
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 5 deletions

View file

@ -68,7 +68,14 @@ class SiteController extends Controller
public function about()
{
return view('site.about');
$stats = Cache::remember('site:about:stats', 1440, function() {
return [
'posts' => Status::whereLocal(true)->count(),
'users' => User::count(),
'admin' => User::whereIsAdmin(true)->first()
];
});
return view('site.about', compact('stats'));
}
public function language()

View file

@ -8,7 +8,7 @@
<a href="{{route('site.privacy')}}" class="text-primary pr-3">{{__('site.privacy')}}</a>
<a href="{{route('site.platform')}}" class="text-primary pr-3">API</a>
<a href="{{route('site.language')}}" class="text-primary pr-3">{{__('site.language')}}</a>
<a href="https://pixelfed.org" class="text-muted float-right" rel="noopener">Powered by PixelFed</a>
<a href="https://pixelfed.org" class="text-muted float-right" rel="noopener" title="version {{config('pixelfed.version')}}" data-toggle="tooltip">Powered by PixelFed</a>
</p>
</div>
</footer>

View file

@ -9,7 +9,7 @@
</div>
<div class="bg-white">
<div class="container d-flex justify-content-center">
<div class="card" style="width:500px;margin-top:-30px;">
<div class="card mr-3" style="width:500px;margin-top:-30px;">
<div class="card-header d-inline-flex align-items-center bg-white">
<img src="/storage/avatars/default.png" width="32px" height="32px" style="border-radius: 32px; border: 1px solid #ccc">
<span class="username font-weight-bold pl-2 text-dark">
@ -33,6 +33,34 @@
</div>
</div>
</div>
<div style="width:300px;margin-top:-30px;text-align: center;">
<div class="card border-left-blue mb-3">
<div class="card-body">
<p class="h2 mb-0">{{$stats['posts']}}</p>
<p class="font-weight-bold mb-0">Posts</p>
</div>
</div>
<div class="card border-left-blue mb-3">
<div class="card-body">
<p class="h2 mb-0">{{$stats['users']}}</p>
<p class="font-weight-bold mb-0">Users</p>
</div>
</div>
@if($stats['admin'])
<div class="card border-left-blue mb-3">
<div class="card-body">
<p class="h2 mb-0">
<a href="{{$stats['admin']->url()}}">
&commat;{{$stats['admin']->username}}
</a>
</p>
<p class="font-weight-bold mb-0">Instance Admin</p>
</div>
</div>
@endif
</div>
</div>
<div class="container py-5">
</div>

View file

@ -117,7 +117,7 @@
<a href="{{route('site.platform')}}" class="text-dark pr-2">API</a>
</p>
<p class="mb-0 text-uppercase font-weight-bold text-muted small">
<a href="http://pixelfed.org" class="text-muted" rel="noopener">Powered by PixelFed</a>
<a href="http://pixelfed.org" class="text-muted" rel="noopener" title="version {{config('pixelfed.version')}}" data-toggle="tooltip">Powered by PixelFed</a>
</p>
</div>
</footer>
@ -129,5 +129,4 @@
@push('scripts')
<script type="text/javascript" src="{{mix('js/timeline.js')}}"></script>
@endpush