Skip to content

Commit 6eb3502

Browse files
authored
Merge pull request codex-team#294 from codex-team/layout-sticky
Layout sticky
2 parents 636b9c9 + 2fa2d1c commit 6eb3502

17 files changed

Lines changed: 35 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/styles/z-axis.pcss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
--z-popover: 3;
33
--z-navbar: calc(var(--z-popover) + 1);
44
--z-popup: calc(var(--z-navbar) + 1);
5+
--z-note-header: var(--z-navbar);
56
}

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/components/note-header/NoteHeader.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
transition: opacity 100ms;
2323
justify-content: space-between;
2424
padding: var(--spacing-s) var(--spacing-m);
25+
position: sticky;
26+
top: var(--layout-navbar-height);
27+
background-color: var(--base--bg-primary);
28+
z-index: var(--z-note-header);
2529
2630
&__left {
2731
color: var(--base--text-secondary);

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';

0 commit comments

Comments
 (0)