Skip to content

Commit b9bb980

Browse files
committed
fix(poster): adjust responsive design on small screens
1 parent c4cdea3 commit b9bb980

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

src/components/views/panel/PanelContent.vue

+4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ const onTouchEnd = (e: TouchEvent) => {
8585
opacity: 0;
8686
}
8787
}
88+
89+
@media (width < 725px) {
90+
padding: 0 0.75rem 1rem;
91+
}
8892
}
8993
}
9094
</style>

src/components/views/panel/PanelPoster.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,22 @@ const { openTab } = useLinksStore();
108108
@include transition.scale;
109109
110110
.poster-container {
111-
--poster-height: calc(min(var(--half-width), var(--height-70-dvh)) * (9 / 16));
111+
--min-width: var(--half-width);
112+
--poster-height: calc(min(var(--min-width), var(--height-70-dvh)) * (9 / 16));
112113
--poster-width: calc(var(--poster-height) * (2 / 3));
113114
115+
@media (width < 725px) {
116+
--min-width: calc(var(--width-80-dvh) - 2rem);
117+
}
118+
114119
&.link {
115120
@include mixin.hover-box-shadow;
116121
117122
cursor: pointer;
118123
}
119124
120125
&.landscape:not(:has(.poster.portrait)) {
121-
--poster-width: min(var(--half-width), var(--height-70-dvh));
126+
--poster-width: min(var(--min-width), var(--height-70-dvh));
122127
--poster-height: calc(var(--poster-width) * (9 / 16));
123128
}
124129

src/components/views/panel/PanelStatistics.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ const isCompact = watchMedia('(max-width: 725px)');
3737

3838
<template>
3939
<NFlex class="statistics-container" justify="center">
40-
<slot v-if="isCompact" />
40+
<div v-if="isCompact" class="slot-container">
41+
<slot />
42+
</div>
4143
<PanelRatings v-if="enableRatings" :ratings="ratings" />
4244
<slot v-if="!isCompact" />
4345
<PanelScore
@@ -53,4 +55,9 @@ const isCompact = watchMedia('(max-width: 725px)');
5355
.statistics-container {
5456
width: 100%;
5557
}
58+
59+
.slot-container {
60+
display: flex;
61+
flex: 1 1 100%;
62+
}
5663
</style>

src/components/views/panel/ShowPanelButtons.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,15 @@ onMounted(() => fetchLists());
325325
.panel-buttons {
326326
display: flex;
327327
flex-wrap: wrap;
328-
gap: 1.25rem;
328+
gap: 1.25rem 0;
329329
align-items: center;
330330
justify-content: center;
331331
width: 100%;
332332
margin: 1rem 1rem 1.25rem;
333333
334334
.button-container {
335335
margin: auto;
336+
padding: 0 0.5rem;
336337
337338
i {
338339
margin-left: calc(0% - var(--n-icon-margin));
@@ -361,6 +362,7 @@ onMounted(() => fetchLists());
361362
}
362363
363364
&:not(.visible) {
365+
padding: 0;
364366
cursor: default;
365367
pointer-events: none;
366368
}

src/styles/base.scss

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
--half-width: 50dvw;
2222
--width-40-dvh: 40dvw;
2323
--width-70-dvh: 70dvw;
24+
--width-80-dvh: 80dvw;
2425

2526
/* font variables */
2627
--font-size-xxs: 0.625rem;

0 commit comments

Comments
 (0)