Skip to content

A self-hosted media server and file management system

feat: fonts and header hierarchy

aminnausin2fe06f97b67e
diff --git a/resources/css/app.css b/resources/css/app.css
index 87feccf3..290d6143 100755
--- a/resources/css/app.css
+++ b/resources/css/app.css
@@ -2,6 +2,9 @@
@tailwind components;
@tailwind utilities;
+@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
+@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
+
@layer utilities {
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
@@ -15,22 +18,13 @@
}
@layer base {
- /* input:-webkit-autofill,
- input:-webkit-autofill:enabled,
- input:-webkit-autofill:hover,
- input:-webkit-autofill:focus,
- textarea:-webkit-autofill,
- textarea:-webkit-autofill:enabled,
- textarea:-webkit-autofill:hover,
- textarea:-webkit-autofill:focus select:-webkit-autofill,
- select:-webkit-autofill:enabled,
- select:-webkit-autofill:hover,
- select:-webkit-autofill:focus {
- -webkit-text-fill-color: #fff;
- -webkit-box-shadow: 0 0 0px 1000px #837354c7 inset;
- box-shadow: 0 0 0px 1000px #8a8274c7 inset;
- background-color: #645c4cc7;
- } */
+ @font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
+ }
[v-cloak] {
display: none;
@@ -42,9 +36,7 @@
}
}
- /* Custom scrollbar width */
-
- /* Scrollbar track */
+ /* Custom scrollbar track width */
@supports selector(::-webkit-scrollbar) {
.scrollbar-minimal::-webkit-scrollbar {
@@ -83,10 +75,10 @@
.slider {
--thumb-size: 2;
- --thumb-rounded: 9999px; /* rounded-full */
- --track-color: rgba(255, 255, 255, 0.3); /* white with 30% opacity */
- --track-rounded: 9999px; /* rounded-full */
- --progress-color: #111827; /* gray-900 */
+ --thumb-rounded: 9999px;
+ --track-color: rgba(255, 255, 255, 0.3);
+ --track-rounded: 9999px;
+ --progress-color: #111827;
}
.slider.timeline {
diff --git a/resources/js/components/cards/FolderCard.vue b/resources/js/components/cards/FolderCard.vue
index 821f37a5..7aafae55 100755
--- a/resources/js/components/cards/FolderCard.vue
+++ b/resources/js/components/cards/FolderCard.vue
@@ -51,7 +51,7 @@ const contextMenuItems = computed(() => {
<template #trigger>
<RouterLink
:to="`/${data.path}`"
- class="text-left relative flex flex-col sm:flex-row flex-wrap rounded-lg sm:p-3 dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow w-full group cursor-pointer divide-gray-300 dark:divide-gray-400"
+ class="text-left relative flex flex-col sm:flex-row flex-wrap rounded-lg sm:p-3 dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 text-neutral-500 dark:text-neutral-400 shadow w-full group cursor-pointer divide-gray-300 dark:divide-gray-400"
@contextmenu="
(e: any) => {
setContextMenu(e, { items: contextMenuItems });
@@ -65,7 +65,7 @@ const contextMenuItems = computed(() => {
/>
<span class="w-full flex-1 text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap p-3 sm:p-0">
<section class="flex justify-between gap-4 w-full items-center">
- <h2 class="w-full truncate" :title="props.data.series?.title ?? props.data.name">{{ props.data.series?.title ?? props.data.name }}</h2>
+ <h3 class="w-full truncate dark:text-white" :title="props.data.series?.title ?? props.data.name">{{ props.data.series?.title ?? props.data.name }}</h3>
<div class="flex justify-end gap-1">
<ButtonCorner
:positionClasses="'w-7 h-7'"
@@ -92,16 +92,13 @@ const contextMenuItems = computed(() => {
</div>
</section>
<section class="flex flex-col sm:flex-row sm:justify-between w-full flex-wrap gap-2 text-sm">
- <h3
- class="text-neutral-500 w-full text-wrap truncate sm:text-nowrap flex-1"
- :title="`${props.data.file_count} Episode${props.data.file_count !== 1 ? 's' : ''}`"
- >
+ <h4 class="w-full text-wrap truncate sm:text-nowrap flex-1" :title="`${props.data.file_count} Episode${props.data.file_count !== 1 ? 's' : ''}`">
{{ props.data.file_count }} Episode{{ props.data.file_count !== 1 ? 's' : '' }}
- </h3>
- <h3 class="truncate text-nowrap sm:text-right text-neutral-500 w-fit lg:hidden xl:block">
+ </h4>
+ <h4 class="truncate text-nowrap sm:text-right w-fit lg:hidden xl:block">
<!-- some other folder statistic or data like number of seasons or if its popular or something -->
{{ props.data.total_size ? formatFileSize(props.data.total_size) : '' }}
- </h3>
+ </h4>
</section>
</span>
<section
@@ -113,7 +110,7 @@ const contextMenuItems = computed(() => {
v-for="(tag, index) in props.data.series.folder_tags"
v-bind:key="index"
:label="tag.name"
- :colour="'bg-neutral-200 leading-none text-neutral-500 shadow dark:bg-neutral-900 hover:bg-violet-600 hover:text-neutral-50 hover:dark:bg-violet-600/90 !max-h-[22px]'"
+ :colour="'bg-neutral-200 leading-none shadow dark:bg-neutral-900 hover:bg-violet-600 hover:text-neutral-50 hover:dark:bg-violet-600/90 !max-h-[22px]'"
/>
</section>
</RouterLink>
diff --git a/resources/js/components/cards/RecordCard.vue b/resources/js/components/cards/RecordCard.vue
index 1ef223e2..ee4f850b 100755
--- a/resources/js/components/cards/RecordCard.vue
+++ b/resources/js/components/cards/RecordCard.vue
@@ -37,12 +37,12 @@ watch(
<template>
<RouterLink
:to="videoLink ? videoLink : ''"
- class="text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap rounded-lg dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-gray-400"
+ class="text-left relative flex flex-col gap-4 lg:gap-2 sm:flex-row flex-wrap rounded-lg dark:bg-primary-dark-800/70 bg-primary-800 dark:hover:bg-primary-dark-600 hover:bg-gray-200 text-neutral-500 dark:text-neutral-400 shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-gray-400"
>
<section class="flex justify-between gap-4 w-full items-center">
- <h2 class="w-full truncate" :title="props.record.relationships.video_name">
+ <h3 class="w-full truncate dark:text-white" :title="props.record.relationships.video_name">
{{ props.record.relationships.video_name }}
- </h2>
+ </h3>
<div class="flex justify-end gap-1" v-if="videoLink">
<ButtonCorner
:positionClasses="'w-7 h-7'"
@@ -67,19 +67,19 @@ watch(
</template>
</ButtonCorner>
</div>
- <div class="flex justify-end gap-1 text-neutral-500 w-full truncate" v-else>
+ <div class="flex justify-end gap-1 w-full truncate" v-else>
{{ 'Deleted' }}
</div>
</section>
<section class="flex flex-wrap sm:flex-nowrap sm:justify-between w-full gap-x-2 text-sm">
- <h3 class="hidden lg:block text-neutral-500 w-full text-wrap truncate sm:text-nowrap shrink-0 sm:shrink" :title="props.record.relationships.folder?.name">
+ <h4 class="hidden lg:block w-full text-wrap truncate sm:text-nowrap shrink-0 sm:shrink" :title="props.record.relationships.folder?.name">
{{ props.record.relationships.folder?.name }}
- </h3>
- <h3 class="hidden lg:block truncate text-right text-neutral-500 w-full line-clamp-2" :title="toFormattedDate(rawDate)">
+ </h4>
+ <h4 class="hidden lg:block truncate text-right w-full line-clamp-2" :title="toFormattedDate(rawDate)">
{{ timeSpan }}
- </h3>
- <h3 class="lg:hidden text-neutral-500 text-wrap truncate sm:text-nowrap mr-auto">{{ props.record.relationships.folder?.name }} · {{ timeSpan }}</h3>
- <h3 class="lg:hidden truncate sm:text-right text-neutral-500 line-clamp-2 text-wrap sm:text-nowrap">
+ </h4>
+ <h4 class="lg:hidden text-wrap truncate sm:text-nowrap mr-auto">{{ props.record.relationships.folder?.name }} · {{ timeSpan }}</h4>
+ <h4 class="lg:hidden truncate sm:text-right line-clamp-2 text-wrap sm:text-nowrap">
{{
`${rawDate.toLocaleDateString('en-ca', {
year: 'numeric',
@@ -90,7 +90,7 @@ watch(
minute: '2-digit',
})}`
}}
- </h3>
+ </h4>
</section>
</RouterLink>
</template>
diff --git a/resources/js/components/cards/SidebarCard.vue b/resources/js/components/cards/SidebarCard.vue
index 2b1508e7..e2a66c7a 100644
--- a/resources/js/components/cards/SidebarCard.vue
+++ b/resources/js/components/cards/SidebarCard.vue
@@ -18,14 +18,14 @@ const props = defineProps<{
:to="link"
:class="`flex flex-col sm:flex-row flex-wrap gap-4 lg:gap-2 relative
w-full group cursor-pointer rounded-lg shadow p-3
- text-left dark:text-white
+ text-left text-neutral-500 dark:text-neutral-400
dark:bg-primary-dark-800/70 bg-primary-800
dark:hover:bg-primary-dark-600 hover:bg-gray-200
divide-gray-300 dark:divide-gray-400 ${props.class}`"
>
<section class="flex justify-between gap-4 w-full items-center">
<slot name="header">
- <h2 class="w-full truncate" :title="title">{{ title }}</h2>
+ <h3 class="w-full truncate dark:text-white" :title="title">{{ title }}</h3>
<div class="flex justify-end gap-1">
<ButtonCorner
:positionClasses="'w-7 h-7'"
@@ -54,11 +54,11 @@ const props = defineProps<{
</section>
<section class="flex flex-col sm:flex-row sm:justify-between w-full flex-wrap gap-2 text-sm">
<slot name="body">
- <h3 class="text-neutral-500 w-full text-wrap truncate sm:text-nowrap flex-1" v-if="false">Episodes: 2</h3>
- <h3 class="truncate text-nowrap sm:text-right text-neutral-500 w-fit hidden" v-if="false">
+ <h4 class="w-full text-wrap truncate sm:text-nowrap flex-1" v-if="false">Episodes: 2</h4>
+ <h4 class="truncate text-nowrap sm:text-right w-fit hidden" v-if="false">
<!-- some other folder statistic or data like number of seasons or if its popular or something -->
{{ '20gb' }}
- </h3>
+ </h4>
</slot>
</section>
</RouterLink>
diff --git a/resources/js/components/panels/NavBar.vue b/resources/js/components/panels/NavBar.vue
index 036d3677..428e3989 100755
--- a/resources/js/components/panels/NavBar.vue
+++ b/resources/js/components/panels/NavBar.vue
@@ -55,8 +55,8 @@ watch(userData, handleAuthEvent, { immediate: false });
:aria-expanded="showDropdown"
aria-controls="user-dropdown"
>
- <span id="user-name" class="hidden sm:block truncate" v-if="username">{{ username }}</span>
- <span id="user-name-unauth" v-else class="text-right hidden sm:block">Guest</span>
+ <h2 id="user-name" class="hidden sm:block truncate" v-if="username">{{ username }}</h2>
+ <h2 id="user-name-unauth" v-else class="text-right hidden sm:block">Guest</h2>
<img
:src="userData?.avatar ?? '/storage/avatars/default.jpg'"
diff --git a/resources/js/components/panels/VideoSidebar.vue b/resources/js/components/panels/VideoSidebar.vue
index 41f7d38a..3455bf10 100755
--- a/resources/js/components/panels/VideoSidebar.vue
+++ b/resources/js/components/panels/VideoSidebar.vue
@@ -63,7 +63,7 @@ watch(
<template>
<div class="p-3 px-6 lg:px-3 flex flex-col gap-3">
<div class="flex py-1 flex-col gap-2">
- <h1 id="sidebar-title" class="text-2xl h-8 w-full capitalize dark:text-white">{{ selectedSideBar }}</h1>
+ <h2 id="sidebar-title" class="text-2xl h-8 w-full capitalize dark:text-white">{{ selectedSideBar }}</h2>
<hr class="" />
</div>
@@ -87,7 +87,7 @@ watch(
<section v-if="selectedSideBar === 'history'" id="list-content-history" class="flex gap-2 flex-wrap">
<RecordCard v-for="(record, index) in stateRecords.slice(0, 10)" :key="record.id" :record="record" :index="index" @clickAction="handleShare" />
<RouterLink v-if="stateRecords.length != 0" to="/history" class="text-center text-sm dark:text-neutral-400 mx-auto p-3 hover:underline">View More</RouterLink>
- <h2 v-else class="text-gray-500 dark:text-gray-400 tracking-wider w-full py-2">Nothing Yet...</h2>
+ <h3 v-else class="text-gray-500 dark:text-gray-400 tracking-wider w-full py-2">Nothing Yet...</h3>
</section>
<ModalBase :modalData="shareModal">
<template #content>
diff --git a/resources/js/components/video/VideoAmbientPlayer.vue b/resources/js/components/video/VideoAmbientPlayer.vue
index aafbdd05..c53c48b9 100755
--- a/resources/js/components/video/VideoAmbientPlayer.vue
+++ b/resources/js/components/video/VideoAmbientPlayer.vue
@@ -219,7 +219,6 @@ watch(
</filter>
</svg>
</section>
- {{ hasStarted && !lightMode && ambientMode && !isAudio && !videoPlayer?.isPictureInPicture }}
</template>
<style lang="css" scoped>
.filter-blur {
diff --git a/resources/js/components/video/VideoInfoPanel.vue b/resources/js/components/video/VideoInfoPanel.vue
index d07e5b5e..5bb9b8d8 100755
--- a/resources/js/components/video/VideoInfoPanel.vue
+++ b/resources/js/components/video/VideoInfoPanel.vue
@@ -158,7 +158,7 @@ watch(
</section>
<section class="flex flex-col gap-2 flex-1 min-w-0 w-full group">
<section class="hidden sm:flex justify-between gap-2">
- <h2 id="mp4-title" class="text-xl font-medium truncate capitalize h-8" :title="metaData?.fields.title ?? 'no file was found at this location'">
+ <h2 id="mp4-title" class="text-xl truncate capitalize h-8" :title="metaData?.fields.title ?? 'no file was found at this location'">
{{ metaData?.fields.title ?? '[File Not Found]' }}
</h2>
<section class="flex gap-2 justify-end h-8 lg:min-w-32 max-w-64 w-fit">
diff --git a/resources/js/layouts/LayoutBase.vue b/resources/js/layouts/LayoutBase.vue
index 5c3e3aa5..66640653 100755
--- a/resources/js/layouts/LayoutBase.vue
+++ b/resources/js/layouts/LayoutBase.vue
@@ -57,10 +57,8 @@ watch(
}
"
>
- <!-- overflow-y-hidden -->
- <!-- class="flex p-6 gap-6 flex-wrap lg:flex-nowrap snap-y bg-primary-950 dark:bg-primary-dark-950 dark:text-[#e2e0e2] font-sans text-gray-900 antialiased" -->
<main
- class="h-full md:h-auto grid grid-cols-1 lg:grid-cols-10 2xl:grid-cols-6 sm:p-6 gap-6 snap-y bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-[#e2e0e2] font-sans text-gray-900 antialiased overflow-x-clip"
+ class="font-nunito h-full md:h-auto grid grid-cols-1 lg:grid-cols-10 2xl:grid-cols-6 sm:p-6 gap-6 snap-y bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-[#e2e0e2] text-gray-900 antialiased overflow-x-clip"
>
<section
id="left-card"
@@ -68,7 +66,6 @@ watch(
>
<slot name="leftSidebar"></slot>
</section>
- <!-- class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-6 pt-3 rounded-2xl w-full h-fit flex flex-col gap-3 z-20 ring-1 ring-gray-900/5" -->
<section
id="content-card"
class="col-span-full lg:col-span-6 2xl:col-span-4 flex-grow order-1 lg:order-2 bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] sm:shadow-xl p-6 pt-3 sm:rounded-2xl w-full h-fit flex flex-col gap-3 sm:ring-1 ring-gray-900/5"
@@ -80,10 +77,17 @@ watch(
id="list-card"
:class="`col-span-1 lg:col-span-2 2xl:col-span-1 h-fit order-3 bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] sm:shadow-xl sm:rounded-2xl space-y-2 sm:scroll-mt-6 ring-gray-900/5 ${selectedSideBar && sideBarTarget === 'list-card' ? 'sm:ring-1' : 'hidden'}`"
>
- <!-- w-full h-fit lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 -->
- <!-- class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-3 rounded-2xl w-full h-fit lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 space-y-2 scroll-mt-6 z-20 ring-1 ring-gray-900/5" -->
<slot name="sidebar"></slot>
</section>
</main>
</div>
</template>
+
+<style lang="css">
+h1,
+h2 {
+ font-family: 'Rubik', 'sans-serif';
+ font-weight: 200;
+ font-optical-sizing: auto;
+}
+</style>
diff --git a/resources/js/views/DashboardView.vue b/resources/js/views/DashboardView.vue
index 0fcf8907..ca417681 100644
--- a/resources/js/views/DashboardView.vue
+++ b/resources/js/views/DashboardView.vue
@@ -120,7 +120,7 @@ watch(
<template v-slot:leftSidebar>
<div class="p-3 px-6 lg:px-3 flex flex-col gap-3">
<div class="flex py-1 flex-col gap-2">
- <h1 id="sidebar-title" class="text-2xl h-8 w-full capitalize dark:text-white">{{ selectedSideBar }}</h1>
+ <h2 id="sidebar-title" class="text-2xl h-8 w-full capitalize dark:text-white">{{ selectedSideBar }}</h2>
<hr class="" />
</div>
<section class="flex flex-col gap-2">
@@ -143,17 +143,17 @@ watch(
:aria-disabled="tab.disabled"
>
<template #header>
- <h2 class="w-full flex-1" :title="tab.title ?? tab.name">{{ tab.title ?? tab.name }}</h2>
+ <h3 class="w-full flex-1" :title="tab.title ?? tab.name">{{ tab.title ?? tab.name }}</h3>
<component v-if="tab.icon" :is="tab.icon" class="ml-auto w-6 h-6" />
</template>
<template #body>
- <h3 v-if="tab.description" title="Description" class="text-neutral-500 w-full text-wrap truncate sm:text-nowrap flex-1">
+ <h4 v-if="tab.description" title="Description" class="text-neutral-500 w-full text-wrap truncate sm:text-nowrap flex-1">
{{ tab.description }}
- </h3>
- <h3 v-if="tab.info" title="Information" class="truncate text-nowrap sm:text-right text-neutral-500 w-fit">
+ </h4>
+ <h4 v-if="tab.info" title="Information" class="truncate text-nowrap sm:text-right text-neutral-500 w-fit">
<!-- some other folder statistic or data like number of seasons or if its popular or something -->
{{ tab.info.value }}
- </h3>
+ </h4>
</template>
</SidebarCard>
</section>
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 7165e716..be5b652e 100755
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -20,7 +20,13 @@
@vite('resources/css/app.css')
<style>
html {
- scrollbar-gutter: stable both-edges;
+ scrollbar-gutter: stable;
+ }
+
+ @media (min-width: 640px) {
+ html {
+ scrollbar-gutter: stable both-edges;
+ }
}
html.fullscreen {
@@ -29,7 +35,7 @@
</style>
</head>
-<body class="bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-[#e2e0e2] font-sans text-gray-900 antialiased dark:[color-scheme:dark]" id="root"> <!-- dark:bg-[#121216] dark:text-[#e2e0e2] text-gray-900 -->
+<body class="bg-primary-900 dark:bg-primary-dark-900 sm:bg-primary-950 sm:dark:bg-primary-dark-950 dark:text-[#e2e0e2] text-gray-900 antialiased dark:[color-scheme:dark]" id="root"> <!-- dark:bg-[#121216] dark:text-[#e2e0e2] text-gray-900 -->
<div id="reverb-config" data-reverb-config='
@json(["key" => config("reverb.apps.apps.0.key"), "host" => config("reverb.apps.apps.0.options.host"), "port" => config("reverb.apps.apps.0.options.port")])'></div>
@vite('resources/js/app.ts')
diff --git a/tailwind.config.js b/tailwind.config.js
index c01da280..033a1e60 100755
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -30,6 +30,12 @@ export default {
// }
// },
+ fontFamily: {
+ roboto: ['Roboto', 'sans-serif'],
+ nunito: ['Nunito', 'sans-serif'],
+ 'dm-sans': ['DM Sans', 'sans-serif'],
+ rubik: ['Rubik', 'sans-serif'],
+ },
colors: {
// Default
primary: {
@@ -74,6 +80,7 @@ export default {
},
screens: {
xs: '320px',
+ xms: '400px',
'3xl': '2000px',
},
},