Skip to content

Commit 2fa2d1c

Browse files
committed
Merge pull request codex-team#290 from codex-team/implement/layout-page-block-component
feat(ui): integrate layout page block component
1 parent 62d72ce commit 2fa2d1c

15 files changed

Lines changed: 30 additions & 155 deletions

File tree

codex-ui/dev/pages/layout/Navbar.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ import { Navbar } from '../../../src/vue';
1515

1616
<style scoped>
1717
.navbar-wrapper {
18-
width: 600px;
19-
min-height: 400px;
18+
height: 800px;
2019
position: relative;
2120
background-color: var(--base--bg-secondary);
2221
border-radius: var(--radius-m);
2322
border: 1px solid var(--base--border);
2423
2524
.navbar {
26-
z-index: 1;
27-
top: var(--layout-navbar-height);
28-
border-radius: var(--radius-m) var(--radius-m) 0 0;
25+
top: var(--layout-navbar-height);
26+
border-radius: var(--radius-m) var(--radius-m) 0 0;
2927
}
3028
}
3129
</style>

codex-ui/src/vue/components/tabbar/Tab.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ withDefaults(
7373
display: inline-block;
7474
min-width: var(--min-width);
7575
text-decoration: none;
76-
7776
max-width: max-content;
78-
77+
user-select: none;
7978
flex: 1;
8079
flex-shrink: 1;
8180

codex-ui/src/vue/layout/page-block/PageBlock.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ defineProps({
5757
5858
&__content {
5959
max-width: var(--layout-content-width);
60+
flex-grow: 1;
61+
min-width: 0;
6062
padding: var(--spacing-xxl) var(--spacing-ml);
6163
box-sizing: border-box;
6264

src/application/services/useLayout.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/presentation/layouts/Fullpage.vue

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/presentation/layouts/Layout.vue

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/presentation/layouts/ThreeColsLayout.vue

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/presentation/pages/History.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<ThreeColsLayout data-dimensions="large">
2+
<PageBlock data-dimensions="large">
33
<div :class="$style['history']">
44
<div :class="$style['history__page-header']">
55
<Heading
@@ -47,12 +47,11 @@
4747
</Container>
4848
</div>
4949
</div>
50-
</ThreeColsLayout>
50+
</PageBlock>
5151
</template>
5252

5353
<script setup lang="ts">
54-
import { Heading, Container, Row, Avatar, Button } from 'codex-ui/vue';
55-
import ThreeColsLayout from '../layouts/ThreeColsLayout.vue';
54+
import { Heading, Container, Row, Avatar, Button, PageBlock } from 'codex-ui/vue';
5655
import useNoteHistory from '@/application/services/useNoteHistory';
5756
import useNavbar from '@/application/services/useNavbar';
5857
import useNote from '@/application/services/useNote';

src/presentation/pages/HistoryVersion.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,19 @@
3434
</Button>
3535
</template>
3636
</NoteHeader>
37-
<Editor
38-
v-if="isEditorReady"
39-
ref="editor"
40-
v-bind="editorConfig"
41-
/>
37+
<PageBlock>
38+
<Editor
39+
v-if="isEditorReady"
40+
ref="editor"
41+
v-bind="editorConfig"
42+
/>
43+
</PageBlock>
4244
</div>
4345
</template>
4446

4547
<script lang="ts" setup>
4648
import { ref, toRef, watch } from 'vue';
47-
import { Editor, Button, Avatar } from 'codex-ui/vue';
49+
import { Editor, Button, Avatar, PageBlock } from 'codex-ui/vue';
4850
import NoteHeader from '@/presentation/components/note-header/NoteHeader.vue';
4951
import useHistory from '@/application/services/useNoteHistory';
5052
import { useNoteEditor } from '@/application/services/useNoteEditor';

src/presentation/pages/Home.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<ThreeColsLayout data-dimensions="large">
2+
<PageBlock data-dimensions="large">
33
<router-link
44
v-if="user"
55
to="/new"
@@ -49,17 +49,15 @@
4949
<NoteList
5050
v-else-if="user !== undefined"
5151
/>
52-
</ThreeColsLayout>
52+
</PageBlock>
5353
</template>
5454

5555
<script setup lang="ts">
5656
import { useHead } from 'unhead';
5757
import { useI18n } from 'vue-i18n';
5858
import { useAppState } from '@/application/services/useAppState';
59-
import { Container, Row, Button, Heading } from 'codex-ui/vue';
59+
import { Container, Row, Button, Heading, PageBlock } from 'codex-ui/vue';
6060
import Hammer from '../components/pictures/Hammer.vue';
61-
62-
import ThreeColsLayout from '@/presentation/layouts/ThreeColsLayout.vue';
6361
import NoteList from '@/presentation/components/note-list/NoteList.vue';
6462
import useAuth from '@/application/services/useAuth';
6563

0 commit comments

Comments
 (0)