Skip to content

Commit

Permalink
Merge pull request #868 from scroll-tech/sepolia
Browse files Browse the repository at this point in the history
merge sepolia in to mainnet
  • Loading branch information
zzq0826 authored Dec 15, 2023
2 parents 806b9b2 + 68d43d3 commit 34fee76
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 88 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scroll.io",
"version": "5.0.51",
"version": "5.0.52",
"private": false,
"license": "MIT",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/components/Footer/PureFooter/RelativeLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const LinkText = props => {
sx={{
color: "#FFF8F3",
fontSize: ["1.6rem", "1.5rem"],
lineHeight: ["4rem", "4.5rem"],
lineHeight: "normal",
marginBottom: ["3rem"],
cursor: "pointer",
"&:hover": {
color: theme => theme.palette.primary.dark,
Expand Down
43 changes: 9 additions & 34 deletions src/components/Footer/PureFooter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,23 @@ import ScrollLogo from "@/components/ScrollLogo"
import { requireEnv } from "@/utils"

import SectionWrapper from "../../SectionWrapper"
import { aboutList, mediaList, resourceList } from "../helper"
import { aboutList, mediaList } from "../helper"
import RelativeLink from "./RelativeLink"

const useStyles = makeStyles()(theme => ({
footerLayout: {
display: "grid",
width: "100%",
gridTemplateColumns: "repeat(5, 1fr)",
gridTemplateColumns: " minmax(auto, 24rem) minmax(auto, 24rem) 1fr minmax(auto, 24rem)",
gridTemplateAreas: `
"logo about resource follow version"
"logo about follow version"
`,

[theme.breakpoints.down("md")]: {
gridTemplateColumns: "repeat(2, 1fr)",
gridTemplateAreas: `
"logo follow"
"about resource"
"version version";
"logo version"
"about follow";
`,
gridRowGap: "5rem",
},
Expand All @@ -42,14 +41,6 @@ const useStyles = makeStyles()(theme => ({
alignSelf: "center",
},
},
followTitle: {
[theme.breakpoints.down("sm")]: {
display: "none",
},
},
resource: {
gridArea: "resource",
},
version: {
gridArea: "version",
},
Expand All @@ -58,39 +49,23 @@ const useStyles = makeStyles()(theme => ({
const Footer = () => {
const { classes } = useStyles()
return (
<SectionWrapper dark sx={{ pt: "6rem", pb: ["8rem", "12rem"] }}>
<SectionWrapper dark sx={{ pt: "6rem", pb: ["3rem"] }}>
<Box className={classes.footerLayout}>
<Link href="/" className={classes.logo}>
<ScrollLogo light></ScrollLogo>
</Link>
<Box className={classes.about}>
<Typography sx={{ fontSize: ["1.6rem", "1.8rem"], fontWeight: 600, lineHeight: "normal", color: "#FFF8F3" }}>About Scroll</Typography>
<List sx={{ pt: ["0.9rem", "1.8rem"], pb: 0 }}>
<List sx={{ py: 0 }}>
{aboutList.map(item => (
<ListItem key={item.name} disablePadding>
<RelativeLink {...item}></RelativeLink>
</ListItem>
))}
</List>
</Box>
<Box className={classes.resource}>
<Typography sx={{ fontSize: ["1.6rem", "1.8rem"], fontWeight: 600, lineHeight: "normal", color: "#FFF8F3" }}>Resources</Typography>
<List sx={{ pt: ["0.9rem", "1.8rem"], pb: 0 }}>
{resourceList.map(item => (
<ListItem key={item.name} disablePadding>
<RelativeLink {...item}></RelativeLink>
</ListItem>
))}
</List>
</Box>
<Box className={classes.follow}>
<Typography
className={classes.followTitle}
sx={{ fontSize: "1.8rem", fontWeight: 600, lineHeight: "normal", color: "#FFF8F3", mb: "3rem" }}
>
Follow Us
</Typography>
<Stack direction="row" spacing={"2.6rem"} sx={{ lineHeight: 1 }}>
<Typography sx={{ fontSize: "1.8rem", fontWeight: 600, lineHeight: "normal", color: "#FFF8F3", mb: "3rem" }}>Follow Us</Typography>
<Stack direction="row" spacing={"2.6rem"} sx={{ lineHeight: 1, marginBottom: "3rem" }}>
{mediaList.map(item => (
<Link external href={item.href} key={item.name}>
<SvgIcon
Expand Down
31 changes: 2 additions & 29 deletions src/components/Footer/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,13 @@ import { ReactComponent as TwitterIcon } from "@/assets/svgs/footer/twitter.svg"
import { ReactComponent as YoutubeIcon } from "@/assets/svgs/footer/youtube.svg"

export const aboutList = [
{
name: "Bug Bounty",
href: "https://immunefi.com/bounty/scroll/",
},
{
name: "Join Us",
href: "/join-us",
},
{
name: "Health Status",
href: "https://status.scroll.io/",
},
{
name: "Privacy Policy",
href: "/privacy-policy",
},
{
name: "Terms of Service",
href: "/terms-of-service",
},
]

export const resourceList = [
{
name: "Blog",
to: "/blog",
},
{
name: "User Guide",
href: "https://docs.scroll.io/en/user-guide/",
},
{
name: "Brand Kit",
href: "https://scrollzkp.notion.site/Scroll-Rebrand-Assets-5bb83465f56f40989c4f772b39ed3a06",
name: "Privacy Policy",
href: "/privacy-policy",
},
]

Expand Down
47 changes: 26 additions & 21 deletions src/components/Header/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const sepoliaNavigations = [
key: "develop",
children: [
{
label: "develop1",
label: "",
children: [
{
label: "Mainnet",
Expand All @@ -34,10 +34,16 @@ const sepoliaNavigations = [
href: "https://status.scroll.io/",
isExternal: true,
},
{
label: "Bug Bounty",
key: "status",
href: "https://immunefi.com/bounty/scroll/",
isExternal: true,
},
],
},
{
label: "develop2",
label: "BLOCK EXPLORERS",
children: [
{
label: "Rollup Explorer",
Expand Down Expand Up @@ -85,7 +91,7 @@ const mainnetNavigations = [
key: "develop",
children: [
{
label: "develop1",
label: "",
children: [
{
label: "Mainnet",
Expand Down Expand Up @@ -118,17 +124,17 @@ const mainnetNavigations = [
href: "https://status.scroll.io/",
isExternal: true,
},
{
label: "Bug Bounty",
key: "status",
href: "https://immunefi.com/bounty/scroll/",
isExternal: true,
},
],
},
{
label: "develop2",
label: "BLOCK EXPLORERS",
children: [
{
label: "Rollup Explorer",
key: "rollupscan",
href: "/rollupscan",
rootKey: "develop",
},
{
label: "Scrollscan",
key: "etherscan",
Expand All @@ -152,17 +158,16 @@ const mainnetNavigations = [
],
},
{
label: "Explore",
key: "explore",
label: "Ecosystem",
key: "ecosystem",
href: "/ecosystem",
},
{
label: "Resources",
key: "resources",
children: [
{
children: [
{
label: "Ecosystem",
key: "ecosystem",
href: "/ecosystem",
rootKey: "explore",
},
{
label: "Blog",
key: "blog",
Expand All @@ -176,9 +181,9 @@ const mainnetNavigations = [
rootKey: "explore",
},
{
label: "User Guide",
key: "userGuide",
href: "https://docs.scroll.io/en/user-guide/",
label: "Brand Kit",
key: "brand kit",
href: "https://scrollzkp.notion.site/Scroll-Rebrand-Assets-5bb83465f56f40989c4f772b39ed3a06",
isExternal: true,
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header/desktop_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from "react"
import { NavLink } from "react-router-dom"
import { useStyles } from "tss-react/mui"

import { Box, Container, Fade, Link, Popper, Stack, SvgIcon } from "@mui/material"
import { Box, Container, Fade, Link, Popper, Stack, SvgIcon, Typography } from "@mui/material"
import { styled } from "@mui/system"

import { ReactComponent as TriangleDownSvg } from "@/assets/svgs/common/header-triangle-down.svg"
Expand Down Expand Up @@ -181,6 +181,7 @@ const App = ({ currentMenu }) => {
const renderSubMenuList = children => {
return children.map(section => (
<SectionList key={section.label} dark={dark}>
<Typography sx={{ fontSize: "1.4rem", fontWeight: "bold", lineHeight: "3rem" }}>{section.label}</Typography>
{section.children
// only show sub menu item when the href is set
?.filter(subItem => subItem.href)
Expand Down
3 changes: 2 additions & 1 deletion src/components/Header/mobile_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"
import { NavLink } from "react-router-dom"

import { ExpandMore } from "@mui/icons-material"
import { Box, Collapse, Link, List, ListItemButton, Stack } from "@mui/material"
import { Box, Collapse, Link, List, ListItemButton, Stack, Typography } from "@mui/material"
import { styled } from "@mui/system"

import WalletToolkit from "@/components/WalletToolkit"
Expand Down Expand Up @@ -187,6 +187,7 @@ const App = ({ currentMenu }) => {
<List component="div" disablePadding>
{item.children?.map(section => (
<SectionList key={section.label} dark={dark}>
<Typography sx={{ fontSize: "1.4rem", fontWeight: "bold", lineHeight: "3rem" }}>{section.label}</Typography>
{section.children
// only show sub items with href
?.filter(subItem => subItem.href)
Expand Down

0 comments on commit 34fee76

Please sign in to comment.