Skip to content

A self-hosted media server and file management system

clean up for lighthouse accessibility and speed

aminnausin48510c7b9d49
diff --git a/public/css/main.css b/public/css/main.css
index 269f46b2..b98a4c3b 100644
--- a/public/css/main.css
+++ b/public/css/main.css
@@ -1,8 +1,8 @@
-html[data-bs-theme="dark"] div.dtsp-panesContainer div.dtsp-searchPane div.dataTables_wrapper div.dataTables_scrollBody {
+/* html[data-bs-theme="dark"] div.dtsp-panesContainer div.dtsp-searchPane div.dataTables_wrapper div.dataTables_scrollBody {
background: var(--bs-table-bg) !important;
-}
+} */
-.neu-card{
+/* .neu-card{
border-radius: 15px;
background: #f2f2f2;
box-shadow: 20px 20px 60px #cecece, -20px -20px 60px #ffffff;
@@ -13,7 +13,7 @@ html[data-bs-theme="dark"] div.dtsp-panesContainer div.dtsp-searchPane div.dataT
.neu-card.dark-mode{
border-radius: 15px;
background: #161618;
- /* box-shadow: 20px 20px 60px #131314, -20px -20px 60px #19191c; */
+ box-shadow: 20px 20px 60px #131314, -20px -20px 60px #19191c;
box-shadow: 0px 0px 0px #131314, -0px -0px 0px #19191c;
margin: 2%;
padding: 2%;
@@ -22,16 +22,11 @@ html[data-bs-theme="dark"] div.dtsp-panesContainer div.dtsp-searchPane div.dataT
.neu-card.darker{
border-radius: 15px;
background: #121212;
- /* box-shadow: 20px 20px 60px #0f0f0f, -20px -20px 60px #151515; */
+ box-shadow: 20px 20px 60px #0f0f0f, -20px -20px 60px #151515;
box-shadow: 0px 0px 0px #0f0f0f, -0px -0px 0px #151515;
margin: 2%;
padding: 2%;
-}
-
-.folder-header{
- margin-left: 0%;
- margin-right: 0%;
-}
+} */
.toggle-switch {
position: relative;
@@ -96,10 +91,10 @@ html[data-bs-theme="dark"] div.dtsp-panesContainer div.dtsp-searchPane div.dataT
box-shadow: none;
}
-.dark-mode{
+/* .dark-mode{
background-color: #121216;
color:#e2e0e2;
-}
+} */
/* .light{
background: #f2f2f2;
diff --git a/resources/css/app.css b/resources/css/app.css
index fa47dc14..f7d2c12b 100644
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -2,7 +2,70 @@
@tailwind components;
@tailwind utilities;
-/* @layer base {
+@layer base {
+ .toggle-switch {
+ position: relative;
+ width: 60px;
+ height: 30px;
+ --light: #d8dbe0;
+ --dark: #28292c;
+ --accent: #28292c;
+ --link: rgb(27, 129, 112);
+ --link-hover: rgb(24, 94, 82);
+ }
+
+ .switch-label {
+ position: absolute;
+ width: 100%;
+ height: 30px;
+ background-color: var(--dark);
+ border-radius: 15px;
+ cursor: pointer;
+ border: 2px solid var(--dark);
+ }
+
+ .checkbox {
+ position: absolute;
+ display: none;
+ }
+
+ .slider {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ border-radius: 15px;
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+ }
+
+ .checkbox:checked ~ .slider {
+ background-color: var(--light);
+ }
+
+ .slider::before {
+ content: "";
+ position: absolute;
+ top: 6px;
+ left: 6px;
+ width: 15px;
+ height: 15px;
+ border-radius: 50%;
+ -webkit-box-shadow: inset 7px -2px 0px 0px var(--light);
+ box-shadow: inset 7px -2px 0px 0px var(--light);
+ background-color: var(--dark);
+ -webkit-transition: 0.3s;
+ transition: 0.3s;
+ }
+
+ .checkbox:checked ~ .slider::before {
+ -webkit-transform: translateX(30px);
+ -ms-transform: translateX(30px);
+ transform: translateX(30px);
+ background-color: var(--accent);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+
input:-webkit-autofill,
input:-webkit-autofill:enabled,
input:-webkit-autofill:hover,
@@ -10,8 +73,7 @@
textarea:-webkit-autofill,
textarea:-webkit-autofill:enabled,
textarea:-webkit-autofill:hover,
- textarea:-webkit-autofill:focus
- select:-webkit-autofill,
+ textarea:-webkit-autofill:focus select:-webkit-autofill,
select:-webkit-autofill:enabled,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
@@ -20,4 +82,4 @@
box-shadow: 0 0 0px 1000px #8a8274c7 inset;
background-color: #645c4cc7;
}
-} */
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/resources/js/components/inputs/LabelledTextInput.vue b/resources/js/components/inputs/LabelledTextInput.vue
index 1d27833c..67fefa59 100644
--- a/resources/js/components/inputs/LabelledTextInput.vue
+++ b/resources/js/components/inputs/LabelledTextInput.vue
@@ -1,11 +1,11 @@
<script setup>
const model = defineModel();
-const { text } = defineProps(['text'])
+const { text, placeholder, id } = defineProps(['text', 'placeholder', 'id'])
</script>
<template>
<div class="flex justify-start items-center gap-2">
- <label class="text-neutral-950 dark:text-white" :for="text">{{ text }}:</label>
- <input type="text" v-model="model"
+ <label class="text-neutral-950 dark:text-white" :for="id">{{ text }}:</label>
+ <input type="text" v-model="model" :name="id" :id="id" :placeholder="placeholder"
class="p-2 text-neutral-950 dark:text-white bg-input-100 border-input-200 shadow-sm leading-none dark:bg-input-800 dark:border-indigo-800 rounded-lg w-full">
</div>
</template>
\ No newline at end of file
diff --git a/resources/js/components/inputs/LightModeToggle.vue b/resources/js/components/inputs/LightModeToggle.vue
index 9647bc06..c40c10f5 100644
--- a/resources/js/components/inputs/LightModeToggle.vue
+++ b/resources/js/components/inputs/LightModeToggle.vue
@@ -8,8 +8,8 @@
<template>
<section class="toggle-switch shrink-0 flex flex-col">
- <label class="switch-label">
- <input type="checkbox" class="checkbox invisible text-white" id="light-mode-toggle" v-model="lightMode" v-bind:checked="lightMode" >
+ <label class="switch-label" for="light-mode-toggle">
+ <input type="checkbox" class="checkbox invisible text-white" id="light-mode-toggle" name="light-mode-toggle" v-model="lightMode" v-bind:checked="lightMode" >
<span class="slider"></span>
</label>
</section>
diff --git a/resources/js/components/video/VideoTable.vue b/resources/js/components/video/VideoTable.vue
index 4e676df0..848edc1c 100644
--- a/resources/js/components/video/VideoTable.vue
+++ b/resources/js/components/video/VideoTable.vue
@@ -35,9 +35,9 @@ const tableColumnGroups = [
<template>
<table class="w-full flex flex-col gap-2">
- <section class="folder-header flex justify-center sm:justify-between p-2">
+ <section class="flex justify-center sm:justify-between p-2">
<!-- <h2 class="text-2xl py-4">Episodes</h2> -->
- <LabelledTextInput v-model="searchQuery" :text="'Search'" class="w-80"/>
+ <LabelledTextInput v-model="searchQuery" :text="'Search'" :placeholder="'Enter search query'" :id="'table-search'" class="w-80"/>
</section>
<hr>
<thead class="w-full flex-col hidden sm:flex">
diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vue
index 090a9181..716d5ae0 100644
--- a/resources/js/views/VideoView.vue
+++ b/resources/js/views/VideoView.vue
@@ -54,12 +54,11 @@ watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });
<div
class="p-6 w-full mx-auto dark:bg-primary-dark-800 bg-primary-800 rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap overflow-hidden">
<div id="mp4-description" class="hidden sm:flex items-center gap-4 md:w-2/3 ">
- <img id="folder-thumbnail" class="h-28 object-contain rounded-md"
- src="https://m.media-amazon.com/images/M/MV5BMjVjZGU5ZTktYTZiNC00N2Q1LThiZjMtMDVmZDljN2I3ZWIwXkEyXkFqcGdeQXVyMTUzMTg2ODkz._V1_.jpg"
+ <img id="folder-thumbnail" class="h-28 object-contain rounded-md shadow-md"
+ :src="stateVideo?.attributes?.thumbnail?.url ?? 'https://m.media-amazon.com/images/M/MV5BMjVjZGU5ZTktYTZiNC00N2Q1LThiZjMtMDVmZDljN2I3ZWIwXkEyXkFqcGdeQXVyMTUzMTg2ODkz._V1_.jpg'"
alt="Folder Cover Art">
<div class="h-full flex flex-col gap-2">
- <div id="mp4-title" class="text-xl font-medium line">{{ stateVideo?.attributes ?
- stateVideo.attributes.name : ''}}</div>
+ <div id="mp4-title" class="text-xl font-medium line">{{ stateVideo?.attributes?.name ?? '[Video Name]'}}</div>
<p class="dark:text-slate-400 text-slate-500 line-clamp-3 text-sm">After defeating the
Demon Lord, Himmel the Hero, priest Heiter, dwarf warrior Eisen, and elf mage
Frieren return to the royal capital. After their procession, they view a meteor
@@ -80,11 +79,10 @@ watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });
</div>
</div>
<div id="mp4-description-mobile" class="flex sm:hidden items-center gap-4 flex-col ">
- <div id="mp4-title" class="text-xl font-medium w-full">{{ stateVideo?.attributes ?
- stateVideo.attributes.name : ''}}</div>
+ <div id="mp4-title" class="text-xl font-medium w-full">{{ stateVideo?.attributes?.name ?? '[Video Name]'}}</div>
<div class="flex items-start gap-4 md:w-2/3">
- <img id="folder-thumbnail" class="h-28 object-contain rounded-md"
- src="https://m.media-amazon.com/images/M/MV5BMjVjZGU5ZTktYTZiNC00N2Q1LThiZjMtMDVmZDljN2I3ZWIwXkEyXkFqcGdeQXVyMTUzMTg2ODkz._V1_.jpg"
+ <img id="folder-thumbnail" class="h-28 object-contain rounded-md shadow-sm"
+ :src="stateVideo?.attributes?.thumbnail?.url ?? 'https://m.media-amazon.com/images/M/MV5BMjVjZGU5ZTktYTZiNC00N2Q1LThiZjMtMDVmZDljN2I3ZWIwXkEyXkFqcGdeQXVyMTUzMTg2ODkz._V1_.jpg'"
alt="Folder Cover Art">
<p class="dark:text-slate-400 text-slate-500 line-clamp-3 text-sm">After defeating the
Demon Lord, Himmel the Hero, priest Heiter, dwarf warrior Eisen, and elf mage
@@ -109,18 +107,18 @@ watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });
class="container flex sm:w-auto sm:flex-col justify-between lg:min-w-32 items-center sm:items-end gap-3 flex-wrap"
role="group">
<section class="flex gap-2">
- <button
- class="p-2 bg-button-100 dark:bg-button-900 rounded-lg ring-violet-500 hover:ring-violet-700 hover:bg-violet-400/50 ring-[0.125rem] ring-inset">Edit
+ <button aria-label="edit details"
+ class="p-2 bg-button-100 dark:bg-button-900 rounded-lg ring-violet-500 hover:ring-violet-700 hover:bg-violet-400/50 ring-[0.125rem] ring-inset shadow">Edit
Details</button>
- <button
- class="p-2 bg-button-100 dark:bg-button-900 rounded-lg dark:ring-neutral-700 hover:ring-violet-700 hover:bg-violet-400/50 dark:ring-[0.125rem] hover:ring-[0.125rem] ring-inset">
+ <button aria-label="share"
+ class="p-2 bg-button-100 dark:bg-button-900 rounded-lg ring-neutral-700 hover:ring-violet-700 hover:bg-violet-400/50 dark:ring-[0.125rem] hover:ring-[0.125rem] ring-inset shadow">
<CircumShare1 height="24" width="24"/>
</button>
</section>
<section
class="flex gap flex-col items-end text-sm dark:text-slate-400 text-slate-500 justify-between">
- <p>20 views</p>
- <p class="line-clamp-1 truncate">#atmospheroc #sad #rocky</p>
+ <p>{{ stateVideo?.views ?? 20 }} views</p>
+ <p class="line-clamp-1 truncate">{{ stateVideo?.tags ?? '#atmospheroc #sad #rocky' }}</p>
</section>
</div>
</div>
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 0313e1d6..3982a770 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -4,6 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="description" content="A self hosted web media server to keep everything in one place.">
<!-- <meta name="csrf-token" content="{{ csrf_token() }}"> -->
<title>{{ config('app.name', 'Laravel') }}</title>
@@ -15,22 +16,22 @@
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> -->
<!-- Jquery -->
- <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
+ <!-- <script src="https://code.jquery.com/jquery-3.7.1.js"></script> -->
<!-- DataTables -->
- <script src="https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script>
+ <!-- <script src="https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js"></script> -->
<!-- <script src="https://cdn.datatables.net/1.13.7/js/dataTables.bootstrap5.min.js"></script> -->
<!-- <link href="https://cdn.datatables.net/1.13.7/css/dataTables.bootstrap5.min.css" rel="stylesheet" crossorigin="anonymous"> -->
<!-- <link href="https://cdn.datatables.net/1.13.7/css/dataTables.tailwindcss.min.css" rel="stylesheet"> -->
- <link href="https://cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css" rel="stylesheet">
+ <!-- <link href="https://cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css" rel="stylesheet"> -->
<!-- toastr -->
<link href="{{ URL::asset('css/toastr.min.css') }}" rel="stylesheet">
<script src="{{ URL::asset('js/toastr.min.js') }}"></script>
<!-- local -->
- <link href="{{ URL::asset('css/main.css') }}" rel="stylesheet">
+ <!-- <link href="{{ URL::asset('css/main.css') }}" rel="stylesheet"> -->
<!-- <script src="{{ URL::asset('js/auth.js') }}"></script> -->
@vite('resources/css/app.css')
@@ -58,7 +59,7 @@
<body class="bg-primary-950 dark:bg-primary-dark-950 dark:text-[#e2e0e2] font-sans text-gray-900 antialiased" id="root"> <!-- dark:bg-[#121216] dark:text-[#e2e0e2] text-gray-900 -->
@vite('resources/js/app.js')
- <div id='app' :user="{{ Auth::user() }}"></div>
+ <div id='app'></div>
{{ $slot }}
</body>
</html>
\ No newline at end of file