Fix css
This commit is contained in:
@@ -2,27 +2,11 @@
|
|||||||
import ChatApp from './lib/ChatApp.svelte';
|
import ChatApp from './lib/ChatApp.svelte';
|
||||||
import BackButton from "./lib/BackButton.svelte";
|
import BackButton from "./lib/BackButton.svelte";
|
||||||
import "./assets/app.css"
|
import "./assets/app.css"
|
||||||
import { onMount } from 'svelte';
|
|
||||||
|
|
||||||
let isKeyboardActive = false;
|
|
||||||
|
|
||||||
function handleResize() {
|
|
||||||
const isVirtualKeyboardActive = window.innerHeight < window.outerHeight;
|
|
||||||
isKeyboardActive = isVirtualKeyboardActive;
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => {
|
|
||||||
window.addEventListener('resize', handleResize);
|
|
||||||
return () => {
|
|
||||||
window.removeEventListener('resize', handleResize);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div>
|
<div>
|
||||||
<header id="header" class={isKeyboardActive ? 'sticky-header' : ''}><BackButton /><span id="ramiza-ime">Ramiza</span><span id="threedotsmenu"> ⋮ </span></header>
|
<header id="header"><BackButton /><span id="ramiza-ime">Ramiza</span><span id="threedotsmenu"> ⋮ </span></header>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<ChatApp />
|
<ChatApp />
|
||||||
@@ -31,13 +15,5 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.sticky-header {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 9999;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2.5rem; /* Footer height */
|
|
||||||
border-top: lightgray 1px solid;
|
border-top: lightgray 1px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user