Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
e88a8eff
Commit
e88a8eff
authored
May 04, 2021
by
Callil Capuozzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style tweaks
- bring back gradient background - improve header - improve light mode
parent
1607f891
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
26 deletions
+46
-26
index.tsx
src/components/CurrencyInputPanel/index.tsx
+2
-2
index.tsx
src/components/Header/index.tsx
+19
-19
useColor.ts
src/hooks/useColor.ts
+1
-1
App.tsx
src/pages/App.tsx
+2
-1
index.tsx
src/theme/index.tsx
+22
-3
No files found.
src/components/CurrencyInputPanel/index.tsx
View file @
e88a8eff
...
@@ -56,7 +56,7 @@ const CurrencySelect = styled(ButtonGray)<{ selected: boolean; hideInput?: boole
...
@@ -56,7 +56,7 @@ const CurrencySelect = styled(ButtonGray)<{ selected: boolean; hideInput?: boole
align-items: center;
align-items: center;
font-size: 24px;
font-size: 24px;
font-weight: 500;
font-weight: 500;
background-color:
${({
selected
,
theme
})
=>
(
selected
?
theme
.
bg
2
:
theme
.
primary1
)}
;
background-color:
${({
selected
,
theme
})
=>
(
selected
?
theme
.
bg
0
:
theme
.
primary1
)}
;
color:
${({
selected
,
theme
})
=>
(
selected
?
theme
.
text1
:
theme
.
white
)}
;
color:
${({
selected
,
theme
})
=>
(
selected
?
theme
.
text1
:
theme
.
white
)}
;
border-radius: 16px;
border-radius: 16px;
box-shadow:
${({
selected
})
=>
(
selected
?
'
none
'
:
'
0px 6px 10px rgba(0, 0, 0, 0.075)
'
)}
;
box-shadow:
${({
selected
})
=>
(
selected
?
'
none
'
:
'
0px 6px 10px rgba(0, 0, 0, 0.075)
'
)}
;
...
@@ -72,7 +72,7 @@ const CurrencySelect = styled(ButtonGray)<{ selected: boolean; hideInput?: boole
...
@@ -72,7 +72,7 @@ const CurrencySelect = styled(ButtonGray)<{ selected: boolean; hideInput?: boole
margin-right:
${({
hideInput
})
=>
(
hideInput
?
'
0
'
:
'
12px
'
)}
;
margin-right:
${({
hideInput
})
=>
(
hideInput
?
'
0
'
:
'
12px
'
)}
;
:focus,
:focus,
:hover {
:hover {
background-color:
${({
selected
,
theme
})
=>
(
selected
?
theme
.
bg
3
:
darken
(
0.05
,
theme
.
primary1
))}
;
background-color:
${({
selected
,
theme
})
=>
(
selected
?
theme
.
bg
2
:
darken
(
0.05
,
theme
.
primary1
))}
;
}
}
`
`
...
...
src/components/Header/index.tsx
View file @
e88a8eff
...
@@ -31,7 +31,7 @@ import UniBalanceContent from './UniBalanceContent'
...
@@ -31,7 +31,7 @@ import UniBalanceContent from './UniBalanceContent'
const
HeaderFrame
=
styled
.
div
`
const
HeaderFrame
=
styled
.
div
`
display: grid;
display: grid;
grid-template-columns:
48
px 1fr 120px;
grid-template-columns:
120
px 1fr 120px;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
align-items: center;
align-items: center;
...
@@ -39,18 +39,20 @@ const HeaderFrame = styled.div`
...
@@ -39,18 +39,20 @@ const HeaderFrame = styled.div`
width: 100%;
width: 100%;
top: 0;
top: 0;
position: relative;
position: relative;
/* border-bottom: 1px solid
rgba(0, 0, 0, 0.1)
; */
/* border-bottom: 1px solid
${({
theme
})
=>
theme
.
bg2
}
; */
padding:
0.5rem
1rem;
padding: 1rem;
z-index: 21;
z-index: 21;
background-color:
${({
theme
})
=>
theme
.
bg1
}
;
/* background-color:
${({
theme
})
=>
theme
.
bg1
}
; */
position: relative;
${({
theme
})
=>
theme
.
mediaWidth
.
upToMedium
`
${({
theme
})
=>
theme
.
mediaWidth
.
upToMedium
`
display: flex;
padding: 1rem;
padding: 0 1rem;
grid-template-columns: 120px 1fr;
`
}
;
`
}
;
${({
theme
})
=>
theme
.
mediaWidth
.
upToExtraSmall
`
${({
theme
})
=>
theme
.
mediaWidth
.
upToExtraSmall
`
padding: 0.5rem
1rem;
padding:
1rem;
`
}
`
}
`
`
...
@@ -105,16 +107,15 @@ const HeaderRow = styled(RowFixed)`
...
@@ -105,16 +107,15 @@ const HeaderRow = styled(RowFixed)`
`
`
const
HeaderLinks
=
styled
(
Row
)
`
const
HeaderLinks
=
styled
(
Row
)
`
justify-content: center;
justify-self: center;
width: 100%;
background-color:
${({
theme
})
=>
theme
.
bg0
}
;
${({
theme
})
=>
theme
.
mediaWidth
.
upToLarge
`
width: fit-content;
padding: 1rem 0 1rem 1rem;
padding: 4px;
justify-content: flex-start;
border-radius: 16px;
`
}
;
display: grid;
${({
theme
})
=>
theme
.
mediaWidth
.
upToMedium
`
grid-auto-flow: column;
padding: 1rem 0 1rem 1rem;
grid-gap: 10px;
justify-content: flex-end;
overflow: auto;
`
}
;
`
`
const
AccountElement
=
styled
.
div
<
{
active
:
boolean
}
>
`
const
AccountElement
=
styled
.
div
<
{
active
:
boolean
}
>
`
...
@@ -215,7 +216,6 @@ const StyledNavLink = styled(NavLink).attrs({
...
@@ -215,7 +216,6 @@ const StyledNavLink = styled(NavLink).attrs({
color:
${({
theme
})
=>
theme
.
text2
}
;
color:
${({
theme
})
=>
theme
.
text2
}
;
font-size: 1rem;
font-size: 1rem;
width: fit-content;
width: fit-content;
margin: 0 6px;
font-weight: 500;
font-weight: 500;
padding: 8px 12px;
padding: 8px 12px;
...
@@ -350,7 +350,7 @@ export default function Header() {
...
@@ -350,7 +350,7 @@ export default function Header() {
Vote
Vote
</
StyledNavLink
>
</
StyledNavLink
>
<
StyledExternalLink
id=
{
`stake-nav-link`
}
href=
{
'
https://info.uniswap.org
'
}
>
<
StyledExternalLink
id=
{
`stake-nav-link`
}
href=
{
'
https://info.uniswap.org
'
}
>
Charts
<
span
style=
{
{
fontSize
:
'
11px
'
}
}
>
↗
</
span
>
Charts
<
span
style=
{
{
fontSize
:
'
11px
'
,
textDecoration
:
'
none !important
'
}
}
>
↗
</
span
>
</
StyledExternalLink
>
</
StyledExternalLink
>
</
HeaderLinks
>
</
HeaderLinks
>
<
HeaderControls
>
<
HeaderControls
>
...
...
src/hooks/useColor.ts
View file @
e88a8eff
...
@@ -22,7 +22,7 @@ async function getColorFromToken(token: Token): Promise<string | null> {
...
@@ -22,7 +22,7 @@ async function getColorFromToken(token: Token): Promise<string | null> {
detectedHex
=
shade
(
0.005
,
detectedHex
)
detectedHex
=
shade
(
0.005
,
detectedHex
)
AAscore
=
hex
(
detectedHex
,
'
#FFF
'
)
AAscore
=
hex
(
detectedHex
,
'
#FFF
'
)
}
}
return
detectedHex
return
detectedHex
+
'
20
'
}
}
return
null
return
null
})
})
...
...
src/pages/App.tsx
View file @
e88a8eff
...
@@ -28,6 +28,7 @@ import VotePage from './Vote/VotePage'
...
@@ -28,6 +28,7 @@ import VotePage from './Vote/VotePage'
import
{
RedirectDuplicateTokenIdsV2
}
from
'
./AddLiquidityV2/redirects
'
import
{
RedirectDuplicateTokenIdsV2
}
from
'
./AddLiquidityV2/redirects
'
import
{
PositionPage
}
from
'
./Pool/PositionPage
'
import
{
PositionPage
}
from
'
./Pool/PositionPage
'
import
AddLiquidity
from
'
./AddLiquidity
'
import
AddLiquidity
from
'
./AddLiquidity
'
import
{
ThemedBackground
}
from
'
../theme
'
const
AppWrapper
=
styled
.
div
`
const
AppWrapper
=
styled
.
div
`
display: flex;
display: flex;
...
@@ -75,11 +76,11 @@ export default function App() {
...
@@ -75,11 +76,11 @@ export default function App() {
<
Route
component=
{
GoogleAnalyticsReporter
}
/>
<
Route
component=
{
GoogleAnalyticsReporter
}
/>
<
Route
component=
{
DarkModeQueryParamReader
}
/>
<
Route
component=
{
DarkModeQueryParamReader
}
/>
<
AppWrapper
>
<
AppWrapper
>
<
URLWarning
/>
<
HeaderWrapper
>
<
HeaderWrapper
>
<
Header
/>
<
Header
/>
</
HeaderWrapper
>
</
HeaderWrapper
>
<
BodyWrapper
>
<
BodyWrapper
>
<
ThemedBackground
/>
<
Popups
/>
<
Popups
/>
<
Polling
/>
<
Polling
/>
<
TopLevelModals
/>
<
TopLevelModals
/>
...
...
src/theme/index.tsx
View file @
e88a8eff
...
@@ -47,9 +47,9 @@ export function colors(darkMode: boolean): Colors {
...
@@ -47,9 +47,9 @@ export function colors(darkMode: boolean): Colors {
text5
:
darkMode
?
'
#2C2F36
'
:
'
#EDEEF2
'
,
text5
:
darkMode
?
'
#2C2F36
'
:
'
#EDEEF2
'
,
// backgrounds / greys
// backgrounds / greys
bg0
:
darkMode
?
'
#191B1F
'
:
'
#F
7F8FA
'
,
bg0
:
darkMode
?
'
#191B1F
'
:
'
#F
FF
'
,
bg1
:
darkMode
?
'
#212429
'
:
'
#
EDEEF2
'
,
bg1
:
darkMode
?
'
#212429
'
:
'
#
F7F8FA
'
,
bg2
:
darkMode
?
'
#2C2F36
'
:
'
#
F0F0F0
'
,
bg2
:
darkMode
?
'
#2C2F36
'
:
'
#
EDEEF2
'
,
bg3
:
darkMode
?
'
#40444F
'
:
'
#CED0D9
'
,
bg3
:
darkMode
?
'
#40444F
'
:
'
#CED0D9
'
,
bg4
:
darkMode
?
'
#565A69
'
:
'
#888D9B
'
,
bg4
:
darkMode
?
'
#565A69
'
:
'
#888D9B
'
,
bg5
:
darkMode
?
'
#6C7284
'
:
'
#888D9B
'
,
bg5
:
darkMode
?
'
#6C7284
'
:
'
#888D9B
'
,
...
@@ -186,6 +186,25 @@ export const TYPE = {
...
@@ -186,6 +186,25 @@ export const TYPE = {
},
},
}
}
export
const
ThemedBackground
=
styled
.
div
<
{
backgroundColor
?:
string
|
undefined
}
>
`
position: fixed;
top: 0;
left: calc(-100vw / 2);
right: 0;
pointer-events: none;
/* max-width: 100vw !important; */
width: 200vw;
height: 200vh;
mix-blend-mode: color;
background:
${({
backgroundColor
})
=>
`radial-gradient(50% 50% at 50% 50%,
${
backgroundColor
?
backgroundColor
:
'
#fc077d15
'
}
0%, rgba(255, 255, 255, 0) 100%)`
}
;
transform: translateY(-100vh);
will-change: background;
transition: background 450ms ease;
`
export
const
FixedGlobalStyle
=
createGlobalStyle
`
export
const
FixedGlobalStyle
=
createGlobalStyle
`
html, input, textarea, button {
html, input, textarea, button {
font-family: 'Inter', sans-serif;
font-family: 'Inter', sans-serif;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment