Skip to content

Commit

Permalink
Frontend: Branding tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
DanThrane committed Mar 11, 2025
1 parent dbe4504 commit e774f9e
Show file tree
Hide file tree
Showing 7 changed files with 759 additions and 45 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
314 changes: 314 additions & 0 deletions frontend-web/webclient/app/Assets/Images/interreg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
317 changes: 317 additions & 0 deletions frontend-web/webclient/app/Assets/Images/interreg_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 36 additions & 8 deletions frontend-web/webclient/app/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {usePage} from "@/Navigation/Redux";
import * as React from "react";
import {useDispatch} from "react-redux";
import {Dispatch} from "redux";
import {Box, Button, Flex, Icon, Link, Markdown, Text} from "@/ui-components";
import {Box, Button, Flex, Icon, Image, Link, Markdown, Text} from "@/ui-components";
import * as Heading from "@/ui-components/Heading";
import {DashboardOperations} from ".";
import {setAllLoading} from "./Redux";
Expand All @@ -19,7 +19,7 @@ import {Connect} from "@/Providers/Connect";
import {useProject} from "@/Project/cache";
import {ProviderLogo} from "@/Providers/ProviderLogo";
import AppRoutes from "@/Routes";
import {injectStyle} from "@/Unstyled";
import {classConcat, injectStyle} from "@/Unstyled";
import JobsBrowse from "@/Applications/Jobs/JobsBrowse";
import {GrantApplicationBrowse} from "@/Grants/GrantApplicationBrowse";
import ucloudImage from "@/Assets/Images/ucloud-2.png";
Expand All @@ -39,6 +39,12 @@ import {AllocationDisplayWallet} from "@/Accounting";
import {ProgressBar} from "@/Accounting/Allocations";
import remarkGfm from "remark-gfm";
import ExternalLink from "../ui-components/ExternalLink";
import {onSandbox} from "@/UtilityFunctions";
import halric from "@/Assets/Images/halric.png";
import halricWhite from "@/Assets/Images/halric_white.png";
import interreg from "@/Assets/Images/interreg.svg";
import interregWhite from "@/Assets/Images/interreg_white.svg";
import {useIsLightThemeStored} from "@/ui-components/theme";

interface NewsRequestProps extends PaginationRequest {
filter?: string;
Expand Down Expand Up @@ -67,7 +73,6 @@ function Dashboard(): React.ReactNode {

const [wallets, fetchWallets] = useCloudAPI<PageV2<Accounting.WalletV2>>({noop: true}, emptyPageV2);


React.useEffect(() => {
reload();
}, []);
Expand Down Expand Up @@ -317,6 +322,8 @@ function DashboardGrantApplications({reloadRef}: { reloadRef: React.MutableRefOb
};

function DashboardNews({news}: { news: APICallState<Page<NewsPost>> }): React.ReactNode {
const lightTheme = useIsLightThemeStored();

const newsItem = news.data.items.length > 0 ? news.data.items[0] : null;
return (
<DashboardCard
Expand All @@ -325,7 +332,7 @@ function DashboardNews({news}: { news: APICallState<Page<NewsPost>> }): React.Re
icon={"heroNewspaper"}
overflow={"visible"}
>
<div className={NewsClass}>
<div className={classConcat(NewsClass, onSandbox() ? "halric" : undefined)}>
<div>
{news.data.items.length !== 0 ? null : (
<NoResultsCardBody title={"No news"}>
Expand Down Expand Up @@ -355,7 +362,15 @@ function DashboardNews({news}: { news: APICallState<Page<NewsPost>> }): React.Re
</Box>
}
</div>
<img style={{zIndex: 1}} alt={"UCloud logo"} src={ucloudImage}/>
{onSandbox() ? <>
<Flex gap={"16px"} flexDirection={"column"} justifyContent={"center"} ml={"16px"}>
<Image src={lightTheme ? halric : halricWhite} alt={"HALRIC"} width={"300px"} ml={"16px"} />
<Image src={lightTheme ? interreg : interregWhite} alt={"Interreg"} width={"350px"} />
</Flex>
</> : <>
<img style={{zIndex: 1}} alt={"UCloud logo"} src={ucloudImage}/>
</>}

</div>
</DashboardCard>
);
Expand All @@ -370,9 +385,22 @@ const NewsClass = injectStyle("with-graphic", k => `
display: flex;
height: 270px;
}
${k}.halric {
flex-wrap: wrap;
height: unset;
}
${k} > div {
width: 800px;
${k} > div:nth-child(1) {
flex-basis: 500px;
flex-grow: 4;
margin-right: 32px;
}
${k} > div:nth-child(2) {
flex-basis: 400px;
flex-grow: 1;
align-items: center;
}
${k} > img {
Expand All @@ -393,7 +421,7 @@ const NewsClass = injectStyle("with-graphic", k => `
display: none;
width: 0px;
}
${k} > div {
width: 100%;
}
Expand Down
Loading

0 comments on commit e774f9e

Please sign in to comment.