forked from mirror/pixelfed
hardwired legal notice
This commit is contained in:
parent
de9573bf6e
commit
a0737cc1d3
|
@ -94,6 +94,15 @@ class SiteController extends Controller
|
|||
return View::make('site.terms')->with(compact('page'))->render();
|
||||
}
|
||||
|
||||
public function legal(Request $request)
|
||||
{
|
||||
$page = Cache::remember('site:terms', now()->addDays(120), function() {
|
||||
$slug = '/site/legal';
|
||||
return Page::whereSlug($slug)->whereActive(true)->first();
|
||||
});
|
||||
return View::make('site.legal')->with(compact('page'))->render();
|
||||
}
|
||||
|
||||
public function redirectUrl(Request $request)
|
||||
{
|
||||
abort_if(!$request->user(), 404);
|
||||
|
|
|
@ -16,4 +16,5 @@ return [
|
|||
'contact-us' => 'Kontaktiere uns',
|
||||
'places' => 'Orte',
|
||||
'profiles' => 'Profile',
|
||||
'legal' => 'Impressum',
|
||||
];
|
||||
|
|
|
@ -16,5 +16,6 @@ return [
|
|||
'contact-us' => 'Contact Us',
|
||||
'places' => 'Places',
|
||||
'profiles' => 'Profiles',
|
||||
'legal' => 'Legal Notice',
|
||||
|
||||
];
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<a href="{{route('site.terms')}}" class="text-dark p-2">{{__('site.terms')}}</a>
|
||||
<a href="{{route('site.privacy')}}" class="text-dark p-2">{{__('site.privacy')}}</a>
|
||||
<a href="{{route('site.language')}}" class="text-dark p-2">{{__('site.language')}}</a>
|
||||
<a href="{{route('site.legal')}}" class="text-dark p-2">{{__('site.legal')}}</a>
|
||||
@if(config_cache('instance.has_legal_notice'))
|
||||
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
||||
@endif
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container mt-5">
|
||||
<div class="col-12">
|
||||
<p class="font-weight-bold text-lighter text-uppercase">Legal Notice</p>
|
||||
<div class="card border shadow-none">
|
||||
<div class="card-body p-md-5 text-justify mx-md-3">
|
||||
@if($page && $page->content)
|
||||
{!! $page->content !!}
|
||||
@else
|
||||
<div class="terms">
|
||||
<h5 class="font-weight-bold">Legal</h5>
|
||||
<p class="">Hey</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('meta')
|
||||
<meta property="og:description" content="Terms of Use">
|
||||
@endpush
|
|
@ -482,6 +482,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
|||
Route::view('open-source', 'site.opensource')->name('site.opensource');
|
||||
Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances');
|
||||
Route::get('terms', 'SiteController@terms')->name('site.terms');
|
||||
Route::get('legal', 'SiteController@legal')->name('site.legal');
|
||||
Route::get('privacy', 'SiteController@privacy')->name('site.privacy');
|
||||
Route::view('platform', 'site.platform')->name('site.platform');
|
||||
Route::view('language', 'site.language')->name('site.language');
|
||||
|
|
Loading…
Reference in New Issue