Some general improvements.

This commit is contained in:
FireMasterK 2021-12-27 14:46:36 +00:00
parent b6d5fabeca
commit ea7669c863
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
6 changed files with 48 additions and 23 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="w-full min-h-screen h-full" :class="{ dark: darkMode, reset: !darkMode }"> <div class="w-full min-h-screen h-full p-5 reset" :class="{ dark: darkMode }">
<Navigation /> <Navigation />
<router-view v-slot="{ Component }"> <router-view v-slot="{ Component }">
<keep-alive :max="5"> <keep-alive :max="5">
@ -110,6 +110,7 @@ b {
* { * {
scrollbar-color: #15191a #444a4e; scrollbar-color: #15191a #444a4e;
@apply font-sans;
} }
.video-grid { .video-grid {
@ -124,6 +125,10 @@ b {
@apply text-black bg-white; @apply text-black bg-white;
} }
.auto {
@apply dark:(text-white bg-dark-900);
}
.dark { .dark {
@apply text-white bg-dark-900; @apply text-white bg-dark-900;
} }

View File

@ -2,15 +2,14 @@
<div class="comment flex"> <div class="comment flex">
<img <img
:src="comment.thumbnail" :src="comment.thumbnail"
class="comment-avatar rounded-full uk-margin-right" class="comment-avatar rounded-full w-12 h-12"
height="48" height="48"
width="48" width="48"
style="width: 48px; height: 48px"
loading="lazy" loading="lazy"
alt="Avatar" alt="Avatar"
/> />
<div class="comment-content"> <div class="comment-content pl-2">
<div class="comment-header"> <div class="comment-header">
<div v-if="comment.pinned" class="comment-pinned uk-text-meta"> <div v-if="comment.pinned" class="comment-pinned uk-text-meta">
<font-awesome-icon icon="thumbtack"></font-awesome-icon>&nbsp; {{ $t("comment.pinned_by") }} <font-awesome-icon icon="thumbtack"></font-awesome-icon>&nbsp; {{ $t("comment.pinned_by") }}
@ -26,14 +25,13 @@
{{ comment.commentedTime }} {{ comment.commentedTime }}
</div> </div>
</div> </div>
<div class="comment-body" style="white-space: pre-wrap"> <div class="whitespace-pre-wrap">
{{ comment.commentText }} {{ comment.commentText }}
</div> </div>
<div class="comment-footer uk-margin-small-top uk-text-meta"> <div class="comment-footer uk-margin-small-top uk-text-meta">
<font-awesome-icon icon="thumbs-up" style="margin-right: 4px"></font-awesome-icon> <font-awesome-icon icon="thumbs-up"></font-awesome-icon>
<span>{{ numberFormat(comment.likeCount) }}</span> <span class="ml-1">{{ numberFormat(comment.likeCount) }}</span>
&nbsp; <font-awesome-icon class="ml-1" v-if="comment.hearted" icon="heart"></font-awesome-icon>
<font-awesome-icon v-if="comment.hearted" icon="heart"></font-awesome-icon>
</div> </div>
<template v-if="comment.repliesPage && (!loadingReplies || !showingReplies)"> <template v-if="comment.repliesPage && (!loadingReplies || !showingReplies)">
<div @click="loadReplies"> <div @click="loadReplies">
@ -49,12 +47,8 @@
<font-awesome-icon icon="level-up-alt" /> <font-awesome-icon icon="level-up-alt" />
</div> </div>
</template> </template>
<div v-show="showingReplies" v-if="replies" class="replies uk-width-4-5@xl uk-width-3-4@s uk-width-1"> <div v-show="showingReplies" v-if="replies" class="replies">
<div <div v-for="reply in replies" :key="reply.commentId" class="w-full">
v-for="reply in replies"
:key="reply.commentId"
class="uk-tile-default uk-align-left uk-width-expand"
>
<Comment :comment="reply" :uploader="uploader" :video-id="videoId" /> <Comment :comment="reply" :uploader="uploader" :video-id="videoId" />
</div> </div>
<div v-if="nextpage" @click="loadReplies"> <div v-if="nextpage" @click="loadReplies">

View File

@ -1,6 +1,6 @@
<template> <template>
<nav class="grid grid-cols-3 px-2 sm:px-4 py-2.5 w-full relative"> <nav class="container flex flex-wrap items-center justify-between px-2 sm:px-4 py-2.5 w-full relative">
<div> <div class="">
<router-link class="flex font-bold text-3xl items-center font-sans font-bold" to="/" <router-link class="flex font-bold text-3xl items-center font-sans font-bold" to="/"
><img ><img
alt="logo" alt="logo"
@ -11,10 +11,10 @@
/>iped</router-link />iped</router-link
> >
</div> </div>
<div class="flex justify-center items-center <md:hidden"> <div class="<md:hidden">
<input <input
v-model="searchText" v-model="searchText"
class="input !w-72 h-10" class="input !w-72 !h-10"
type="text" type="text"
role="search" role="search"
:title="$t('actions.search')" :title="$t('actions.search')"
@ -25,8 +25,8 @@
@blur="onInputBlur" @blur="onInputBlur"
/> />
</div> </div>
<div> <div class="float-right">
<ul class="flex float-right text-1xl children:pl-3"> <ul class="flex text-1xl children:pl-3">
<li> <li>
<router-link v-t="'titles.preferences'" to="/preferences" /> <router-link v-t="'titles.preferences'" to="/preferences" />
</li> </li>
@ -48,7 +48,7 @@
<div class="w-full md:hidden"> <div class="w-full md:hidden">
<input <input
v-model="searchText" v-model="searchText"
class="input" class="input !h-10 !w-full"
type="text" type="text"
role="search" role="search"
:title="$t('actions.search')" :title="$t('actions.search')"

View File

@ -81,7 +81,7 @@
<hr /> <hr />
<button class="btn" @click="showDesc = !showDesc"> <button class="btn mb-2" @click="showDesc = !showDesc">
{{ showDesc ? $t("actions.minimize_description") : $t("actions.show_description") }} {{ showDesc ? $t("actions.minimize_description") : $t("actions.show_description") }}
</button> </button>
<!-- eslint-disable-next-line vue/no-v-html --> <!-- eslint-disable-next-line vue/no-v-html -->

View File

@ -190,6 +190,9 @@ const mixin = {
}, },
}, },
computed: { computed: {
theme() {
return this.getEffectiveTheme();
},
backgroundColor() { backgroundColor() {
return this.getEffectiveTheme() === "light" ? "#fff" : "#0b0e0f"; return this.getEffectiveTheme() === "light" ? "#fff" : "#0b0e0f";
}, },

23
windi.config.js Normal file
View File

@ -0,0 +1,23 @@
module.exports = {
darkMode: "media",
theme: {
extend: {
fontFamily: {
sans: [
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"Helvetica Neue",
"Arial",
"Noto Sans",
"sans-serif",
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji",
],
},
},
},
};