Skip to content

Commit

Permalink
πŸ™πŸ₯“ ↝ Habby ideas [SGV2-10 SGV2-2 SGV2-1 SGV2-7]
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Apr 15, 2024
1 parent ecd0bf3 commit 5a07721
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 35 deletions.
4 changes: 2 additions & 2 deletions components/Content/Planets/GalleryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ const PlanetGalleryWithSectors: React.FC = () => {
let query = supabase
.from('basePlanets')
.select('*')
.order('created_at', { ascending: false })
.limit(200);
.order('created_at', { ascending: true })
.limit(3); // Set this to be owned planets

const { data, error } = await query;

Expand Down
38 changes: 36 additions & 2 deletions components/_Core/Section/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,19 @@ export const LayoutNoNav: React.FC<DashboardLayoutProps> = ({ children }) => {
const isDesktopOrLaptop = useMediaQuery({ query: '(min-width: 1224px)' });
const isTabletOrMobile = useMediaQuery({ query: '(max-width: 1224px)' });
const [showGalaxy, setShowGalaxy] = useState(true);
const [showFeedOverlay, setShowFeedOverlay] = useState(false);
const handleOpenFeedOverlay = () => {
setShowFeedOverlay(true);
setShowGalaxy(false)
};

return (
<div className="flex relative items-start h-screen overflow-hidden">
{isTabletOrMobile && (
<style jsx global>
{`
body {
background: url('satellite.jpg') center/cover;
background: url('https://cdn.cloud.scenario.com/assets-transform/asset_PYYjX5wik9uUqRFBRdYGYLsE?p=100&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9jZG4uY2xvdWQuc2NlbmFyaW8uY29tL2Fzc2V0cy10cmFuc2Zvcm0vYXNzZXRfUFlZalg1d2lrOXVVcVJGQlJkWUdZTHNFP3A9MTAwKiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcxNDUyMTU5OX19fV19&Key-Pair-Id=K36FIAB9LE2OLR&Signature=DboZe1XxGjahVU3yAzryD1Q9u9K8ED-SVG0uhVexkb9XwsAOpxE6yUJ4oJVzbe4L4AhZcpWpYCgU5E3K7IS3jpA~fqATCYOdw0zZMpGI2-dGhbrBBuszSEaBgv0llyAnYDTpSDIyfs8vTKfFsT-j5Kvg-TA0JbJtT74WPs9VSHKkH148XEqniSKNUM7Gj4yOHZ9zTwIP1l0y5SSUuPPIGt9hThis0BOMZbDMr~rKLW~XdU9RiUD25eEJwk9D-FEiXrEg8Vexiy~iKJSU6Bwv51bvdJJRWYoClv3iqYnuncIdbtGrA1KtpLaGyudZAvob-8ul3JaEJ3i-SsRzjAnwMA__') center/cover;
}
@media only screen and (max-width: 767px) {
Expand Down Expand Up @@ -193,11 +198,40 @@ export const LayoutNoNav: React.FC<DashboardLayoutProps> = ({ children }) => {
{/* Margin top class ensures 30px padding above the Garden component */}
<div className="mt-10 relative z-0">
{/* Garden component */}
<div className="fixed bottom-0 left-0 w-full">
<div className="fixed bottom-10 left-0 w-full">
<Garden onClose={() => setShowGalaxy(false)} />
</div>
</div>
</main>
{isMobile && (
<div className="md:hidden overflow-y-auto h-screen p-4">
<main className="h-max pb-10 grow">{children}</main>
<div className="mt-20">
{showFeedOverlay && (
<>
<div className="mt-20">
<FeedOverlay onClose={() => setShowFeedOverlay(false)} />
</div>
</>
)}
</div>
</div>
)}
<div className="mb-10"><div>
{!showFeedOverlay && (
<button
onClick={handleOpenFeedOverlay}
className="fixed bottom-2 left-1/2 transform -translate-x-1/2 mt-4 px-4 py-20 my-20 text-white rounded z-10"
>
<a href="#_" className="inline-flex overflow-hidden text-white rounded group">
<img src='/Galaxy/Kepler-22.png' height='100' width='100' />
</a>
</button>
)}
</div>{showGalaxy && (
<Garden onClose={() => setShowGalaxy(false)} />)}
</div>
)
</div>
);
};
34 changes: 3 additions & 31 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ export function PublicLanding() {
};
}, [profile]);

// Component context
const [showFeedOverlay, setShowFeedOverlay] = useState(false);
const handleOpenFeedOverlay = () => {
setShowFeedOverlay(true);
};

// Screen size parameters
const isDesktopOrLaptop = useMediaQuery({ query: '(min-width: 1224px)' });
const isTabletOrMobile = useMediaQuery({ query: '(max-width: 1224px)' });
Expand Down Expand Up @@ -150,38 +144,16 @@ export function PublicLanding() {
</div>
</div>
{isDesktopOrLaptop && (<OnboardingWindows />)}

</div>
<div className="absolute bottom-20 left-1/2 transform -translate-x-1/2 mb-20">
<div className="flex justify-center">
<PlanetCharacter position={characterPosition.planet} />
<RoverCharacter position={characterPosition.rover} />
</div>
</div>


<div className="mt-20">
{showFeedOverlay && (
<>
<div className="mt-20">
<FeedOverlay onClose={() => setShowFeedOverlay(false)} />
</div>
</>
)}
</div>
</div>

{/* Menu Button */}
<div className="mb-10">
{!showFeedOverlay && (
<button
onClick={handleOpenFeedOverlay}
className="fixed bottom-2 left-1/2 transform -translate-x-1/2 mt-4 px-4 py-20 my-20 text-white rounded z-10"
>
<a href="#_" className="inline-flex overflow-hidden text-white rounded group">
<img src='/Galaxy/Kepler-22.png' height='100' width='100' />
</a>
</button>
)}
</div>


{/* <div className="mt-10 relative z-0">
<Garden onClose={() => setShowGalaxy(false)} />
Expand Down

0 comments on commit 5a07721

Please sign in to comment.