Skip to content

Commit 546d8f1

Browse files
committed
fix(css): fix loading skeleton width on small screens
1 parent 0696c57 commit 546d8f1

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

src/components/views/panel/MoviePanel.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ onMounted(() => {
286286
<NSkeleton
287287
v-else
288288
class="show-title-skeleton"
289-
style="width: var(--half-height)"
289+
style="width: min(var(--half-width), var(--height-70-dvh))"
290290
round
291291
/>
292292

@@ -323,6 +323,7 @@ onMounted(() => {
323323

324324
<style lang="scss" scoped>
325325
.panel-container {
326+
// everything under the poster
326327
& > div:nth-child(n + 3) {
327328
@media (width > 1200px) {
328329
max-width: min(var(--half-width), var(--height-70-dvh));

src/components/views/panel/PanelOverview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defineProps({
2828
<AnchorLink v-if="title" class="title" :href="url" :title="label" :component="NH4">
2929
{{ title }}
3030
</AnchorLink>
31-
<NSkeleton v-else class="title-skeleton" style="width: var(--height-40-dvh)" round />
31+
<NSkeleton v-else class="title-skeleton" style="width: var(--width-40-dvh)" round />
3232

3333
<div v-if="overview">{{ overview }}</div>
3434
<NSkeleton v-else style="width: 100%" :repeat="3" :sharp="false" />

src/components/views/panel/PersonPanel.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const titleUrl = computed(() => {
8282
<NSkeleton
8383
v-else
8484
class="show-title-skeleton"
85-
style="width: var(--half-height)"
85+
style="width: min(var(--half-width), var(--height-70-dvh))"
8686
round
8787
/>
8888

@@ -96,6 +96,7 @@ const titleUrl = computed(() => {
9696

9797
<style lang="scss" scoped>
9898
.panel-container {
99+
// everything under the posters
99100
& > div:nth-child(n + 3) {
100101
@media (width > 1200px) {
101102
max-width: min(var(--half-width), var(--height-70-dvh));

src/components/views/panel/ShowPanel.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ onMounted(() => {
425425
<NSkeleton
426426
v-else
427427
class="show-title-skeleton"
428-
style="width: var(--half-height)"
428+
style="width: min(var(--half-width), var(--height-70-dvh))"
429429
round
430430
/>
431431

@@ -492,6 +492,7 @@ onMounted(() => {
492492

493493
<style lang="scss" scoped>
494494
.panel-container {
495+
// everything under the poster
495496
& > div:nth-child(n + 3) {
496497
@media (width > 1200px) {
497498
max-width: min(var(--half-width), var(--height-70-dvh));

src/styles/base.scss

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
/** width */
1616
--full-width: 100dvw;
1717
--half-width: 50dvw;
18+
--width-40-dvh: 40dvw;
19+
--width-70-dvh: 70dvw;
1820

1921
/* font variables */
2022
--font-size-xxs: 0.625rem;

0 commit comments

Comments
 (0)