mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 08:44:49 +00:00
Merge pull request #1028 from pixelfed/frontend-ui-refactor
Update about page
This commit is contained in:
commit
e556174c6c
3 changed files with 8 additions and 25 deletions
|
@ -42,30 +42,14 @@ class SiteController extends Controller
|
||||||
|
|
||||||
public function about()
|
public function about()
|
||||||
{
|
{
|
||||||
$res = Cache::remember('site:about', now()->addMinutes(120), function() {
|
$stats = Cache::remember('site:about', now()->addMinutes(120), function() {
|
||||||
$custom = Page::whereSlug('/site/about')->whereActive(true)->exists();
|
|
||||||
if($custom) {
|
|
||||||
$stats = Cache::remember('site:about:stats', now()->addMinutes(60), function() {
|
|
||||||
return [
|
return [
|
||||||
'posts' => Status::whereLocal(true)->count(),
|
'posts' => Status::whereLocal(true)->count(),
|
||||||
'users' => User::count(),
|
'users' => User::count(),
|
||||||
'admin' => User::whereIsAdmin(true)->first()
|
'admin' => User::whereIsAdmin(true)->first()
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
return View::make('site.about')->with('stats', $stats)->render();
|
return view('site.about', compact('stats'));
|
||||||
} else {
|
|
||||||
$stats = Cache::remember('site:about:stats', now()->addMinutes(60), function() {
|
|
||||||
return [
|
|
||||||
'posts' => Status::whereLocal(true)->count(),
|
|
||||||
'users' => User::count(),
|
|
||||||
'admin' => User::whereIsAdmin(true)->first()
|
|
||||||
];
|
|
||||||
});
|
|
||||||
//return view('site.about', compact('stats'));
|
|
||||||
return View::make('site.about')->with('stats', $stats)->render();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return $res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function language()
|
public function language()
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
||||||
|
|
||||||
<meta name="robots" content="noimageindex, noarchive">
|
<meta name="robots" content="noimageindex, noarchive">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@extends('layouts.app')
|
@extends('layouts.anon')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="jumbotron jumbotron-fluid bg-primary text-white mb-0 py-4">
|
<div class="jumbotron jumbotron-fluid bg-primary text-white mb-0 py-4">
|
||||||
|
|
Loading…
Reference in a new issue