-
Notifications
You must be signed in to change notification settings - Fork 235
Feat: Add mobile breakpoint blocker screen #2726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat-profiles
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| <script lang="ts"> | ||
| import { Card, Layout, Typography, Icon, Alert } from '@appwrite.io/pink-svelte'; | ||
| import { IconDeviceMobile, IconDesktopComputer } from '@appwrite.io/pink-icons-svelte'; | ||
| import { isSmallViewport } from '$lib/stores/viewport'; | ||
| </script> | ||
|
|
||
| {#if $isSmallViewport} | ||
| <div class="mobile-studio-scrim"> | ||
| <div class="mobile-studio-modal"> | ||
| <Card.Base variant="secondary" padding="l" radius="l"> | ||
| <Layout.Stack gap="l" alignItems="center" justifyContent="center"> | ||
| <Icon icon={IconDesktopComputer} size="l" color="--fgcolor-neutral-primary" /> | ||
| <Layout.Stack gap="m" alignItems="center"> | ||
| <Typography.Title size="l" align="center"> | ||
| This experience works best on a larger screen. | ||
| </Typography.Title> | ||
| <Typography.Text align="center" color="--fgcolor-neutral-secondary"> | ||
| We’re working on making Imagine Studio fully responsive for mobile. | ||
| For now, please use a tablet or desktop. | ||
| </Typography.Text> | ||
| </Layout.Stack> | ||
| <div class="studio-alert-wrapper"> | ||
| <Alert.Inline status="info" title="Quick tip"> | ||
| <svelte:fragment slot="icon"> | ||
| <Icon icon={IconDeviceMobile} size="m" /> | ||
| </svelte:fragment> | ||
| You can enable desktop mode in your mobile browser. | ||
| </Alert.Inline> | ||
| </div> | ||
| </Layout.Stack> | ||
| </Card.Base> | ||
| </div> | ||
| </div> | ||
| {/if} | ||
|
|
||
| <style> | ||
| .mobile-studio-scrim { | ||
| position: fixed; | ||
| top: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| background-color: hsl(240 5% 8% / 0.6); | ||
| backdrop-filter: blur(4px); | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| z-index: 9999; | ||
| padding: var(--space-6, 12px); | ||
| } | ||
|
|
||
| .mobile-studio-modal { | ||
| width: 100%; | ||
| max-width: 480px; | ||
| } | ||
|
|
||
| .studio-alert-wrapper { | ||
| margin-block-start: var(--space-2, 4px); | ||
| width: 100%; | ||
| } | ||
|
HarshMN2345 marked this conversation as resolved.
Outdated
|
||
|
|
||
| /* Prevent background scroll when mobile message is shown */ | ||
| :global(html:has(.mobile-studio-scrim)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there no other way 🫠?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have also been using this class in verification block 👍 and since this is temporary do we really need it to be added in main root layout?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it need to be static though? if its not static we can just scroll 👍🏻 |
||
| height: 100%; | ||
| overflow: hidden !important; | ||
| } | ||
| </style> | ||
Uh oh!
There was an error while loading. Please reload this page.