Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

666 B
Raw Blame
<template>
  <main :style="{ paddingLeft: marginLeft }">
    <slot />
  </main>
</template>

<script setup lang="ts">
const { isOpened, paneWidth } = useSidebar();
const { isMobile } = useDevice();

const marginLeft = computed(() => (isMobile.value || !isOpened.value ? '10px' : `${paneWidth.value + 20}px`));
</script>

<style scoped lang="scss">
main {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  transition: padding-left $transition-medium;
}

@media print {
  main {
    margin: 0 !important;
    padding: 0 !important;
  }
}

@media screen and (width <= 719px) {
  main {
    padding: 0 0.5rem;
  }
}
</style>