Skip to content

Commit b94f6af

Browse files
committed
team and app overview in menu and kill seasons
1 parent 8d33891 commit b94f6af

File tree

8 files changed

+12
-57
lines changed

8 files changed

+12
-57
lines changed

src/Logo.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
let { height }: Props = $props();
77
</script>
88

9-
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 287.36 410.27" {height}>
9+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 290 420" {height}>
1010
<path
1111
fill="var(--brand-color)"
1212
d="M32.775 190.975c-.9 1.7-3.4.8-3.1-1.1l39.7-180.5c.5-2.4 3.6-3.3 5.2-1.3l31.6 37.5c1.4 1.7 1.7 4 .7 6zM4.775 230.575c-.6 2.8-4.7 2.3-4.7-.5v-168c0-2.2 2.6-3.3 4.2-1.9l28.2 25.3c1.3 1.2 1.9 3 1.6 4.8zM280.075 289.975h-57.1c-2.6 0-5 1.4-6.3 3.6l-30.4 48.9c-1.3 2.2-3.7 3.6-6.3 3.6h-65.9c-2.6 0-5-1.4-6.3-3.6l-32.9-57c-1.3-2.2-1.3-5 0-7.3l32.9-57c1.3-2.2 3.7-3.6 6.3-3.6h65.9c2.6 0 5 1.4 6.3 3.6l30.2 47c1.3 2.2 3.7 3.6 6.3 3.6h57.1c5.6 0 9.1-6 6.3-10.9l-63-103.7c-1.3-2.2-3.7-3.6-6.3-3.6l-69.7.3 52.7-90.6c1.3-2.2 1.3-5 0-7.3l-31-53.8c-1.7-2.9-5.9-2.9-7.5 0l-160.4 276.1c-1.3 2.2-1.3 5 0 7.3l69.9 121.1c1.3 2.2 3.7 3.6 6.3 3.6h139.8c2.6 0 5-1.4 6.3-3.6l63.1-105.8c2.8-4.9-.7-10.9-6.3-10.9z"

src/app.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<meta name="robots" content="noindex, nofollow" />
1414
%sveltekit.head%
1515
</head>
16-
<body data-sveltekit-preload-data="tap">
16+
<body>
1717
<div>%sveltekit.body%</div>
1818
</body>
1919
</html>

src/lib/components/Icon.svelte

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
3333
const getComponent = (icon: string) => {
3434
switch (icon.toLocaleLowerCase()) {
35-
case 'overview':
35+
case 'team overview':
3636
return HouseIcon;
37+
case 'app overview':
3738
case 'applications':
3839
return PackageIcon;
40+
case 'job overview':
3941
case 'jobs':
4042
return BriefcaseClockIcon;
4143
case 'secrets':

src/lib/menuItems.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('menuItems', () => {
1818
member: true
1919
})
2020
).toEqual([
21-
[{ label: 'Overview', href: '/team/devteam', active: true }],
21+
[{ label: 'Team overview', href: '/team/devteam', active: true }],
2222
[
2323
{ label: 'Applications', href: '/team/devteam/applications' },
2424
{ label: 'Jobs', href: '/team/devteam/jobs' }
@@ -155,7 +155,7 @@ describe('menuItems', () => {
155155
member: true
156156
})
157157
).toEqual([
158-
[{ label: 'Overview', href: '/team/devteam/dev/app/app-w-all-storage' }],
158+
[{ label: 'App overview', href: '/team/devteam/dev/app/app-w-all-storage' }],
159159
[
160160
{ label: 'Image', href: '/team/devteam/dev/app/app-w-all-storage/image' },
161161
{

src/lib/menuItems.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const menuItems = ({
7474
const [, , team, env, workloadType, name, page] = split;
7575
const menuItem = item(`/team/${team}/${env}/${workloadType}/${name}`, page);
7676
return [
77-
[menuItem('Overview')],
77+
[menuItem(`${workloadType === 'app' ? 'App' : 'Job'} overview`)],
7878
[
7979
menuItem('Image', 'image'),
8080
menuItem('Deployments', 'deploys'),
@@ -89,7 +89,7 @@ export const menuItems = ({
8989
const [, , team, page] = split;
9090
const menuItem = item(`/team/${team}`, page);
9191
return [
92-
[menuItem('Overview')],
92+
[menuItem('Team overview')],
9393
[menuItem('Applications', 'applications'), menuItem('Jobs', 'jobs')],
9494
[
9595
member && menuItem('Secrets', 'secrets', 'secret'),

src/routes/+layout.svelte

+1-21
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,6 @@
2727
| undefined
2828
);
2929
30-
let activeColor = () => {
31-
const now = new Date();
32-
// Winter
33-
if (now.getMonth() === 11 || now.getMonth() < 2) {
34-
return 'winter';
35-
}
36-
// Spring
37-
if (now.getMonth() > 1 && now.getMonth() < 5) {
38-
return 'spring';
39-
}
40-
// Summer
41-
if (now.getMonth() > 4 && now.getMonth() < 8) {
42-
return 'summer';
43-
}
44-
// Autumn
45-
if (now.getMonth() > 7 && now.getMonth() < 11) {
46-
return 'autumn';
47-
}
48-
};
49-
5030
const refreshCookie = graphql(`
5131
query RefreshCookie {
5232
me {
@@ -78,7 +58,7 @@
7858
});
7959
</script>
8060

81-
<div class={['full-wrapper', activeColor()]}>
61+
<div class="full-wrapper">
8262
{#if loading}
8363
<ProgressBar />
8464
{/if}

src/routes/PageHeader.svelte

+2-9
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
<div class="header-content">
3131
<div class="header-left">
3232
<a href="/" class="logo">
33-
<Logo height="2rem" />
34-
<span class="nais-console">Nais Console</span>
33+
<Logo height="1.8rem" />
34+
<span>Console</span>
3535
</a>
3636
<nav>
3737
<a href="/utilization" class:active={page.url.pathname === '/utilization'}>Utilization</a>
@@ -145,11 +145,4 @@
145145
background-color: var(--a-surface-inverted-hover);
146146
}
147147
}
148-
149-
.nais-console {
150-
background: linear-gradient(to left, var(--active-color-strong), #ffffff);
151-
background-clip: text;
152-
-webkit-background-clip: text;
153-
-webkit-text-fill-color: transparent;
154-
}
155148
</style>

src/styles/colors.css

-20
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,3 @@
44
--active-color: var(--a-deepblue-50);
55
--active-color-strong: var(--a-deepblue-100);
66
}
7-
8-
.winter {
9-
--active-color: var(--a-deepblue-50);
10-
--active-color-strong: var(--a-deepblue-100);
11-
}
12-
13-
.spring {
14-
--active-color: var(--a-green-50);
15-
--active-color-strong: var(--a-green-100);
16-
}
17-
18-
.summer {
19-
--active-color: #e9c9f225;
20-
--active-color-strong: #e9c9f290;
21-
}
22-
23-
.autumn {
24-
--active-color: #fff0dc;
25-
--active-color-strong: #f5ce9c;
26-
}

0 commit comments

Comments
 (0)