Skip to content

Commit

Permalink
New Apps UI (#406)
Browse files Browse the repository at this point in the history
* fix style of cards

* fix desktop style

* fix header button style

* fix mobile style

* add new font and fix style of texts

* fix footer

* fix header

* fix(lint error): fix all lint errors

* Update src/components/Hero.tsx

---------

Co-authored-by: Hamid Roohi <[email protected]>
Co-authored-by: fisher <[email protected]>
Co-authored-by: Hamid Roohi <[email protected]>
  • Loading branch information
4 people authored Apr 23, 2024
1 parent 71e9463 commit 9dec514
Show file tree
Hide file tree
Showing 32 changed files with 140 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function App() {
<Header />
</div>

<div className="pb-0 pt-[3.125rem] lg:pb-[4.375rem] lg:pt-[3.75rem]">
<div className="pb-0 lg:pb-[4.375rem]">
<Outlet />
</div>

Expand Down
4 changes: 4 additions & 0 deletions src/assets/DownArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/darwiniabtnlogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/headerbtnlogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/herobg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/mobileMenuIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { useTranslation } from "react-i18next";
// import { useTranslation } from "react-i18next";

import twitter from "../assets/social/twitter.svg";
import telegram from "../assets/social/telegram.svg";
import discord from "../assets/social/discord.svg";
import element from "../assets/social/element.svg";
// import element from "../assets/social/element.svg";
import github from "../assets/social/github.svg";
import medium from "../assets/social/medium.svg";
import email from "../assets/social/email.svg";
import lng from "../assets/lng.svg";
// import lng from "../assets/lng.svg";

const socialCfg: { icon: string; link: string; isMail?: boolean }[] = [
{
Expand All @@ -22,10 +22,10 @@ const socialCfg: { icon: string; link: string; isMail?: boolean }[] = [
icon: discord,
link: "https://discord.com/invite/aQdK9H4MZS",
},
{
icon: element,
link: "https://app.element.io/#/room/#darwinia:matrix.org",
},
// {
// icon: element,
// link: "https://app.element.io/#/room/#darwinia:matrix.org",
// },
{
icon: github,
link: "https://github.com/darwinia-network",
Expand All @@ -41,7 +41,7 @@ const socialCfg: { icon: string; link: string; isMail?: boolean }[] = [
];

export const Footer = () => {
const { i18n } = useTranslation();
// const { i18n } = useTranslation();

return (
<div className="container flex items-center justify-between">
Expand All @@ -59,13 +59,13 @@ export const Footer = () => {
</a>
))}

<button
{/* <button
className="flex items-center gap-[0.3125rem] transition hover:opacity-80 active:scale-95"
onClick={() => i18n.changeLanguage(i18n.language === "en" ? "zh" : "en")}
>
<img alt="..." src={lng} />
<span className="text-normal text-sm text-white/50">{i18n.language === "en" ? "EN" : "ZH"}</span>
</button>
</button> */}
</div>
</div>
);
Expand Down
41 changes: 33 additions & 8 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import logo from "../assets/app-logo.svg";
// import darwiniabtnlogo from "../assets/darwiniabtnlogo.svg";
// import headerbtnlogo from "../assets/headerbtnlogo.svg";
import mobileMenuIcon from "../assets/mobileMenuIcon.svg";
// import DownArrow from "../assets/DownArrow.svg";
import { Link, useMatch } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { useWallet } from "../hooks/wallet";
Expand All @@ -21,14 +25,35 @@ export const Header = () => {
) : null}
</div>
{isHome ? (
<a
className="text-light bg-bg-primary px-[15px] py-[7px] text-sm text-white transition hover:opacity-80 active:scale-95 lg:border lg:border-primary"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/darwinia-network/apps/blob/master/README.md#how-to-add-your-portal"
>
{t("Submit")}
</a>
<>
<div className="flex items-center gap-[0.625rem]">
<a
className="text-light min-h-[2.25rem] bg-[#242A2E] px-[15px] py-[7px] text-sm text-white transition hover:opacity-80 active:scale-95 lg:border lg:border-primary"
target="_blank"
rel="noopener noreferrer"
href="https://github.com/darwinia-network/apps/blob/master/README.md#how-to-add-your-portal"
>
{t("Submit")}
</a>
<button className="h-[2.25rem] w-[2.25rem] bg-[#242A2E] p-[0.625rem] lg:hidden lg:border lg:border-primary">
<img src={mobileMenuIcon} alt="mobileMenuIcon" className="" />
</button>
</div>
{/* <div className=" hidden items-center gap-[0.625rem] lg:flex">
<div className="flex cursor-pointer items-center gap-[0.313rem] rounded-[0.313rem] bg-[#242A2E] px-[0.625rem] py-[0.5rem]">
<img src={darwiniabtnlogo} alt="darwiniabtnlogo" />
<span className="text-[0.875rem] font-[400] leading-[1.5rem] text-white">Darwinia</span>
<button
className="h-[1rem] w-[1rem] bg-cover bg-center"
style={{ backgroundImage: `url(${DownArrow})` }}
></button>
</div>
<div className="flex cursor-pointer items-center gap-[0.313rem] rounded-[0.313rem] bg-[#242A2E] px-[0.625rem] py-[0.5rem]">
<img src={headerbtnlogo} alt="darwiniabtnlogo" />
<span className="text-[0.875rem] font-[400] leading-[1.5rem] text-white">0x0E5...f204</span>
</div>
</div> */}
</>
) : null}
{isLocalSubkeyMigration ? (
<button
Expand Down
Loading

0 comments on commit 9dec514

Please sign in to comment.