Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Mobile adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbo committed Oct 31, 2024
1 parent 3a6aec9 commit 328c00f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion components/AppPageLoader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const isLoaded = computed(() => !isLoading.value)
<template>
<div class="relative">
<div
class="relative px-4 py-6 sm:py-20"
class="relative px-4 pb-20 pt-6 sm:pt-20"
:class="{
'opacity-0': !isLoaded,
'animate-fade-in opacity-100 transition-opacity delay-200 duration-300':
Expand Down
25 changes: 10 additions & 15 deletions domains/grid/components/GridFloatingMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const handleAddGrid = () => {
const handleStyle = computed(() => {
return {
bottom: `${bottom.value}px`,
transition: 'bottom 0.3s ease-in-out',
transition: 'all 0.3s ease-in-out',
}
})
Expand Down Expand Up @@ -103,11 +103,9 @@ const styles = computed(() => {
})
const handleScroll = () => {
if (isMobile.value) {
bottom.value = BOTTOM_MARGIN_MOBILE_PX
return
}
const bottomMargin = isMobile.value
? BOTTOM_MARGIN_MOBILE_PX
: BOTTOM_MARGIN_DESKTOP_PX
const bottomOffset =
(document.querySelector('lukso-footer')?.clientHeight || 0) +
BOTTOM_MARGIN_DESKTOP_PX
Expand All @@ -117,13 +115,9 @@ const handleScroll = () => {
if (scrollTop + windowHeight + bottomOffset >= documentHeight) {
bottom.value =
scrollTop +
windowHeight +
bottomOffset +
BOTTOM_MARGIN_DESKTOP_PX -
documentHeight
scrollTop + windowHeight + bottomOffset + bottomMargin - documentHeight
} else {
bottom.value = BOTTOM_MARGIN_DESKTOP_PX
bottom.value = bottomMargin
}
}
Expand All @@ -139,10 +133,11 @@ onUnmounted(() => {
<template>
<div
v-if="isConnected && isViewingOwnProfile"
class="fixed right-4 z-50 flex animate-fade-in gap-6 overflow-hidden rounded-full bg-neutral-100 p-3 shadow-neutral-drop-shadow duration-300 ease-in-out sm:bottom-10 sm:right-10 sm:flex-col sm:transition-height lg:right-[calc(50%-540px)]"
class="fixed z-50 flex animate-fade-in gap-6 overflow-hidden rounded-full bg-neutral-100 p-3 shadow-neutral-drop-shadow duration-300 ease-in-out sm:bottom-10 sm:right-10 sm:flex-col sm:transition lg:right-[calc(50%-540px)]"
:class="{
'h-[64px] w-[320px] sm:h-[320px] sm:w-[64px]': isEditingGrid,
'size-[64px]': !isEditingGrid,
'right-[calc(50%-160px)] h-[64px] w-[320px] sm:h-[320px] sm:w-[64px]':
isEditingGrid,
'right-4 size-[64px]': !isEditingGrid,
}"
:style="handleStyle"
>
Expand Down

0 comments on commit 328c00f

Please sign in to comment.