#119 set navbar to default and make page unselectable

This commit is contained in:
neil 2023-01-05 20:40:38 +08:00
parent 777d32b43c
commit 4dbb2f7fbd
3 changed files with 5 additions and 30 deletions

View file

@ -124,9 +124,9 @@
"fullscreen": false, "fullscreen": false,
"height": 600, "height": 600,
"resizable": true, "resizable": true,
"title": "gui", "title": "tea",
"width": 1200, "width": 1200,
"decorations": false "decorations": true
} }
] ]
} }

View file

@ -15,6 +15,8 @@
html { html {
background-color: #1a1a1a; background-color: #1a1a1a;
color: #fff; color: #fff;
user-select: none;
cursor: default;
} }
@layer base { @layer base {

View file

@ -1,22 +1,11 @@
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores'; import { page } from '$app/stores';
import { appWindow } from '@tauri-apps/api/window';
import { searchStore } from '$libs/stores'; import { searchStore } from '$libs/stores';
import SearchInput from '@tea/ui/SearchInput/SearchInput.svelte'; import SearchInput from '@tea/ui/SearchInput/SearchInput.svelte';
import Button from '@tea/ui/Button/Button.svelte'; import Button from '@tea/ui/Button/Button.svelte';
import { beforeUpdate } from 'svelte'; import { beforeUpdate } from 'svelte';
let maximized = false;
const toggleMaximize = () => {
maximized = !maximized;
if (maximized) {
appWindow.maximize();
} else {
appWindow.unmaximize();
}
};
let routes = [ let routes = [
{ {
path: '/', path: '/',
@ -64,18 +53,7 @@
</script> </script>
<ul id="NavBar"> <ul id="NavBar">
<nav data-tauri-drag-region class="flex justify-between"> <nav class="flex justify-between">
<div class="flex gap-1 p-3 pt-3">
<button class="titlebar-button" id="titlebar-close" on:click={appWindow.close}>
<img src="/images/close.svg" alt="close" />
</button>
<button class="titlebar-button" id="titlebar-minimize" on:click={appWindow.minimize}>
<img src="/images/minimize.svg" alt="minimize" />
</button>
<button class="titlebar-button" id="titlebar-maximize" on:click={toggleMaximize}>
<img src="/images/expand.svg" alt="maximize" />
</button>
</div>
<a href="/"> <a href="/">
<img width="40" height="40" src="/images/tea-icon.png" alt="tea" /> <img width="40" height="40" src="/images/tea-icon.png" alt="tea" />
</a> </a>
@ -129,11 +107,6 @@
} }
} }
nav:hover {
transition: all 0.3s;
background-color: #2d2d2d;
}
.titlebar-button { .titlebar-button {
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;