mobile fixes

This commit is contained in:
nicwands 2026-06-26 12:02:56 -04:00
parent cb1d65e0b8
commit 046ac56f58
6 changed files with 13 additions and 6 deletions

View file

@ -31,8 +31,6 @@ const { data: global } = await useStrapiGlobal()
const { isMobile } = useBreakpoints() const { isMobile } = useBreakpoints()
const { height: headerHeight } = useElementSize(header) const { height: headerHeight } = useElementSize(header)
const headerCopy = computed(() => global.value?.header_copy) const headerCopy = computed(() => global.value?.header_copy)
const headerDl = computed(() => global.value?.header_dl) const headerDl = computed(() => global.value?.header_dl)
const mosaicItems = computed(() => global.value?.mosaic_items || []) const mosaicItems = computed(() => global.value?.mosaic_items || [])

View file

@ -204,6 +204,7 @@ defineExpose({ animateIn, animateOut })
&.dl { &.dl {
padding: mobile-vw(12px) mobile-vw(10px); padding: mobile-vw(12px) mobile-vw(10px);
margin: 0;
} }
&.gif { &.gif {
.strapi-media { .strapi-media {
@ -214,7 +215,7 @@ defineExpose({ animateIn, animateOut })
} }
&.content { &.content {
grid-column: 1/-1; grid-column: 1/-1;
max-height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
position: relative; position: relative;

View file

@ -11,7 +11,7 @@
v-for="(cell, i) in content.cells" v-for="(cell, i) in content.cells"
:class="[ :class="[
'mosaic-cell', 'mosaic-cell',
`layout-${cell.width >= cell.height ? 'landscape' : 'portrait'}`, `layout-${cell.width * wWidth >= cell.height * wHeight ? 'landscape' : 'portrait'}`,
]" ]"
:style="{ :style="{
left: cell.x * 100 + 'vw', left: cell.x * 100 + 'vw',
@ -41,6 +41,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import gsap from 'gsap' import gsap from 'gsap'
import { useWindowSize } from '@vueuse/core'
const THEME_S = 90 const THEME_S = 90
const THEME_L = 50 const THEME_L = 50
@ -63,6 +64,8 @@ const hoverColors = ref(
), ),
) )
const { width: wWidth, height: wHeight } = useWindowSize()
const onMouseEnter = (i) => { const onMouseEnter = (i) => {
hoverColors.value[i] = hoverColors.value[i] =
`hsl(${Math.random() * 360}deg ${THEME_S}% ${THEME_L}%)` `hsl(${Math.random() * 360}deg ${THEME_S}% ${THEME_L}%)`
@ -105,6 +108,7 @@ const onIntersect = (isIntersecting) => {
&.layout-portrait { &.layout-portrait {
.strapi-media { .strapi-media {
width: 40%; width: 40%;
aspect-ratio: 1;
} }
} }
&.layout-landscape { &.layout-landscape {

View file

@ -33,6 +33,10 @@ const props = defineProps({
overflow-x: auto; overflow-x: auto;
} }
em {
font-style: italic;
}
a { a {
text-decoration: underline; text-decoration: underline;
} }

View file

@ -6,7 +6,7 @@
<script setup> <script setup>
import { useStrapiGlobal } from '@/composables/useStrapi' import { useStrapiGlobal } from '@/composables/useStrapi'
import { computed, onBeforeUnmount, onMounted, ref } from 'vue' import { computed, onMounted, ref } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()

View file

@ -39,7 +39,7 @@
font-family: var(--font-sans); font-family: var(--font-sans);
font-weight: 400; font-weight: 400;
line-height: 1.3; line-height: 1.3;
@include size-font(8px, 14px); @include size-font(10px, 14px);
} }
@mixin label { @mixin label {