Skip to content

Commit 3b6b045

Browse files
committed
feat: ui impros
1 parent 9e746b3 commit 3b6b045

26 files changed

+354
-232
lines changed

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@cyntler/react-doc-viewer": "^1.17.0",
7272
"@kleros/curate-v2-templates": "workspace:^",
7373
"@kleros/kleros-app": "^2.0.1",
74-
"@kleros/ui-components-library": "^2.15.0",
74+
"@kleros/ui-components-library": "^2.20.0",
7575
"@sentry/react": "^7.93.0",
7676
"@sentry/tracing": "^7.93.0",
7777
"@tanstack/react-query": "^5.59.20",
Lines changed: 10 additions & 0 deletions
Loading

web/src/assets/svgs/hero/hero-darkmode-desktop.svg

Lines changed: 12 additions & 12 deletions
Loading

web/src/assets/svgs/hero/hero-darkmode-mobile.svg

Lines changed: 12 additions & 12 deletions
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import styled from "styled-components";
2+
3+
import { Link } from "react-router-dom";
4+
5+
export const ExternalLink = styled(Link)`
6+
:hover {
7+
text-decoration: underline;
8+
}
9+
`;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Link } from "react-router-dom";
2+
import styled from "styled-components";
3+
4+
export const InternalLink = styled(Link)`
5+
:hover {
6+
color: ${({ theme }) => theme.secondaryBlue} !important;
7+
}
8+
`;

web/src/components/LightButton.tsx

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
11
import React from "react";
2-
import styled from "styled-components";
2+
import styled, { css } from "styled-components";
3+
import { landscapeStyle } from "styles/landscapeStyle";
4+
import { hoverShortTransitionTiming } from "styles/commonStyles";
5+
36
import { Button } from "@kleros/ui-components-library";
47

5-
const StyledButton = styled(Button)`
8+
const StyledButton = styled(Button)<{ isMobileNavbar?: boolean }>`
9+
${hoverShortTransitionTiming}
610
background-color: transparent;
7-
padding-left: 0;
11+
padding: 8px !important;
12+
border-radius: 7px;
813
.button-text {
914
color: ${({ theme }) => theme.primaryText};
1015
font-weight: 400;
1116
}
1217
.button-svg {
13-
fill: ${({ theme }) => theme.secondaryPurple};
18+
fill: ${({ theme, isMobileNavbar }) => (isMobileNavbar ? theme.secondaryText : `${theme.white}BF`)} !important;
1419
}
1520
16-
:focus,
17-
:hover {
18-
background-color: transparent;
21+
&:hover {
22+
.button-svg {
23+
fill: ${({ theme, isMobileNavbar }) => (isMobileNavbar ? theme.primaryText : `${theme.white}`)} !important;
24+
}
25+
background-color: ${({ theme }) => theme.whiteLowOpacityStrong};
1926
}
27+
28+
${landscapeStyle(
29+
() => css`
30+
padding: 8px !important;
31+
.button-svg {
32+
margin-right: 0;
33+
}
34+
`
35+
)}
2036
`;
2137

2238
interface ILightButton {
@@ -25,10 +41,11 @@ interface ILightButton {
2541
onClick?: React.MouseEventHandler<HTMLButtonElement>;
2642
disabled?: boolean;
2743
className?: string;
44+
isMobileNavbar?: boolean;
2845
}
2946

30-
const LightButton: React.FC<ILightButton> = ({ text, Icon, onClick, disabled, className }) => (
31-
<StyledButton variant="primary" small {...{ text, Icon, onClick, disabled, className }} />
47+
const LightButton: React.FC<ILightButton> = ({ text, Icon, onClick, disabled, className, isMobileNavbar }) => (
48+
<StyledButton variant="primary" small {...{ text, Icon, onClick, disabled, className, isMobileNavbar }} />
3249
);
3350

3451
export default LightButton;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
import styled from "styled-components";
4+
5+
const PortalContainer = styled.div`
6+
position: fixed;
7+
top: 0;
8+
left: 0;
9+
z-index: 9999;
10+
width: 100%;
11+
height: 100%;
12+
`;
13+
14+
const OverlayPortal: React.FC<{ children: React.ReactNode }> = ({ children }) => {
15+
return ReactDOM.createPortal(<PortalContainer>{children}</PortalContainer>, document.body);
16+
};
17+
18+
export default OverlayPortal;

web/src/consts/socialmedia.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from "react";
2-
31
import DiscordLogo from "svgs/socialmedia/discord.svg";
42
import GithubLogo from "svgs/socialmedia/github.svg";
53
import LinkedinLogo from "svgs/socialmedia/linkedin.svg";
@@ -9,27 +7,27 @@ import XLogo from "svgs/socialmedia/x.svg";
97

108
export const socialmedia = {
119
telegram: {
12-
icon: <TelegramLogo />,
10+
icon: TelegramLogo,
1311
url: "https://t.me/kleros",
1412
},
1513
x: {
16-
icon: <XLogo />,
14+
icon: XLogo,
1715
url: "https://x.com/kleros_io",
1816
},
1917
discord: {
20-
icon: <DiscordLogo />,
18+
icon: DiscordLogo,
2119
url: "https://discord.com/invite/MhXQGCyHd9",
2220
},
2321
youtube: {
24-
icon: <YouTubeLogo />,
22+
icon: YouTubeLogo,
2523
url: "https://youtube.com/@kleros_io",
2624
},
2725
github: {
28-
icon: <GithubLogo />,
26+
icon: GithubLogo,
2927
url: "https://github.com/kleros",
3028
},
3129
linkedin: {
32-
icon: <LinkedinLogo />,
30+
icon: LinkedinLogo,
3331
url: "https://www.linkedin.com/company/kleros/",
3432
},
3533
};

web/src/favicon.ico

-27.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)