Fixup a few things and use fontsource instead of Google Fonts

This commit is contained in:
root
2021-08-28 06:18:59 +05:30
parent 722369df15
commit 846a0b476e
11 changed files with 70 additions and 47 deletions
+1
View File
@@ -9,6 +9,7 @@
"dependencies": {
"@babel/eslint-parser": "^7.15.0",
"@fontsource/baloo-da-2": "^4.5.0",
"@fontsource/roboto": "^4.5.0",
"core-js": "^3.16.1",
"dompurify": "^2.3.1",
"hotkeys-js": "^3.8.7",
-1
View File
@@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" rel="stylesheet">
</head>
<body>
+1
View File
@@ -1,6 +1,7 @@
import Vue from 'vue'
import App from './App.vue'
import '@fontsource/roboto/latin.css'
import '@/styles/main.scss'
import { i18n } from '@/plugins/i18n'
+3 -3
View File
@@ -25,14 +25,14 @@ async function syncStylesPerLanguage (locale) {
case 'lt':
case 'ml':
case 'tr':
case 'bn-latn':
case 'bn_latn':
// Don't need to import fonts because Latin fonts are always loaded
document.body.classList.remove(...document.body.classList)
document.body.classList.add('latin')
break
// Bengali script
case 'bn-beng':
await import('@fontsource/baloo-da-2/index.css')
case 'bn_beng':
await import('@fontsource/baloo-da-2/bengali.css')
document.body.classList.remove(...document.body.classList)
document.body.classList.add('bengali')
break
+1 -32
View File
@@ -6,7 +6,7 @@
<v-col md="8" offset-md="2">
<v-card>
<v-img v-if="playlist.avatarUrl" :src="playlist.avatarUrl" />
<v-card-title class="display-1">
<v-card-title class="text-h4">
{{ playlist.name }}
</v-card-title>
<v-card-text>
@@ -47,37 +47,6 @@
</v-col>
</v-row>
</v-container>
<div v-else-if="playlist" v-show="!playlist.error">
<h1 class="uk-text-center">
<img v-bind:src="playlist.avatarUrl" height="48" width="48" loading="lazy" />
{{ playlist.name }}
</h1>
<b
><router-link class="uk-text-justify" v-bind:to="playlist.uploaderUrl || '/'">
<img v-bind:src="playlist.uploaderAvatar" loading="lazy" />
{{ playlist.uploader }}</router-link
></b
>
<div class="uk-align-right">
<b>{{ playlist.videos }} Videos</b>
<br />
<a :href="getRssUrl"><font-awesome-icon icon="rss"></font-awesome-icon></a>
</div>
<hr />
<div class="uk-grid-xl" uk-grid="parallax: 0">
<div
class="uk-width-1-2 uk-width-1-3@m uk-width-1-4@l uk-width-1-5@xl"
v-bind:key="video.url"
v-for="video in this.playlist.relatedStreams"
>
<VideoItem :video="video" height="94" width="168" />
</div>
</div>
</div>
</template>
<script>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<v-container fluid>
<h1 class="display-1 text-center">Preferences</h1>
<h1 class="text-h4 text-center">Preferences</h1>
<v-divider class="ma-4" />
<div style="display: flex;" v-for="(opt, optId) in options" :key="optId">
<v-simple-checkbox v-if="opt.type === 'bool'" :value="$store.getters.getPreferenceBoolean(opt.id, opt.default)" @input="setValue(opt.id, $event)" />
+5 -3
View File
@@ -1,6 +1,6 @@
<template>
<v-container fluid>
<h3 class="display-1 justify-center">Trending</h3>
<h3 class="text-h4 justify-center">{{ $t('titles.trending') }}</h3>
<v-divider class="my-4" />
@@ -24,8 +24,10 @@ export default {
}
},
metaInfo: {
title: 'Trending'
metaInfo () {
return {
title: this.$t('titles.trending')
}
},
mounted () {
+2 -2
View File
@@ -76,12 +76,12 @@
<v-row>
<v-col md="8" offset-md="1" v-if="comments && comments.comments">
<h5 class="display-1 text-center my-4">Comments</h5>
<h5 class="text-h4 text-center my-4">Comments</h5>
<VideoComment v-for="comment in comments.comments" :key="comment.commentId" :comment="comment" :video="video" class="my-4" />
<v-progress-linear indeterminate v-intersect="onCommentsProgressIntersect" v-if="comments.comments.length !== 0" />
</v-col>
<v-col md="2" v-if="video && video.relatedStreams">
<h5 class="display-1 text-center my-4">Related Videos</h5>
<h5 class="text-h4 text-center my-4">Related Videos</h5>
<VideoItem class="my-4" v-for="related in video.relatedStreams" :video="related" :key="related.url" />
</v-col>
</v-row>
+46
View File
@@ -0,0 +1,46 @@
{
"titles": {
"trending": "Trending",
"login": "Login",
"register": "Register",
"feed": "Āpanāra phiḍ",
"preferences": "Pachanda anuyāẏī māniẏē nin",
"history": "Ēkhana paryanta ki dēkhēchēn"
},
"actions": {
"subscribe": "Sadasyatā nin",
"unsubscribe": "Sadasyatā parityāga",
"view_subscriptions": "Sadasyatāra tālikā",
"sort_by": "Sort by:",
"most_recent": "Most Recent",
"least_recent": "Least Recent",
"channel_name_asc": "Channel Name (A-Z)",
"channel_name_desc": "Channel Name (Z-A)",
"back": "Back",
"uses_api_from": "Uses the API from ",
"enable_sponsorblock": "Enable Sponsorblock",
"skip_sponsors": "Skip Sponsors",
"skip_intro": "Skip Intermission/Intro Animation",
"skip_outro": "Skip Endcards/Credits",
"skip_preview": "Skip Preview/Recap",
"skip_interaction": "Skip Interaction Reminder (Subscribe)",
"skip_self_promo": "Skip Unpaid/Self Promotion",
"skip_non_music": "Skip Music: Non-Music Section",
"theme": "Theme",
"auto": "Auto",
"dark": "Dark",
"light": "Light",
"autoplay_video": "Autoplay Video",
"audio_only": "Audio Only",
"default_quality": "Default Quality",
"buffering_goal": "Buffering Goal (in seconds)",
"country_selection": "Country Selection",
"default_homepage": "Default Homepage",
"show_comments": "Show Comments",
"minimize_description": "Minimize Description by default",
"store_watch_history": "Store Watch History",
"language_selection": "Language Selection",
"instances_list": "Instances List",
"enabled_codecs": "Enabled Codecs (Multiple)"
}
}
+5 -5
View File
@@ -4,13 +4,13 @@
"login": "Login",
"register": "Register",
"feed": "Āpanāra phiḍ",
"preferences": "Āpanāra pachanda anuyāẏī māniẏē nin",
"watchHistory": "Ēkhana paryanta ki dēkhēchēn"
"preferences": "Pachanda anuyāẏī māniẏē nin",
"history": "Ēkhana paryanta ki dēkhēchēn"
},
"actions": {
"subscribe": "Subscribe",
"unsubscribe": "Unsubscribe",
"view_subscriptions": "View Subscriptions",
"subscribe": "Sadasyatā nin",
"unsubscribe": "Sadasyatā parityāga",
"view_subscriptions": "Sadasyatāra tālikā",
"sort_by": "Sort by:",
"most_recent": "Most Recent",
"least_recent": "Least Recent",
+5
View File
@@ -946,6 +946,11 @@
resolved "https://registry.yarnpkg.com/@fontsource/baloo-da-2/-/baloo-da-2-4.5.0.tgz#2174da30951e71103859cee9661e80f81d72fed8"
integrity sha512-M3eJ9rXCYt83ENTIpYqy7OuA/Epqd8LYfqUEerT2XVEVXkHMfb+J7BJu8OIv+fq1COegntL1YyznkJuDzF40RQ==
"@fontsource/roboto@^4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@fontsource/roboto/-/roboto-4.5.0.tgz#d6f925668ba6af46707f1040c43aff498ba204bb"
integrity sha512-ja4XYw/9kNRFM5Ndk9vwzHWsdBMXczyBazFkTXJQ74QQBnT0BbSsHn0pF60AU0Iznig1Wt9x3rADfG8LANvMpw==
"@hapi/address@2.x.x":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"