Skip to content

Commit

Permalink
feat(fluid): fix fluid ; make it fully facultative
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Jan 6, 2023
1 parent de62162 commit 59bbd29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/docs/DocsPageBottom.vue
Expand Up @@ -6,7 +6,7 @@ const docus = useDocus()
<template>
<div v-if="page" class="docs-page-bottom">
<div class="edit-link">
<EditOnLink v-if="docus?.socials.github && docus?.github?.edit" :page="page" />
<EditOnLink v-if="docus?.socials?.github && docus?.github?.edit" :page="page" />
<span v-if="page.mtime">Updated on: {{ new Intl.DateTimeFormat('en-US').format(Date.parse(page.mtime)) }}</span>
</div>
</div>
Expand Down
16 changes: 9 additions & 7 deletions components/docs/DocsPageLayout.vue
Expand Up @@ -32,7 +32,7 @@ const asideScroll = useState('asideScroll', () => {
}
})
function watchScrollHeight() {
function watchScrollHeight () {
if (!asideNav.value) { return }
if (asideNav.value.scrollHeight === 0) {
setTimeout(watchScrollHeight, 0)
Expand All @@ -56,17 +56,19 @@ onBeforeUnmount(() => {
</script>

<template>
<!-- TODO: update Elements Container with 'fluid' class -->
<Container :fluid="docus.layout.fluid" padded class="docs-page-content" :class="[docus.layout.fluid && 'fluid']">
<Container :fluid="docus?.layout?.fluid" padded class="docs-page-content" :class="[docus?.layout?.fluid && 'fluid']">
<!-- Aside -->
<aside v-if="hasAside" ref="asideNav" class="aside-nav">
<DocsAside />
</aside>
<!-- Page Body -->
<article class="page-body" :class="{
'with-toc': hasToc,
}">
<article
class="page-body"
:class="{
'with-toc': hasToc,
}"
>
<slot v-if="hasBody" />
<Alert v-else type="info">
Start writing in <ProseCodeInline>content/{{ page._file }}</ProseCodeInline> to see this page taking shape.
Expand Down Expand Up @@ -182,7 +184,7 @@ css({
},
'.toc': {
position: 'sticky',
top: 0,
top: 0,
display: 'flex',
mx: 'calc(0px - {space.4})',
overflow: 'auto',
Expand Down

0 comments on commit 59bbd29

Please sign in to comment.