mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-02-03 12:37:39 +01:00
Change URL for footer pages
Change the URL for footer pages when footer page is renamed
This commit is contained in:
parent
75b52c7eac
commit
4e97bae3e2
@ -314,22 +314,39 @@ class AdminController extends Controller
|
||||
return back();
|
||||
}
|
||||
|
||||
//View any of the pages: contact, terms, privacy
|
||||
public function pages(Request $request)
|
||||
//View footer page: terms
|
||||
public function pagesTerms(Request $request)
|
||||
{
|
||||
$name = $request->name;
|
||||
$name = "terms";
|
||||
|
||||
$enabledPages = [
|
||||
'contact' => env('DISPLAY_FOOTER_CONTACT', false),
|
||||
'terms' => env('DISPLAY_FOOTER_TERMS', false),
|
||||
'privacy' => env('DISPLAY_FOOTER_PRIVACY', false),
|
||||
// Add other pages here as needed
|
||||
];
|
||||
|
||||
if (!array_key_exists($name, $enabledPages) || !$enabledPages[$name]) {
|
||||
try {
|
||||
$data['page'] = Page::select($name)->first();
|
||||
} catch (Exception $e) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
return view('pages', ['data' => $data, 'name' => $name]);
|
||||
}
|
||||
|
||||
//View footer page: privacy
|
||||
public function pagesPrivacy(Request $request)
|
||||
{
|
||||
$name = "privacy";
|
||||
|
||||
try {
|
||||
$data['page'] = Page::select($name)->first();
|
||||
} catch (Exception $e) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
return view('pages', ['data' => $data, 'name' => $name]);
|
||||
}
|
||||
|
||||
//View footer page: contact
|
||||
public function pagesContact(Request $request)
|
||||
{
|
||||
$name = "contact";
|
||||
|
||||
try {
|
||||
$data['page'] = Page::select($name)->first();
|
||||
} catch (Exception $e) {
|
||||
|
@ -1,23 +1,23 @@
|
||||
<div class="container">
|
||||
<div class="footer fadein" style="margin:5% 0px 35px 0px;">
|
||||
@if(env('DISPLAY_FOOTER') === true)
|
||||
@if(env('DISPLAY_FOOTER_HOME') === true)<a class="footer-hover spacing" href="@if(str_replace('"', "", EnvEditor::getKey('HOME_FOOTER_LINK')) === "" ){{ url('') }}@else{{ str_replace('"', "", EnvEditor::getKey('HOME_FOOTER_LINK')) }}@endif">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_HOME'))}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_TERMS') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/terms">{{env('TITLE_FOOTER_TERMS')}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_PRIVACY') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/privacy">{{env('TITLE_FOOTER_PRIVACY')}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_CONTACT') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/contact">{{env('TITLE_FOOTER_CONTACT')}}</a>@endif
|
||||
@endif
|
||||
</div>
|
||||
<div class="footer fadein" style="margin:5% 0px 35px 0px;">
|
||||
@if(env('DISPLAY_FOOTER') === true)
|
||||
@if(env('DISPLAY_FOOTER_HOME') === true)<a class="footer-hover spacing" href="@if(str_replace('"', "", EnvEditor::getKey('HOME_FOOTER_LINK')) === "" ){{ url('') }}@else{{ str_replace('"', "", EnvEditor::getKey('HOME_FOOTER_LINK')) }}@endif">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_HOME'))}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_TERMS') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/{{ strtolower(env('TITLE_FOOTER_TERMS')) }}">{{env('TITLE_FOOTER_TERMS')}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_PRIVACY') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/{{ strtolower(env('TITLE_FOOTER_PRIVACY')) }}">{{env('TITLE_FOOTER_PRIVACY')}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_CONTACT') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/{{ strtolower(env('TITLE_FOOTER_CONTACT')) }}">{{env('TITLE_FOOTER_CONTACT')}}</a>@endif
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if(env('DISPLAY_CREDIT') === true)
|
||||
<div class="credit-footer"><a style="text-decoration: none;" class="spacing" href="https://littlelink-custom.com" target="_blank" title="Learn more">
|
||||
<section class="credit-hover hvr-grow fadein">
|
||||
<div class="parent-footer credit-icon" >
|
||||
<img id="footer_spin" class="footer_spin image-footer1 generic" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="LittleLink Custom"></img>
|
||||
<img class="image-footer2" src="{{ asset('littlelink/images/just-ll.svg') }}" alt="LittleLink Custom"></img>
|
||||
</div>
|
||||
@if(env('DISPLAY_CREDIT') === true)
|
||||
<div class="credit-footer"><a style="text-decoration: none;" class="spacing" href="https://littlelink-custom.com" target="_blank" title="Learn more">
|
||||
<section class="credit-hover hvr-grow fadein">
|
||||
<div class="parent-footer credit-icon" >
|
||||
<img id="footer_spin" class="footer_spin image-footer1 generic" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="LittleLink Custom"></img>
|
||||
<img class="image-footer2" src="{{ asset('littlelink/images/just-ll.svg') }}" alt="LittleLink Custom"></img>
|
||||
</div>
|
||||
|
||||
<a href="https://littlelink-custom.com" target="_blank" title="Learn more" class="credit-txt credit-txt-clr credit-text">Powered by LittleLink Custom</a>
|
||||
</section>
|
||||
</a></div><br><br><br>
|
||||
@endif
|
||||
</div>
|
||||
<a href="https://littlelink-custom.com" target="_blank" title="Learn more" class="credit-txt credit-txt-clr credit-text">Powered by LittleLink Custom</a>
|
||||
</section>
|
||||
</a></div><br><br><br>
|
||||
@endif
|
||||
</div>
|
@ -234,9 +234,9 @@ if($url1sb == '200' or $url2sb == '200') {
|
||||
Copyright © @php echo date('Y'); @endphp {{ config('app.name') }}<i class="icon-heart" aria-hidden="true"></i> </br>
|
||||
@php if(env('DISPLAY_FOOTER_HOME') != false and env('DISPLAY_FOOTER_TERMS') != false and env('DISPLAY_FOOTER_PRIVACY') != false and env('DISPLAY_FOOTER_CONTACT') != false){$dot=" . "; } else {$dot=" ";} @endphp
|
||||
@if(env('DISPLAY_FOOTER_HOME') === true)<a class="footer-hover spacing" href="@if(str_replace('"', "", EnvEditor::getKey('HOME_FOOTER_LINK')) === "" ){{ url('') }}@else{{ str_replace('"', "", EnvEditor::getKey('HOME_FOOTER_LINK')) }}@endif">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_HOME'))}}</a>{!!$dot!!}@endif
|
||||
@if(env('DISPLAY_FOOTER_TERMS') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/terms">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_TERMS'))}}</a>{!!$dot!!}@endif
|
||||
@if(env('DISPLAY_FOOTER_PRIVACY') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/privacy">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_PRIVACY'))}}</a>{!!$dot!!}@endif
|
||||
@if(env('DISPLAY_FOOTER_CONTACT') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/contact">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_CONTACT'))}}</a>@endif
|
||||
@if(env('DISPLAY_FOOTER_TERMS') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/{{ strtolower(env('TITLE_FOOTER_TERMS')) }}">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_TERMS'))}}</a>{!!$dot!!}@endif
|
||||
@if(env('DISPLAY_FOOTER_PRIVACY') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/{{ strtolower(env('TITLE_FOOTER_PRIVACY')) }}">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_PRIVACY'))}}</a>{!!$dot!!}@endif
|
||||
@if(env('DISPLAY_FOOTER_CONTACT') === true)<a class="footer-hover spacing" href="{{ url('') }}/pages/{{ strtolower(env('TITLE_FOOTER_CONTACT')) }}">{{str_replace('"', "", EnvEditor::getKey('TITLE_FOOTER_CONTACT'))}}</a>@endif
|
||||
</p>
|
||||
@endif
|
||||
@if(env('DISPLAY_CREDIT') === true)
|
||||
|
@ -88,7 +88,9 @@ Route::get('/going/{id?}', [UserController::class, 'clickNumber'])->where('link'
|
||||
if (!str_contains(url()->full(), '@') and !in_array(url()->full(), [url('login'), url('register'), url('update'), url('update?error='), url('update?success='), url('update?finishing='), url('update?updating='), url('update?backups='), url('update?backup='), url('update?updating-windows='), url('update?preparing='), url('updating'), url('backup')])) {
|
||||
Route::get('/' . $custom_prefix . '{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');}
|
||||
Route::get('/@{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
|
||||
Route::get('/pages/{name}', [AdminController::class, 'pages'])->name('pages');
|
||||
Route::get('/pages/'.strtolower(env('TITLE_FOOTER_TERMS')), [AdminController::class, 'pagesTerms'])->name('pagesTerms');
|
||||
Route::get('/pages/'.strtolower(env('TITLE_FOOTER_PRIVACY')), [AdminController::class, 'pagesPrivacy'])->name('pagesPrivacy');
|
||||
Route::get('/pages/'.strtolower(env('TITLE_FOOTER_CONTACT')), [AdminController::class, 'pagesContact'])->name('pagesContact');
|
||||
Route::get('/theme/@{littlelink}', [UserController::class, 'theme'])->name('theme');
|
||||
|
||||
//User route
|
||||
|
Loading…
x
Reference in New Issue
Block a user