Skip to content

Commit

Permalink
stickyBottom
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Oct 10, 2024
1 parent 059f067 commit 554238e
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/frontend-embed/src/components/EmNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ const isDeleted = ref(false);
width: 100%;
margin-top: 14px;
position: sticky;
bottom: calc(var(--stickyBottom, 0px) + 14px);
bottom: calc(var(--MI-stickyBottom, 0px) + 14px);
}
.showLessLabel {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-embed/src/components/EmNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const collapsed = ref(appearNote.value.cw == null && isLong);
width: 100%;
margin-top: 14px;
position: sticky;
bottom: calc(var(--stickyBottom, 0px) + 14px);
bottom: calc(var(--MI-stickyBottom, 0px) + 14px);
}
.showLessLabel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const collapsed = ref(isLong);
width: 100%;
margin-top: 14px;
position: sticky;
bottom: calc(var(--stickyBottom, 0px) + 14px);
bottom: calc(var(--MI-stickyBottom, 0px) + 14px);
}
.showLessLabel {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkFolder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ onMounted(() => {
.footer {
position: sticky !important;
z-index: 1;
bottom: var(--stickyBottom, 0px);
bottom: var(--MI-stickyBottom, 0px);
left: 0;
padding: 12px;
background: var(--MI_THEME-acrylicBg);
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ function emitUpdReaction(emoji: string, delta: number) {
width: 100%;
margin-top: 14px;
position: sticky;
bottom: calc(var(--stickyBottom, 0px) + 14px);
bottom: calc(var(--MI-stickyBottom, 0px) + 14px);
}
.showLessLabel {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkSubNoteContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const collapsed = ref(isLong);
width: 100%;
margin-top: 14px;
position: sticky;
bottom: calc(var(--stickyBottom, 0px) + 14px);
bottom: calc(var(--MI-stickyBottom, 0px) + 14px);
}
.showLessLabel {
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/components/global/MkStickyContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ onMounted(() => {
watch(childStickyBottom, () => {
if (bodyEl.value == null) return;
bodyEl.value.style.setProperty('--stickyBottom', `${childStickyBottom.value}px`);
bodyEl.value.style.setProperty('--MI-stickyBottom', `${childStickyBottom.value}px`);
}, {
immediate: true,
});
Expand All @@ -90,7 +90,7 @@ onMounted(() => {
if (footerEl.value != null) {
footerEl.value.style.position = 'sticky';
footerEl.value.style.bottom = 'var(--stickyBottom, 0)';
footerEl.value.style.bottom = 'var(--MI-stickyBottom, 0)';
footerEl.value.style.zIndex = '1';
observer.observe(footerEl.value);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ definePageMetadata(() => ({

<style lang="scss" module>
.main {
min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--stickyBottom, 0px)));
min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--MI-stickyBottom, 0px)));
}
.footer {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ definePageMetadata(() => ({
</script>
<style lang="scss" module>
.main {
min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--stickyBottom, 0px)));
min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--MI-stickyBottom, 0px)));
}
.userItem {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/my-lists/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ definePageMetadata(() => ({

<style lang="scss" module>
.main {
min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--stickyBottom, 0px)));
min-height: calc(100cqh - (var(--stickyTop, 0px) + var(--MI-stickyBottom, 0px)));
}
.userItem {
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/ui/universal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ provide<Ref<number>>(CURRENT_STICKY_BOTTOM, navFooterHeight);
watch(navFooter, () => {
if (navFooter.value) {
navFooterHeight.value = navFooter.value.offsetHeight;
document.body.style.setProperty('--stickyBottom', `${navFooterHeight.value}px`);
document.body.style.setProperty('--MI-stickyBottom', `${navFooterHeight.value}px`);
document.body.style.setProperty('--MI-minBottomSpacing', 'var(--MI-minBottomSpacingMobile)');
} else {
navFooterHeight.value = 0;
document.body.style.setProperty('--stickyBottom', '0px');
document.body.style.setProperty('--MI-stickyBottom', '0px');
document.body.style.setProperty('--MI-minBottomSpacing', '0px');
}
}, {
Expand Down

0 comments on commit 554238e

Please sign in to comment.