Skip to content

Commit

Permalink
Sidebar demo updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Nov 20, 2023
1 parent d8dc5d6 commit 08b31ea
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 98 deletions.
12 changes: 4 additions & 8 deletions doc/sidebar/BasicDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<p>Sidebar is used as a container and visibility is controlled with a binding to <i>visible</i>.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand All @@ -20,8 +19,7 @@ export default {
code: {
basic: `
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand All @@ -30,8 +28,7 @@ export default {
options: `
<template>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand All @@ -51,8 +48,7 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand Down
12 changes: 4 additions & 8 deletions doc/sidebar/FullScreenDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<p>The whole page is covered when <i>position</i> property is set as <i>full</i>.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" position="full">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" position="full">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-window-maximize" @click="visible = true" />
Expand All @@ -20,8 +19,7 @@ export default {
code: {
basic: `
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" position="full">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" position="full">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-window-maximize" @click="visible = true" />
Expand All @@ -30,8 +28,7 @@ export default {
options: `
<template>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" position="full">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" position="full">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-window-maximize" @click="visible = true" />
Expand All @@ -51,8 +48,7 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" position="full">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" position="full">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-window-maximize" @click="visible = true" />
Expand Down
48 changes: 16 additions & 32 deletions doc/sidebar/PositionDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,19 @@
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" />
</div>

<Sidebar v-model:visible="visibleLeft">
<h2>Left Sidebar</h2>
<Sidebar v-model:visible="visibleLeft" header="Left Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>

<Sidebar v-model:visible="visibleRight" position="right">
<h2>Right Sidebar</h2>
<Sidebar v-model:visible="visibleRight" header="Right Sidebar" position="right">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>

<Sidebar v-model:visible="visibleTop" position="top" style="height: auto">
<h2>Top Sidebar</h2>
<Sidebar v-model:visible="visibleTop" header="Top Sidebar" position="top" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>

<Sidebar v-model:visible="visibleBottom" position="bottom" style="height: auto">
<h2>Bottom Sidebar</h2>
<Sidebar v-model:visible="visibleBottom" header="Bottom Sidebar" position="bottom" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
</div>
Expand All @@ -50,23 +46,19 @@ export default {
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" />
</div>
<Sidebar v-model:visible="visibleLeft">
<h2>Left Sidebar</h2>
<Sidebar v-model:visible="visibleLeft" header="Left Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleRight" position="right">
<h2>Right Sidebar</h2>
<Sidebar v-model:visible="visibleRight" header="Right Sidebar" position="right">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleTop" position="top" style="height: auto">
<h2>Top Sidebar</h2>
<Sidebar v-model:visible="visibleTop" header="Top Sidebar" position="top" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleBottom" position="bottom" style="height: auto">
<h2>Bottom Sidebar</h2>
<Sidebar v-model:visible="visibleBottom" header="Bottom Sidebar" position="bottom" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
`,
Expand All @@ -80,23 +72,19 @@ export default {
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" />
</div>
<Sidebar v-model:visible="visibleLeft">
<h2>Left Sidebar</h2>
<Sidebar v-model:visible="visibleLeft" header="Left Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleRight" position="right">
<h2>Right Sidebar</h2>
<Sidebar v-model:visible="visibleRight" header="Right Sidebar" position="right">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleTop" position="top" style="height: auto">
<h2>Top Sidebar</h2>
<Sidebar v-model:visible="visibleTop" header="Top Sidebar" position="top" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleBottom" position="bottom" style="height: auto">
<h2>Bottom Sidebar</h2>
<Sidebar v-model:visible="visibleBottom" header="Bottom Sidebar" position="bottom" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
</div>
Expand Down Expand Up @@ -125,23 +113,19 @@ export default {
<Button icon="pi pi-arrow-up" @click="visibleBottom = true" />
</div>
<Sidebar v-model:visible="visibleLeft">
<h2>Left Sidebar</h2>
<Sidebar v-model:visible="visibleLeft" header="Left Sidebar">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleRight" position="right">
<h2>Right Sidebar</h2>
<Sidebar v-model:visible="visibleRight" header="Right Sidebar" position="right">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleTop" position="top" style="height: auto">
<h2>Top Sidebar</h2>
<Sidebar v-model:visible="visibleTop" header="Top Sidebar" position="top" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Sidebar v-model:visible="visibleBottom" position="bottom" style="height: auto">
<h2>Bottom Sidebar</h2>
<Sidebar v-model:visible="visibleBottom" header="Bottom Sidebar" position="bottom" style="height: auto">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
</div>
Expand Down
12 changes: 4 additions & 8 deletions doc/sidebar/SizeDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<p>Sidebar dimension can be defined with <i>style</i> or <i>class</i> properties which can also be responsive when used with a CSS utility library like PrimeFlex or Tailwind.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" class="w-full md:w-20rem lg:w-30rem">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" class="w-full md:w-20rem lg:w-30rem">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand All @@ -20,8 +19,7 @@ export default {
code: {
basic: `
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" class="w-full md:w-20rem lg:w-30rem">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" class="w-full md:w-20rem lg:w-30rem">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand All @@ -30,8 +28,7 @@ export default {
options: `
<template>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" class="w-full md:w-20rem lg:w-30rem">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" class="w-full md:w-20rem lg:w-30rem">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand All @@ -51,8 +48,7 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<Sidebar v-model:visible="visible" class="w-full md:w-20rem lg:w-30rem">
<h2>Sidebar</h2>
<Sidebar v-model:visible="visible" header="Sidebar" class="w-full md:w-20rem lg:w-30rem">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-arrow-right" @click="visible = true" />
Expand Down
46 changes: 9 additions & 37 deletions doc/sidebar/TemplateDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
<p>Additional content at the header section is provided using the <i>header</i> template.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Sidebar
v-model:visible="visible"
:pt="{
header: {
style: 'justify-content: space-between'
}
}"
>
<Sidebar v-model:visible="visible">
<template #header>
<div class="flex align-items-center gap-2 mr-auto">
<div class="flex align-items-center gap-2">
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
</div>
Expand All @@ -31,16 +24,9 @@ export default {
visible: false,
code: {
basic: `
<Sidebar
v-model:visible="visible"
:pt="{
header: {
style: 'justify-content: space-between'
}
}"
>
<Sidebar v-model:visible="visible">
<template #header>
<div class="flex align-items-center gap-2 mr-auto">
<div class="flex align-items-center gap-2">
<Avatar image="/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
</div>
Expand All @@ -52,16 +38,9 @@ export default {
options: `
<template>
<div class="card flex justify-content-center">
<Sidebar
v-model:visible="visible"
:pt="{
header: {
style: 'justify-content: space-between'
}
}"
>
<Sidebar v-model:visible="visible">
<template #header>
<div class="flex align-items-center gap-2 mr-auto">
<div class="flex align-items-center gap-2">
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
</div>
Expand All @@ -85,21 +64,14 @@ export default {
composition: `
<template>
<div class="card flex justify-content-center">
<Sidebar
v-model:visible="visible"
:pt="{
header: {
style: 'justify-content: space-between'
}
}"
>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<Sidebar v-model:visible="visible">
<template #header>
<div class="flex align-items-center gap-2 mr-auto">
<div class="flex align-items-center gap-2">
<Avatar image="https://primefaces.org/cdn/primevue/images/avatar/amyelsner.png" shape="circle" />
<span class="font-bold">Amy Elsner</span>
</div>
</template>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</Sidebar>
<Button icon="pi pi-plus" @click="visible = true" />
</div>
Expand Down
Loading

0 comments on commit 08b31ea

Please sign in to comment.