refactored UI of templates on hometab

pull/4248/head
lianahus 1 year ago
parent da0fa7ecae
commit 22fc80172e
  1. 10
      apps/remix-ide/src/assets/css/themes/bootstrap-cyborg.min.css
  2. BIN
      apps/remix-ide/src/assets/img/gnosissafeLogo.png
  3. BIN
      apps/remix-ide/src/assets/img/openzeppelinLogo.png
  4. BIN
      apps/remix-ide/src/assets/img/oxprojectLogo.png
  5. BIN
      apps/remix-ide/src/assets/img/remixverticaltextLogo.png
  6. 18
      libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
  7. 21
      libs/remix-ui/home-tab/src/lib/components/workspaceTemplate.tsx
  8. 2
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css

@ -284,19 +284,19 @@ template {
color:#fff color:#fff
} }
.h1,h1 { .h1,h1 {
font-size:4rem font-size:3rem
} }
.h2,h2 { .h2,h2 {
font-size:3rem font-size:2.5rem
} }
.h3,h3 { .h3,h3 {
font-size:2.5rem font-size:2rem
} }
.h4,h4 { .h4,h4 {
font-size:2rem font-size:1.6rem
} }
.h5,h5 { .h5,h5 {
font-size:1.5rem font-size:1.3rem
} }
.h6,h6 { .h6,h6 {
font-size:.875rem font-size:.875rem

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@ -106,48 +106,54 @@ function HomeTabGetStarted({plugin}: HomeTabGetStartedProps) {
> >
<WorkspaceTemplate <WorkspaceTemplate
gsID="sUTLogo" gsID="sUTLogo"
workspaceTitle="Gnosis Safe MultiSig" workspaceTitle="MultiSig"
description={ description={
intl.formatMessage({ id: 'home.gnosisSafeMultisigTemplateDesc' }) intl.formatMessage({ id: 'home.gnosisSafeMultisigTemplateDesc' })
} }
projectLogo="assets/img/gnosissafeLogo.png"
callback={() => createWorkspace("gnosisSafeMultisig")} callback={() => createWorkspace("gnosisSafeMultisig")}
/> />
<WorkspaceTemplate <WorkspaceTemplate
gsID="sUTLogo" gsID="sUTLogo"
workspaceTitle="0xProject ERC20" workspaceTitle="ERC20"
description={ description={
intl.formatMessage({ id: 'home.zeroxErc20TemplateDesc' }) intl.formatMessage({ id: 'home.zeroxErc20TemplateDesc' })
} }
projectLogo="assets/img/oxprojectLogo.png"
callback={() => createWorkspace("zeroxErc20")} callback={() => createWorkspace("zeroxErc20")}
/> />
<WorkspaceTemplate <WorkspaceTemplate
gsID="sourcifyLogo" gsID="sourcifyLogo"
workspaceTitle="OpenZeppelin ERC20" workspaceTitle="ERC20"
description={intl.formatMessage({id: 'home.ozerc20TemplateDesc'})} description={intl.formatMessage({id: 'home.ozerc20TemplateDesc'})}
projectLogo="assets/img/openzeppelinLogo.png"
callback={() => createWorkspace('ozerc20')} callback={() => createWorkspace('ozerc20')}
/> />
<WorkspaceTemplate <WorkspaceTemplate
gsID="sUTLogo" gsID="sUTLogo"
workspaceTitle="OpenZeppelin ERC721" workspaceTitle="ERC721"
description={intl.formatMessage({ description={intl.formatMessage({
id: 'home.ozerc721TemplateDesc' id: 'home.ozerc721TemplateDesc'
})} })}
projectLogo="assets/img/openzeppelinLogo.png"
callback={() => createWorkspace("ozerc721")} callback={() => createWorkspace("ozerc721")}
/> />
<WorkspaceTemplate <WorkspaceTemplate
gsID="sUTLogo" gsID="sUTLogo"
workspaceTitle="OpenZeppelin ERC1155" workspaceTitle="ERC1155"
description={intl.formatMessage({ description={intl.formatMessage({
id: 'home.ozerc1155TemplateDesc' id: 'home.ozerc1155TemplateDesc'
})} })}
projectLogo="assets/img/openzeppelinLogo.png"
callback={() => createWorkspace("ozerc1155")} callback={() => createWorkspace("ozerc1155")}
/> />
<WorkspaceTemplate <WorkspaceTemplate
gsID="solhintLogo" gsID="solhintLogo"
workspaceTitle="Remix Basic" workspaceTitle="Basic"
description={intl.formatMessage({ description={intl.formatMessage({
id: 'home.remixDefaultTemplateDesc' id: 'home.remixDefaultTemplateDesc'
})} })}
projectLogo="assets/img/remixverticaltextLogo.png"
callback={() => createWorkspace("remixDefault")} callback={() => createWorkspace("remixDefault")}
/> />
</Carousel> </Carousel>

@ -1,23 +1,34 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import React, {useContext} from 'react' import React, {useContext} from 'react'
import {CustomTooltip} from '@remix-ui/helper'
import {ThemeContext} from '../themeContext'
interface WorkspaceTemplateProps { interface WorkspaceTemplateProps {
gsID: string gsID: string
workspaceTitle: string workspaceTitle: string
projectLogo: string
callback: any callback: any
description: string description: string
} }
function WorkspaceTemplate({gsID, workspaceTitle, description, callback}: WorkspaceTemplateProps) { function WorkspaceTemplate({gsID, workspaceTitle, description, projectLogo, callback}: WorkspaceTemplateProps) {
const themeFilter = useContext(ThemeContext)
console.log("theme ", themeFilter)
return ( return (
<div className="d-flex remixui_home_workspaceTemplate"> <div className="d-flex remixui_home_workspaceTemplate">
<button <button
className="btn border-secondary p-1 d-flex flex-column text-nowrap justify-content-center align-items-center mr-2 remixui_home_workspaceTemplate" className="btn border-secondary p-1 d-flex flex-column text-nowrap justify-content-center mr-2 remixui_home_workspaceTemplate"
data-id={'landingPageStart' + gsID} data-id={'landingPageStart' + gsID}
onClick={() => callback()} onClick={() => callback()}
> >
<div className="mb-2 w-100 p-2 h-100 align-items-start d-flex flex-column"> <div className="w-100 p-1 h-100 align-items-center d-flex flex-column">
<label className="h6 pb-1 text-uppercase text-dark remixui_home_cursorStyle">{workspaceTitle}</label> <CustomTooltip placement={'top'} tooltipClasses="text-wrap" tooltipId="etherscan-receipt-proxy-status" tooltipText={description}>
<div className="remixui_home_gtDescription">{description}</div> <div className='d-flex flex-column align-items-center'>
<label className="h5 pb-1 mt-1 text-uppercase remixui_home_cursorStyle" style={{color: themeFilter.name == "dark" ? "var(--white)" : "var(--black)"}}>{workspaceTitle}</label>
<img className="" src={projectLogo} alt="" style={{height: "20px", width: "fit-content", filter: themeFilter.name == "dark" ? "invert(1)" : "invert(0)"}} />
</div>
</CustomTooltip>
</div> </div>
</button> </button>
</div> </div>

@ -77,7 +77,7 @@
} }
.remixui_home_cursorStyle { .remixui_home_cursorStyle {
cursor: pointer; cursor: pointer;
font-size: 0.8rem; font-weight: 900;
} }
.remixui_home_envButton { .remixui_home_envButton {
width: 220px; width: 220px;

Loading…
Cancel
Save