Init
This commit is contained in:
24
resources/views/user/index.blade.php
Normal file
24
resources/views/user/index.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="scroll-smooth">
|
||||
@include('partials.head')
|
||||
|
||||
<body class="font-sans antialiased">
|
||||
<div class="flex flex-col min-h-screen bg-gray-100 dark:bg-neutral-900">
|
||||
@include('layouts.navigation')
|
||||
<!-- Page Content -->
|
||||
<main>
|
||||
@include('user.partials.background')
|
||||
<div class="relative max-w-[120rem] mx-auto sm:px-6 lg:px-8 space-y-6 pt-20 mt-[65px] flex flex-row justify-center">
|
||||
<div class="flex flex-col">
|
||||
@include('user.partials.profile')
|
||||
<div class="pt-8">
|
||||
@include('user.partials.info')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
19
resources/views/user/partials/actions.blade.php
Normal file
19
resources/views/user/partials/actions.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
@auth
|
||||
<div
|
||||
class="overflow-hidden mt-5 relative max-w-sm min-w-80 mx-auto bg-white/40 shadow-lg ring-1 ring-black/5 rounded-xl items-center gap-6 dark:bg-neutral-950/40 backdrop-blur dark:highlight-white/5">
|
||||
<div class="flex flex-col p-2">
|
||||
<a class="block w-full px-4 py-2 rounded-lg text-left text-lg leading-5 text-gray-700 dark:text-gray-300 @if(request()->routeIs('profile.settings')) bg-rose-900/40 @endif hover:bg-neutral-100/60 dark:hover:bg-neutral-900/60 focus:outline-none focus:bg-neutral-100 dark:focus:bg-neutral-800 transition duration-150 ease-in-out"
|
||||
href="{{ route('profile.settings') }}"><i class="fa-solid fa-gear pr-4"></i>
|
||||
Settings</a>
|
||||
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
|
||||
<button type="submit"
|
||||
class="block w-full px-4 py-2 rounded-lg text-left text-lg leading-5 text-gray-700 dark:text-gray-300 hover:bg-neutral-100/60 dark:hover:bg-neutral-900/60 focus:outline-none focus:bg-neutral-100 dark:focus:bg-neutral-800 transition duration-150 ease-in-out"><i
|
||||
class="fa-solid fa-right-from-bracket pr-4"></i>
|
||||
Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endauth
|
35
resources/views/user/partials/background.blade.php
Normal file
35
resources/views/user/partials/background.blade.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<!-- BG -->
|
||||
@php
|
||||
$array = \cache()->remember('background', 300, function () {
|
||||
$bg = new \App\Models\SiteBackground();
|
||||
return $bg->getImages();
|
||||
});
|
||||
@endphp
|
||||
|
||||
<div class="fixed top-0 z-0 left-0 w-screen h-screen">
|
||||
@if ($array->isNotEmpty())
|
||||
@php
|
||||
$imageId = $array->random();
|
||||
@endphp
|
||||
<img
|
||||
class="absolute left-0 top-0 w-full opacity-50 fade-img"
|
||||
src="/images/background/{{ $imageId }}-1080p.webp"
|
||||
srcset="/images/background/{{ $imageId }}-640p.webp 640w,
|
||||
/images/background/{{ $imageId }}-720p.webp 720w,
|
||||
/images/background/{{ $imageId }}-1080p.webp 1080w,
|
||||
/images/background/{{ $imageId }}-1440p.webp 1440w"
|
||||
sizes="(max-width: 640px) 640px,
|
||||
(max-width: 1080px) 720px,
|
||||
(max-width: 1440px) 1080px,
|
||||
1440px"
|
||||
loading="lazy"
|
||||
height="640px"
|
||||
>
|
||||
@else
|
||||
<img
|
||||
class="absolute left-0 top-0 w-full opacity-50 fade-img"
|
||||
src="/images/hs_branding_1.webp"
|
||||
loading="lazy"
|
||||
>
|
||||
@endif
|
||||
</div>
|
41
resources/views/user/partials/info.blade.php
Normal file
41
resources/views/user/partials/info.blade.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<div class="flex flex-col pt-8 md:pt-0 md:flex-row gap-4 flex-wrap md:pl-8 h-min">
|
||||
<!-- View Count -->
|
||||
<div class="p-4 sm:p-8 bg-white/40 dark:bg-neutral-950/40 backdrop-blur shadow rounded-lg content-center text-center grow">
|
||||
<div class="inline-block rounded-md text-rose-600">
|
||||
<i class="fa-solid fa-eye text-3xl"></i>
|
||||
</div>
|
||||
<h5 class="font-medium dark:text-neutral-300">
|
||||
{{ number_format($user->watched->count()) }} views
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<!-- Comment Count -->
|
||||
<div class="p-4 sm:p-8 bg-white/40 dark:bg-neutral-950/40 backdrop-blur shadow rounded-lg content-center text-center grow">
|
||||
<div class="inline-block rounded-md text-rose-600">
|
||||
<i class="fa-solid fa-comment text-3xl"></i>
|
||||
</div>
|
||||
<h5 class="font-medium dark:text-neutral-300">
|
||||
{{ number_format($user->commentCount()) }} comments
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<!-- Likes -->
|
||||
<div class="p-4 sm:p-8 bg-white/40 dark:bg-neutral-950/40 backdrop-blur shadow rounded-lg content-center text-center grow">
|
||||
<div class="inline-block rounded-md text-rose-600">
|
||||
<i class="fa-solid fa-heart text-3xl"></i>
|
||||
</div>
|
||||
<h5 class="font-medium dark:text-neutral-300">
|
||||
{{ number_format($user->likes()) }} likes
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<!-- Playlists -->
|
||||
<div class="p-4 sm:p-8 bg-white/40 dark:bg-neutral-950/40 backdrop-blur shadow rounded-lg content-center text-center grow">
|
||||
<div class="inline-block rounded-md text-rose-600">
|
||||
<i class="fa-solid fa-rectangle-list text-3xl"></i>
|
||||
</div>
|
||||
<h5 class="font-medium dark:text-neutral-300">
|
||||
{{ number_format($user->playlists->count()) }} playlists
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
20
resources/views/user/partials/profile.blade.php
Normal file
20
resources/views/user/partials/profile.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<div
|
||||
class="overflow-hidden relative max-w-sm min-w-80 mx-auto bg-white/40 shadow-lg ring-1 ring-black/5 rounded-xl flex items-center gap-6 dark:bg-neutral-950/40 backdrop-blur dark:highlight-white/5">
|
||||
@if($user->avatar)
|
||||
<img class="absolute -left-6 w-24 h-24 rounded-full shadow-lg"
|
||||
src="https://external-content.duckduckgo.com/iu/?u=https://cdn.discordapp.com/avatars/{{ $user->id }}/{{ $user->avatar }}.webp">
|
||||
@else
|
||||
<img class="absolute -left-6 w-24 h-24 rounded-full shadow-lg" src="/images/default-avatar.webp">
|
||||
@endif
|
||||
<div class="flex flex-col py-5 pl-24">
|
||||
<strong class="text-slate-900 text-xl font-bold dark:text-slate-200">
|
||||
{{ $user->global_name ?? $user->username }}
|
||||
@if ($user->is_patreon)
|
||||
<a data-te-toggle="tooltip" title="Badge of appreciation for the horny people supporting us! :3"><i
|
||||
class="fa-solid fa-hand-holding-heart text-rose-600 animate-pulse"></i></a>
|
||||
@endif
|
||||
</strong>
|
||||
<span class="text-slate-500 text-sm font-medium dark:text-slate-400">Joined
|
||||
{{ $user->created_at->format('Y-m') }}</span>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user