1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 14:28:10 +09:00

fix(safari): account for larger header in notifications/explore

This commit is contained in:
patak 2022-12-30 17:25:40 +01:00
parent 1a532265fb
commit 6c59791682
4 changed files with 5 additions and 3 deletions

View File

@ -4,11 +4,12 @@ defineProps<{
backOnSmallScreen?: boolean
/** Show the back button on both small and big screens */
back?: boolean
largeHeader?: boolean
}>()
</script>
<template>
<div relative mobile-padding-top sm:pt-0>
<div relative :class="largeHeader ? 'mobile-padding-top-large-header' : 'mobile-padding-top'" sm:pt-0>
<div
fixed sm:sticky w-full top-0 z10
border="b base" bg-base

View File

@ -26,7 +26,7 @@ const tabs = $computed(() => [
</script>
<template>
<MainContent>
<MainContent large-header>
<template #title>
<span text-lg font-bold flex items-center gap-2 cursor-pointer @click="$scrollToTop">
<div i-ri:hashtag />

View File

@ -26,7 +26,7 @@ onActivated(() => {
</script>
<template>
<MainContent>
<MainContent large-header>
<template #title>
<NuxtLink to="/notifications" text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<div i-ri:notification-4-line />

View File

@ -102,6 +102,7 @@ export default defineConfig({
}],
['box-shadow-outline', { 'box-shadow': '0 0 0 1px var(--c-primary)' }],
['mobile-padding-top', { 'padding-top': 'calc(4rem + 1px)' }], // in sm screen size header is fixed (instead of sticky) and parent have this padding, to prevent flickering in iOS Safari
['mobile-padding-top-large-header', { 'padding-top': 'calc(6.5rem + 1px)' }],
['mobile-padding-bottom', { 'padding-bottom': '3.5rem' }], // in sm screen size footer is fixed (instead of sticky) and parent have this padding, to prevent flickering in iOS Safari
],
})