mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-20 01:58:34 +00:00
fix app height for ios
This commit is contained in:
parent
ceb3aa0627
commit
f3f18ffca7
@ -80,4 +80,13 @@ const { strudelTheme } = settings;
|
|||||||
}
|
}
|
||||||
setTheme(get().theme);
|
setTheme(get().theme);
|
||||||
watch(setTheme, 'theme');
|
watch(setTheme, 'theme');
|
||||||
|
// https://medium.com/quick-code/100vh-problem-with-ios-safari-92ab23c852a8
|
||||||
|
const appHeight = () => {
|
||||||
|
const doc = document.documentElement;
|
||||||
|
doc.style.setProperty('--app-height', `${window.innerHeight}px`);
|
||||||
|
};
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
window.addEventListener('resize', appHeight);
|
||||||
|
appHeight();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -30,7 +30,7 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
|
|||||||
</title>
|
</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="h-screen text-gray-50 bg-background">
|
<body class="h-app-height text-gray-50 bg-background">
|
||||||
<div class="w-full h-full space-y-4 flex flex-col">
|
<div class="w-full h-full space-y-4 flex flex-col">
|
||||||
<header class="max-w-full fixed top-0 w-full z-[100]">
|
<header class="max-w-full fixed top-0 w-full z-[100]">
|
||||||
<Header currentPage={currentPage} />
|
<Header currentPage={currentPage} />
|
||||||
|
|||||||
@ -25,6 +25,9 @@ module.exports = {
|
|||||||
gutterBorder: 'var(--gutterBorder)',
|
gutterBorder: 'var(--gutterBorder)',
|
||||||
lineHighlight: 'var(--lineHighlight)',
|
lineHighlight: 'var(--lineHighlight)',
|
||||||
},
|
},
|
||||||
|
spacing: {
|
||||||
|
'app-height': 'var(--app-height)',
|
||||||
|
},
|
||||||
typography(theme) {
|
typography(theme) {
|
||||||
return {
|
return {
|
||||||
DEFAULT: {
|
DEFAULT: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user