Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Add halloween elements (#1731)
Browse files Browse the repository at this point in the history
* Add halloween elements

* Cow flying

* Remove flying cow

* Cleanup.

* Hide on mobile.
  • Loading branch information
fairlighteth authored Oct 29, 2021
1 parent dc0dc7c commit 2ef0162
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/custom/assets/cow-swap/halloween-bats.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: 20 additions & 0 deletions src/custom/assets/cow-swap/halloween-spider.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 28 additions & 3 deletions src/custom/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import HeaderMod, {
} from './HeaderMod'
import Menu from 'components/Menu'
import { Moon, Sun } from 'react-feather'
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { useActiveWeb3React } from 'hooks/web3'
import { useETHBalances } from 'state/wallet/hooks'
import { AMOUNT_PRECISION } from 'constants/index'
Expand All @@ -34,6 +34,9 @@ import { formatSmart } from 'utils/format'
import NetworkCard, { NetworkInfo } from './NetworkCard'
import SVG from 'react-inlinesvg'

// Halloween temporary
import SpiderRag from 'assets/cow-swap/halloween-spider.svg'

export const NETWORK_LABELS: { [chainId in ChainId]?: string } = {
[ChainId.RINKEBY]: 'Rinkeby',
// [ChainId.ROPSTEN]: 'Ropsten',
Expand Down Expand Up @@ -83,8 +86,30 @@ const HeaderControls = styled(HeaderControlsUni)`
`};
`

export const Wrapper = styled.div`
export const Wrapper = styled.div<{ isDarkMode: boolean }>`
width: 100%;
position: relative;
// Halloween temporary start
${({ isDarkMode }) =>
isDarkMode &&
css`
&::after {
content: '';
display: block;
background: url(${SpiderRag}) no-repeat center/contain;
height: 200px;
width: 200px;
position: absolute;
right: -42px;
top: 90px;
${({ theme }) => theme.mediaWidth.upToSmall`
display: none;
content: none;
`};
}
`}
${HeaderFrame} {
padding: 16px;
Expand Down Expand Up @@ -210,7 +235,7 @@ export default function Header() {
}, [isOrdersPanelOpen, isMenuOpen])

return (
<Wrapper>
<Wrapper isDarkMode={darkMode}>
<HeaderModWrapper>
<HeaderRow marginRight="0">
<Title href=".">
Expand Down

0 comments on commit 2ef0162

Please sign in to comment.