Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix navbar

Smaug6739dc94a991bdf9
diff --git a/frontend/app/components/Navbar.vue b/frontend/app/components/Navbar.vue
index de2d2040..c5071a4c 100644
--- a/frontend/app/components/Navbar.vue
+++ b/frontend/app/components/Navbar.vue
@@ -1,27 +1,24 @@
<template>
<header>
- <button v-if="!isOpened" @click="toggleSidebar" class="open-sidebar" aria-label="open sidebar">
- <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">
- <path d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" />
- </svg>
- </button>
- <IconApp v-if="!isOpened" style="width: 40px" />
- <BreadCrumb v-if="!isMobile()" />
-
- <button
- class="search-btn"
- @click="openGlobalSearch"
- title="Global search (Ctrl+K)"
- aria-label="Global search"
- >
- <Icon name="search" />
- <span class="search-text">Search</span>
- <kbd class="shortcut">Ctrl+K</kbd>
- </button>
-
- <ThemeToggle style="margin-left: auto" aria-label="toggle theme" />
+ <div>
+ <button v-if="!isOpened" @click="toggleSidebar" class="open-sidebar" aria-label="open sidebar">
+ <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">
+ <path d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" />
+ </svg>
+ </button>
+ <IconApp v-if="!isOpened" style="width: 40px" />
+ <BreadCrumb v-if="!isMobile()" />
+ </div>
+ <div>
+ <button class="search-btn" @click="openGlobalSearch" title="Global search (Ctrl+K)" aria-label="Global search">
+ <Icon name="search" />
+ <span class="search-text">Search</span>
+ <kbd class="shortcut">Ctrl+K</kbd>
+ </button>
+
+ <ThemeToggle aria-label="toggle theme" />
+ </div>
</header>
-
</template>
<style lang="scss" scoped>
@@ -30,10 +27,16 @@ header {
width: 100%;
display: flex;
align-items: center;
+ justify-content: space-between;
border-bottom: 1px solid var(--border-color);
margin-bottom: 10px;
padding: 10px 0;
position: sticky;
+ div {
+ display: flex;
+ align-items: center;
+ gap: 16px;
+ }
}
svg {
@@ -57,14 +60,12 @@ button {
cursor: pointer;
transition: all 0.2s ease;
margin-left: 16px;
-
+ width: 200px;
&:hover {
- background: var(--primary);
- color: white;
+ background: var(--selection-color);
transform: translateY(-1px);
- box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}
-
+
&:active {
transform: translateY(0);
}
@@ -94,8 +95,5 @@ button {
</style>
<script lang="ts" setup>
const { toggleSidebar, isOpened } = useSidebar();
-
-function openGlobalSearch() {
- window.dispatchEvent(new CustomEvent('global-search-open'))
-}
+const openGlobalSearch = () => window.dispatchEvent(new CustomEvent('global-search-open'));
</script>