Skip to content

Commit c5730c0

Browse files
authored
updated navbar (#15)
1 parent 699c44b commit c5730c0

4 files changed

Lines changed: 67 additions & 17 deletions

File tree

src/frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@fontsource/roboto": "^5.2.8",
13+
"@fortawesome/fontawesome-free": "^7.1.0",
1314
"bootstrap": "4",
1415
"bootstrap-vue": "^2.23.1",
1516
"vue": "^3.5.22",
-2.52 KB
Loading
Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,70 @@
11
<script setup lang="ts">
2-
import { onMounted } from 'vue'
2+
import { onMounted, ref } from 'vue'
33
import logoUrl from '../assets/logo_situation_room.png'
44
import { RouterLink } from 'vue-router'
55
6+
const pageTitle = ref('Dashboard')
7+
68
onMounted(() => {
7-
const existing = document.querySelector<HTMLLinkElement>('link[rel="icon"]')
8-
const link = existing ?? document.createElement('link')
9-
link.rel = 'icon'
10-
link.type = 'image/png'
11-
link.href = logoUrl
12-
if (!existing) document.head.appendChild(link)
9+
const existing = document.querySelector<HTMLLinkElement>('link[rel="icon"]')
10+
const link = existing ?? document.createElement('link')
11+
link.rel = 'icon'
12+
link.type = 'image/png'
13+
link.href = logoUrl
14+
if (!existing) document.head.appendChild(link)
1315
})
16+
17+
function scaleUp(e: MouseEvent) {
18+
(e.currentTarget as HTMLElement).style.transform = 'scale(1.15)'
19+
}
20+
21+
function scaleDown(e: MouseEvent) {
22+
(e.currentTarget as HTMLElement).style.transform = 'scale(1)'
23+
}
1424
</script>
1525

1626
<template>
17-
<nav class="navbar bg-light py-3">
18-
<div class="container-fluid">
19-
<RouterLink to="/" class="navbar-brand d-flex align-items-center fs-2">
20-
<img :src="logoUrl" alt="Situation Room logo" height="56" class="me-2" />
21-
<span>Situation Room</span>
22-
</RouterLink>
23-
</div>
24-
</nav>
25-
<hr class="m-0" />
26-
</template>
27+
<nav class="navbar py-2 px-3" style="background-color: #F5F5F5;">
28+
<div class="container-fluid d-flex justify-content-between align-items-center flex-nowrap">
29+
<RouterLink to="/" class="navbar-brand d-flex align-items-center">
30+
<img
31+
:src="logoUrl"
32+
alt="Situation Room logo"
33+
class="logo"
34+
style="height: clamp(1.8rem, 4vw, 3rem); width: auto; transition: transform 0.2s ease;"
35+
/>
36+
</RouterLink>
37+
38+
<div
39+
class="flex-grow-1 text-center"
40+
style="font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"
41+
>
42+
{{ pageTitle }}
43+
</div>
44+
45+
<div class="d-flex align-items-center">
46+
<v-icon
47+
class="icon"
48+
style="font-size: clamp(1.25rem, 3vw, 2rem); cursor: pointer; transition: transform 0.2s ease;"
49+
@mouseover="scaleUp"
50+
@mouseout="scaleDown"
51+
>mdi-account-search</v-icon>
52+
53+
<v-icon
54+
class="icon"
55+
style="font-size: clamp(1.25rem, 3vw, 2rem); cursor: pointer; transition: transform 0.2s ease; margin-left: clamp(0.5rem, 2vw, 2rem);"
56+
@mouseover="scaleUp"
57+
@mouseout="scaleDown"
58+
>mdi-message-processing-outline</v-icon>
59+
60+
<v-icon
61+
class="icon"
62+
style="font-size: clamp(1.25rem, 3vw, 2rem); cursor: pointer; transition: transform 0.2s ease; margin-left: clamp(0.5rem, 2vw, 2rem);"
63+
@mouseover="scaleUp"
64+
@mouseout="scaleDown"
65+
>mdi-account-circle</v-icon>
66+
</div>
67+
</div>
68+
</nav>
69+
<hr style="border: none; height: 1px; background-color: #000; margin: 0;" />
70+
</template>

src/frontend/yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@
162162
resolved "https://registry.yarnpkg.com/@fontsource/roboto/-/roboto-5.2.8.tgz#73411c434b9162019b8ca18abd8245489809cca9"
163163
integrity sha512-oh9g4Cg3loVMz9MWeKWfDI+ooxxG1aRVetkiKIb2ESS2rrryGecQ/y4pAj4z5A5ebyw450dYRi/c4k/I3UBhHA==
164164

165+
"@fortawesome/fontawesome-free@^7.1.0":
166+
version "7.1.0"
167+
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-7.1.0.tgz#8eb76278515341720aa74485266f8be121089529"
168+
integrity sha512-+WxNld5ZCJHvPQCr/GnzCTVREyStrAJjisUPtUxG5ngDA8TMlPnKp6dddlTpai4+1GNmltAeuk1hJEkBohwZYA==
169+
165170
"@jridgewell/sourcemap-codec@^1.5.5":
166171
version "1.5.5"
167172
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba"

0 commit comments

Comments
 (0)