Skip to content

Commit 27e9e74

Browse files
krisajenkinsantfu
andauthored
feat(presenter): adding a third presenter view layout. (#1980)
Co-authored-by: Anthony Fu <[email protected]>
1 parent bfba5d6 commit 27e9e74

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/client/internals/NavControls.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ if (__SLIDEV_FEATURE_RECORD__)
131131
<div class="i-carbon:text-annotation-toggle" />
132132
</IconButton>
133133

134-
<IconButton v-if="isPresenter" title="Toggle Presenter Layout" class="aspect-ratio-initial" @click="togglePresenterLayout">
134+
<IconButton v-if="isPresenter" title="Toggle Presenter Layout" class="aspect-ratio-initial flex items-center" @click="togglePresenterLayout">
135135
<div class="i-carbon:template" />
136136
{{ presenterLayout }}
137137
</IconButton>

packages/client/pages/presenter.vue

+9
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,15 @@ onMounted(() => {
247247
'bottom bottom';
248248
}
249249
250+
.grid-container.layout3 {
251+
grid-template-columns: 2fr 3fr;
252+
grid-template-rows: 1fr 1fr min-content;
253+
grid-template-areas:
254+
'note next'
255+
'main next'
256+
'bottom bottom';
257+
}
258+
250259
@media (max-aspect-ratio: 3/5) {
251260
.grid-container.layout1 {
252261
grid-template-columns: 1fr;

packages/client/state/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const presenterLayout = useLocalStorage('slidev-presenter-layout', 1, { l
4040

4141
export function togglePresenterLayout() {
4242
presenterLayout.value = presenterLayout.value + 1
43-
if (presenterLayout.value > 2)
43+
if (presenterLayout.value > 3)
4444
presenterLayout.value = 1
4545
}
4646

0 commit comments

Comments
 (0)