Skip to content

Commit

Permalink
fix: reduces padding on mobile (#2476)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 authored Nov 6, 2023
1 parent 11298e8 commit 38d1f99
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 25 deletions.
1 change: 1 addition & 0 deletions assets/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ declare module 'vue' {
'Octicon:container24': typeof import('~icons/octicon/container24')['default']
'Octicon:download24': typeof import('~icons/octicon/download24')['default']
'Octicon:trash24': typeof import('~icons/octicon/trash24')['default']
PageWithLinks: typeof import('./components/PageWithLinks.vue')['default']
'Ph:command': typeof import('~icons/ph/command')['default']
'Ph:computerTower': typeof import('~icons/ph/computer-tower')['default']
'Ph:controlBold': typeof import('~icons/ph/control-bold')['default']
Expand Down
12 changes: 12 additions & 0 deletions assets/components/PageWithLinks.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div class="flex flex-col gap-8 px-4 py-8 md:px-8">
<section>
<links />
</section>
<slot></slot>
</div>
</template>

<script setup lang="ts"></script>

<style scoped></style>
4 changes: 1 addition & 3 deletions assets/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<pane min-size="10">
<splitpanes>
<pane class="router-view min-h-screen">
<Suspense>
<router-view></router-view>
</Suspense>
<router-view></router-view>
</pane>
<template v-if="!isMobile">
<pane v-for="other in activeContainers" :key="other.id">
Expand Down
12 changes: 7 additions & 5 deletions assets/pages/[...all].vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<div class="hero min-h-screen bg-base-200">
<div class="hero-content text-center">
<div class="max-w-md">
<p class="py-6 text-2xl font-bold">{{ $t("error.page-not-found") }}</p>
<page-with-links>
<div class="hero min-h-screen bg-base-200">
<div class="hero-content text-center">
<div class="max-w-md">
<p class="py-6 text-2xl font-bold">{{ $t("error.page-not-found") }}</p>
</div>
</div>
</div>
</div>
</page-with-links>
</template>

<script lang="ts" setup>
Expand Down
11 changes: 4 additions & 7 deletions assets/pages/content/[id].vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<template>
<div class="flex flex-col gap-8 p-8">
<page-with-links>
<section>
<links />
<article class="prose" v-html="data.content" v-if="data"></article>
</section>
<section>
<article class="prose" v-html="data!.content"></article>
</section>
</div>
</page-with-links>
</template>

<script lang="ts" setup>
const { id } = defineProps<{ id: string }>();
const { data } = await useFetch(() => withBase("/api/content/" + id), {
const { data } = useFetch(() => withBase("/api/content/" + id), {
refetch: true,
})
.get()
Expand Down
7 changes: 2 additions & 5 deletions assets/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<div class="flex flex-col gap-16 p-8">
<section>
<links />
</section>
<page-with-links class="gap-16">
<section>
<div class="stats grid bg-base-lighter shadow">
<div class="stat">
Expand All @@ -28,7 +25,7 @@
<section>
<container-table :containers="runningContainers"></container-table>
</section>
</div>
</page-with-links>
</template>

<script lang="ts" setup>
Expand Down
7 changes: 2 additions & 5 deletions assets/pages/settings.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<div class="flex flex-col gap-8 p-8">
<section>
<links />
</section>
<page-with-links>
<section>
<div class="has-underline">
<h2>{{ $t("settings.about") }}</h2>
Expand Down Expand Up @@ -88,7 +85,7 @@
<toggle v-model="automaticRedirect">{{ $t("settings.automatic-redirect") }}</toggle>
</div>
</section>
</div>
</page-with-links>
</template>

<script lang="ts" setup>
Expand Down

0 comments on commit 38d1f99

Please sign in to comment.