mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-06 19:25:24 +00:00
feat(web): update ui
This commit is contained in:
parent
368d7d0c91
commit
03c1268076
@ -46,7 +46,7 @@
|
|||||||
let selectedTags: Record<string, boolean> = {};
|
let selectedTags: Record<string, boolean> = {};
|
||||||
let selectedDates: Record<string, boolean> = {};
|
let selectedDates: Record<string, boolean> = {};
|
||||||
|
|
||||||
const debounceDelay = 300;
|
const debounceDelay = 500;
|
||||||
const apiEndpoint =
|
const apiEndpoint =
|
||||||
typeof PUBLIC_API_ENDPOINT !== 'undefined' ? PUBLIC_API_ENDPOINT : window.location.origin;
|
typeof PUBLIC_API_ENDPOINT !== 'undefined' ? PUBLIC_API_ENDPOINT : window.location.origin;
|
||||||
|
|
||||||
@ -62,9 +62,10 @@
|
|||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
if (window.scrollY > 200) {
|
console.log(window.scrollY)
|
||||||
|
if (window.scrollY > 100) {
|
||||||
isScrolled = true;
|
isScrolled = true;
|
||||||
} else if (isScrolled && window.scrollY < 50) {
|
} else if (isScrolled && window.scrollY < 20) {
|
||||||
isScrolled = false;
|
isScrolled = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -270,7 +271,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- 添加一个动态调整高度的空白区域 -->
|
<!-- 添加一个动态调整高度的空白区域 -->
|
||||||
<div style="height: {isScrolled ? '50px' : '0px'}"></div>
|
<div style="height: {isScrolled ? '100px' : '0px'}"></div>
|
||||||
|
|
||||||
<div class="mx-auto flex flex-col sm:flex-row">
|
<div class="mx-auto flex flex-col sm:flex-row">
|
||||||
<!-- Left panel for tags and created_date -->
|
<!-- Left panel for tags and created_date -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user