Skip to content

Commit

Permalink
Update brand colors. Update favicon and logo. Fix hardcoded & wrong c…
Browse files Browse the repository at this point in the history
…olors, fix logo size.
  • Loading branch information
Haarolean committed Feb 21, 2024
1 parent 32d2a58 commit c9e2dd5
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Mono<Path> uploadConfigRelatedFile(FilePart file) {
Path targetDir = Path.of(targetDirStr);
if (!Files.exists(targetDir)) {
try {
Files.createDirectories(targetDir);
Files.createDirectories(targetDir);
} catch (IOException e) {
return Mono.error(
new FileUploadException("Error creating directory for uploads %s".formatted(targetDir), e));
Expand Down
3 changes: 1 addition & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />

<!-- Favicons -->
<link rel="icon" href="<%= PUBLIC_PATH %>/favicon/favicon.ico" sizes="any" />
<link rel="icon" href="<%= PUBLIC_PATH %>/favicon/icon.svg" type="image/svg+xml" />
<link rel="icon" href="<%= PUBLIC_PATH %>/favicon/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="<%= PUBLIC_PATH %>/favicon/apple-touch-icon.png" />
<link rel="manifest" href="<%= PUBLIC_PATH %>/manifest.json" />

Expand Down
Binary file removed frontend/public/favicon/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const App: React.FC = () => {
<QueryClientProvider client={queryClient}>
<GlobalSettingsProvider>
<ThemeProvider theme={isDarkMode ? darkTheme : theme}>
<Suspense fallback={<PageLoader />}>
<Suspense fallback={<PageLoader fullSize />}>
<UserInfoRolesAccessProvider>
<ConfirmContextProvider>
<GlobalCSS />
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/NavBar/NavBar.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,20 @@ export const Hyperlink = styled(Link)(
align-items: center;
gap: 8px;
margin: 0;
margin: 0 0 0 8px;
padding: 0.5rem 0.75rem;
font-family: Inter, sans-serif;
font-style: normal;
font-weight: bold;
font-size: 12px;
font-size: 22px;
line-height: 16px;
color: ${theme.default.color.normal};
&:hover {
color: ${theme.default.color.normal};
}
text-decoration: none;
word-break: break-word;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const NavBar: React.FC<Props> = ({ onBurgerClick }) => {

<S.Hyperlink to="/">
<Logo />
Kafbat UI
kafbat UI
</S.Hyperlink>

<S.NavbarItem>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/common/Logo/Logo.styled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import styled from 'styled-components';

export const Logo = styled.svg`
fill: ${({ theme }) => theme.logo.color};
`;
11 changes: 5 additions & 6 deletions frontend/src/components/common/Logo/Logo.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import React from 'react';

import * as S from './Logo.styled';

const Logo: React.FC = () => {
return (
<svg
<S.Logo
width="23"
height="30"
viewBox="0 0 23 30"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2.17668 0C2.17668 0 8.45218 9.02115 19.6155 13.3524C19.6155 13.3524 27.0635 7.06532 19.862 16.1041C12.6605 25.1428 1.6961 30.617 2.17668 29.9444C3.60584 27.9442 8.31948 24.1222 5.91024 21.7649C10.6395 17.1375 0 14.0868 0 14.0868C2.75705 8.06572 2.17668 0 2.17668 0Z"
fill="#4F4FFF"
/>
</svg>
<path d="M1.9874 0.5C1.9874 0.5 7.7172 8.91974 17.9098 12.9622C17.9098 12.9622 24.7102 7.0943 18.1349 15.5305C11.5596 23.9666 1.54861 29.0758 1.9874 28.4481C3.29229 26.5813 7.59605 23.014 5.3963 20.8139C9.71432 16.495 0 13.6477 0 13.6477C2.51731 8.02801 1.9874 0.5 1.9874 0.5Z" />
</S.Logo>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import styled from 'styled-components';

export const Wrapper = styled.div`
export interface PageLoaderProps {
fullSize?: boolean;
}

export const Wrapper = styled.div<PageLoaderProps>`
display: flex;
justify-content: center;
align-items: center;
padding-top: 15%;
height: 100%;
width: 100%;
background-color: ${({ theme }) => theme.default.backgroundColor};
${({ fullSize }) => (fullSize ? `min-height: 100vh;` : 'padding-top: 15%;')}
`;
5 changes: 3 additions & 2 deletions frontend/src/components/common/PageLoader/PageLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import React from 'react';
import Spinner from 'components/common/Spinner/Spinner';

import * as S from './PageLoader.styled';
import { PageLoaderProps } from './PageLoader.styled';

const PageLoader: React.FC = () => (
<S.Wrapper>
const PageLoader: React.FC<PageLoaderProps> = ({ fullSize }) => (
<S.Wrapper fullSize={fullSize}>
<Spinner />
</S.Wrapper>
);
Expand Down
44 changes: 25 additions & 19 deletions frontend/src/theme/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ const Colors = {
'60': '#29A352',
},
brand: {
'5': '#E8E8FC',
'10': '#D1D1FA',
'15': '#B8BEF9',
'20': '#A3A3F5',
'30': '#7E7EF1',
'40': '#6666FF',
'50': '#4C4CFF',
'60': '#1717CF',
'70': '#1414B8',
'5': '#F1F2F3',
'10': '#E3E6E8',
'15': '#D5DADD',
'20': '#C7CED1',
'30': '#ABB5BA',
'40': '#8F9CA3',
'50': '#2F3639',
'60': '#22282A',
'70': '#171A1C',
},
red: {
'10': '#FAD1D1',
Expand Down Expand Up @@ -313,6 +313,9 @@ const baseTheme = {

export const theme = {
...baseTheme,
logo: {
color: Colors.brand[70],
},
version: {
currentVersion: {
color: Colors.neutral[30],
Expand Down Expand Up @@ -389,8 +392,8 @@ export const theme = {
primary: {
backgroundColor: {
normal: Colors.brand[50],
hover: Colors.brand[60],
active: Colors.brand[70],
hover: Colors.brand[70],
active: Colors.brand[60],
disabled: Colors.neutral[5],
},
color: {
Expand Down Expand Up @@ -756,6 +759,9 @@ export type ThemeType = typeof theme;

export const darkTheme: ThemeType = {
...baseTheme,
logo: {
color: '#FDFDFD',
},
version: {
currentVersion: {
color: Colors.neutral[50],
Expand Down Expand Up @@ -831,13 +837,13 @@ export const darkTheme: ThemeType = {
button: {
primary: {
backgroundColor: {
normal: Colors.brand[30],
hover: Colors.brand[20],
active: Colors.brand[10],
disabled: Colors.neutral[75],
normal: Colors.brand[10],
hover: Colors.brand[5],
active: Colors.brand[20],
disabled: Colors.brand[60],
},
color: {
normal: Colors.neutral[0],
normal: Colors.neutral[70],
disabled: Colors.neutral[60],
},
invertedColors: {
Expand All @@ -848,9 +854,9 @@ export const darkTheme: ThemeType = {
},
secondary: {
backgroundColor: {
normal: Colors.blue[80],
hover: Colors.blue[70],
active: Colors.blue[60],
normal: Colors.brand[50],
hover: Colors.brand[70],
active: Colors.brand[60],
disabled: Colors.neutral[75],
},
color: {
Expand Down

0 comments on commit c9e2dd5

Please sign in to comment.