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.

Fixes in display for small computers

Smaug673933e4533531f7
diff --git a/frontend/app/pages/dashboard/docs/[id].vue b/frontend/app/pages/dashboard/docs/[id].vue
index c327e3e3..1315a53b 100644
--- a/frontend/app/pages/dashboard/docs/[id].vue
+++ b/frontend/app/pages/dashboard/docs/[id].vue
@@ -1,14 +1,14 @@
<template>
<div v-if="article?.id" style="width: 100%; padding: 1rem 0">
<div style="display: flex; justify-content: space-between">
- <div :style="{ width: '90%', margin: 'auto', maxWidth: usePreferences().get('docSize') == 0 ? '980px' : '780px' }">
+ <div :style="{ maxWidth: usePreferences().get('docSize') == 0 ? '980px' : '780px' }" class="doc-container">
<DocumentCardHeader :doc="article" style="margin-bottom: 20px" />
<!-- eslint-disable-next-line vue/no-v-html -->
<article ref="element" :class="`${usePreferences().get('theme')}-theme`" style="max-width: 100%" v-html="article.content_html" />
<DocumentCardFooter :document="article" :next="next" :previous="previous" />
</div>
<div v-if="!isTablet() && !preferencesStore.get('hideTOC')" class="toc">
- <TableOfContent :doc="article" :element="element" style="width: 400px" />
+ <TableOfContent :doc="article" :element="element" style="width: 350px" />
</div>
<div
:style="{ marginRight: !isTablet() && preferencesStore.get('hideTOC') && useSidebar().isOpened.value ? '200px' : '0px', transition: 'margin 0.3s' }"
@@ -61,6 +61,18 @@ const previous = computed(() => documentsStore.getPrevious(article.value));
</script>
<style scoped lang="scss">
+.doc-container {
+ width: 100%;
+ margin: 0 auto;
+}
+@media screen and (width >= 780px) {
+ .doc-container {
+ padding: 0 3rem;
+ }
+}
+.toc {
+ position: relative;
+}
@media screen and (width <= 1280px) {
.toc {
display: none;
diff --git a/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue b/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue
index 82e12cec..7148ed7c 100644
--- a/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue
+++ b/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue
@@ -124,7 +124,7 @@ h4 {
aside {
position: sticky;
top: 20px;
- max-width: 350px;
+ width: 350px;
padding: 0 15px;
font-size: 0.8rem;
border-left: 1px solid var(--border-color);