Added new social icons

+ bugfix
This commit is contained in:
Julian Prieber 2022-12-05 21:22:06 +01:00
parent 42d2fabd55
commit f189d83bf1
3 changed files with 33 additions and 46 deletions

View File

@ -359,37 +359,7 @@ class UserController extends Controller
$userId = Auth::user()->id;
$data['pagePage'] = 10;
$data['links'] = Link::select('id', 'link', 'title', 'order', 'click_number', 'up_link', 'links.button_id')->where('user_id', $userId)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->paginate(10);
return view('studio/links', $data);
}
//Show link, 20
public function showLinks20()
{
$userId = Auth::user()->id;
$data['pagePage'] = 20;
$data['links'] = Link::select('id', 'link', 'title', 'order', 'click_number', 'up_link', 'links.button_id')->where('user_id', $userId)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->paginate(20);
return view('studio/links', $data);
}
//Show link, 30
public function showLinks30()
{
$userId = Auth::user()->id;
$data['pagePage'] = 30;
$data['links'] = Link::select('id', 'link', 'title', 'order', 'click_number', 'up_link', 'links.button_id')->where('user_id', $userId)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->paginate(30);
return view('studio/links', $data);
}
//Show link, all
public function showLinksAll()
{
$userId = Auth::user()->id;
$data['pagePage'] = 0;
$data['links'] = Link::select('id', 'link', 'title', 'order', 'click_number', 'up_link', 'links.button_id')->where('user_id', $userId)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->paginate(10000000000);
$data['links'] = Link::select('id', 'link', 'title', 'order', 'click_number', 'up_link', 'links.button_id')->where('user_id', $userId)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->paginate(99999);
return view('studio/links', $data);
}
@ -757,6 +727,22 @@ class UserController extends Controller
saveIcon('linkedin', $request->linkedin);
saveIcon('tiktok', $request->tiktok);
saveIcon('discord', $request->discord);
saveIcon('youtube', $request->youtube);
saveIcon('snapchat', $request->snapchat);
saveIcon('reddit', $request->reddit);
saveIcon('pinterest', $request->pinterest);
saveIcon('telegram', $request->telegram);
saveIcon('whatsapp', $request->whatsapp);

View File

@ -4,16 +4,6 @@
<?php use App\Models\Button; ?>
@if(Request::is('studio/links/10'))
@php setcookie("LinkCount", "10", time()+60*60*24*5, "/"); @endphp
@elseif(Request::is('studio/links/20'))
@php setcookie("LinkCount", "20", time()+60*60*24*5, "/"); @endphp
@elseif(Request::is('studio/links/30'))
@php setcookie("LinkCount", "30", time()+60*60*24*5, "/"); @endphp
@elseif(Request::is('studio/links/all'))
@php setcookie("LinkCount", "all", time()+60*60*24*5, "/"); @endphp
@endif
@push('sidebar-stylesheets')
<script src="{{ asset('studio/external-dependencies/fontawesome.js') }}" crossorigin="anonymous"></script>
<link rel="stylesheet" href="{{ asset('studio/external-dependencies/fontawesome.css') }}" />
@ -38,7 +28,6 @@
<?php function strp($urlStrp){return str_replace(array('http://', 'https://'), '', $urlStrp);} ?>
<div style="text-align: right;"><a href="{{ url('/studio/links') }}/10">10</a> | <a href="{{ url('/studio/links') }}/20">20</a> | <a href="{{ url('/studio/links') }}/30">30</a> | <a href="{{ url('/studio/links') }}/all">all</a></div>
<div class="row">
<section class='pre-left shadow text-gray-400'>
<h3 class="card-header"><i class="bi bi-link-45deg">My Links</i>
@ -222,6 +211,22 @@
{!!icon('linkedin', 'LinkedIn')!!}
{!!icon('tiktok', 'TikTok')!!}
{!!icon('discord', 'Discord')!!}
{!!icon('youtube', 'YouTube')!!}
{!!icon('snapchat', 'Snapchat')!!}
{!!icon('reddit', 'reddit')!!}
{!!icon('pinterest', 'Pinterest')!!}
{!!icon('telegram', 'Telegram')!!}
{!!icon('whatsapp', 'WhatsApp')!!}
<button type="submit" class="mt-3 ml-3 btn btn-info">Save links</button>
</form>

View File

@ -102,10 +102,6 @@ Route::post('/studio/edit-link', [UserController::class, 'saveLink'])->name('add
Route::get('/studio/edit-link/{id}', [UserController::class, 'AddUpdateLink'])->name('showLink');
Route::post('/studio/sort-link', [UserController::class, 'sortLinks'])->name('sortLinks');
Route::get('/studio/links', [UserController::class, $LinkPage])->name($LinkPage);
Route::get('/studio/links/10', [UserController::class, 'showLinks'])->name('showLinks');
Route::get('/studio/links/20', [UserController::class, 'showLinks20'])->name('showLinks20');
Route::get('/studio/links/30', [UserController::class, 'showLinks30'])->name('showLinks30');
Route::get('/studio/links/all', [UserController::class, 'showLinksAll'])->name('showLinksAll');
Route::get('/studio/theme', [UserController::class, 'showTheme'])->name('showTheme');
Route::post('/studio/theme', [UserController::class, 'editTheme'])->name('editTheme');
Route::get('/deleteLink/{id}', [UserController::class, 'deleteLink'])->name('deleteLink');