Skip to content

Commit

Permalink
Fix bottom controls spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonamil committed Jul 8, 2024
1 parent bdc551d commit 5450c79
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/components/PageColumnControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
class="flex flex-initial items-center bg-controls-color"
:class="[
view.isTouchDevice ? 'h-12' : 'h-10',
bottom && view.isTouchDevice ? 'h-[calc(3rem+env(safe-area-inset-bottom))] py-1' : '',
bottom && view.isStandaloneDisplayMode
? 'h-auto pb-[calc(0.25rem+env(safe-area-inset-bottom))] pt-1'
: '',
]"
>
<div class="flex flex-1 items-center gap-1 px-1">
Expand Down
7 changes: 4 additions & 3 deletions src/stores/ViewStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const useViewStore = defineStore('view', () => {
});

const isTouchDevice = useMediaQuery('(pointer: coarse)');
const isStandaloneDisplayMode = useMediaQuery('(display-mode: standalone)');
const { width: windowWidth } = useWindowSize();

const prioritizedView = useStorage<'link' | 'comments'>('prioritizedView', 'link');

const { width: windowWidth } = useWindowSize();

// number of columns available depending on window width
const availableColumns = computed((): 1 | 2 | 3 => {
if (windowWidth.value < 721) return 1;
Expand Down Expand Up @@ -84,8 +84,9 @@ export const useViewStore = defineStore('view', () => {
colorScheme,
darkColorSchemeIsActive,
isTouchDevice,
prioritizedView,
isStandaloneDisplayMode,
windowWidth,
prioritizedView,
availableColumns,
secondaryColumn,
commentsColumn,
Expand Down

1 comment on commit 5450c79

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for hackernews-dot-cool ready!

✅ Preview
https://hackernews-dot-cool-8s68qqswg-jonamil-56ba8df7.vercel.app

Built with commit 5450c79.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.