This commit is contained in:
Joshua Seigler 2019-05-03 23:28:50 -04:00
parent d0b516e662
commit 51a4c5bfba
9 changed files with 113 additions and 73 deletions

View file

@ -1,3 +1,4 @@
main { main {
padding: 1rem 1rem 3rem; padding: 1rem 1rem 3rem;
margin: auto;
} }

View file

@ -9,19 +9,17 @@ import Siren from '@pages/Siren';
// import style from './index.css'; // import style from './index.css';
export default function App () { const App = () =>
return ( [
<div> <Nav />,
<Nav />
<main> <main>
<Router> <Router>
<Home path='/' /> <Home path='/' />
<Operative path='/operative' /> <Operative path='/operative' />
<Siren path='/siren' /> <Siren path='/siren' />
</Router> </Router>
</main> </main>,
<Footer /> <Footer />
</div> ];
);
} export default App;

View file

@ -1,8 +1,4 @@
.footer { .footer {
position: absolute;
bottom: 0;
right: 0;
width: 100%;
font-family: var(--font-header); font-family: var(--font-header);
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -20,11 +16,11 @@
} }
.heart { .heart {
width: 40px; width: 2em;
height: 40px; height: 2em;
background: transparent url(@assets/twitter_heart.png) no-repeat; background: transparent url(@assets/twitter_heart.png) no-repeat;
background-size: 2900%; background-size: 2900%;
margin: 0 -8px; margin: 0 -0.4em;
} }
.heart:hover { .heart:hover {

View file

@ -11,27 +11,31 @@
text-align: center; text-align: center;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: white;
filter: brightness(50%);
}
.skill.enabled {
filter: brightness(100%);
} }
.skill:before { .skill:before {
content: ''; content: '';
background-color: #333; background-image: linear-gradient(to bottom, #333, #555);
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
z-index: -1; z-index: -1;
clip-path: polygon(0 15%, 15% 0, 100% 0, 100% 85%, 85% 100%, 0% 100%);
filter: brightness(50%);
} }
.skill.usable:before { .skill.enabled:before {
background-color: #A70; filter: brightness(100%);
}
.usable:before {
background-image: linear-gradient(to bottom, hsl(var(--themeHue),91%,50%), hsl(var(--themeHue),91%,30%));
}
.skill:hover:before {
background-image: linear-gradient(to bottom, hsl(30,100%,30%), hsl(30,100%,60%));
filter: brightness(100%);
} }
.actionSkill:before { .actionSkill:before {
@ -60,17 +64,19 @@
.augment:first-child { .augment:first-child {
position: absolute; position: absolute;
left: 0; right: 100%;
} }
.augment:last-child { .augment:last-child {
position: absolute; position: absolute;
right: 0; left: 100%;
} }
.augment:only-child { .augment:only-child {
position: relative; position: relative;
background-color: transparent; background-color: transparent;
outline: none; outline: none;
left: initial;
right: initial;
} }
.ranks { .ranks {

View file

@ -2,6 +2,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
cursor: default;
} }
.trees, .tier { .trees, .tier {
@ -10,35 +11,61 @@
.treeName { .treeName {
text-align: center; text-align: center;
color: white;
order: 1; order: 1;
font-size: 1em; font-size: 1em;
line-height: 1rem; line-height: 1.5rem;
} }
.tree { .tree {
--themeColor: hsl(var(--themeHue),91%,22%);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin: 1rem; margin: 1rem;
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), padding: 0 3.5rem;
linear-gradient(0deg, var(--themeColor), var(--themeColor)); background-image: linear-gradient(0deg, var(--themeColor), var(--themeColor));
background-size: calc(3.5rem * 3) calc((25 - var(--invested)) / 5 * 3.5rem + 1rem), calc(3.5rem * 3) calc(100% - 1.5rem); background-size: 100% calc(100% - 1.5rem);
background-repeat: no-repeat, no-repeat; background-repeat: no-repeat;
background-position: center bottom, center bottom; background-position: center bottom;
background-clip: content-box;
color: rgba(255,255,255,0.8);
}
.skills {
position: relative;
user-select: none;
}
.skills:before {
--gradientStop: calc((var(--invested) + 5) * 3.5rem / 5 + 1.65rem);
content: '';
position: absolute;
top: 1.85rem;
bottom: 0;
left: 0.375rem;
right: 0.375rem;
background-image: linear-gradient(
to bottom,
hsla(0,0%,60%,1) calc(var(--gradientStop) - 1rem),
hsla(0,0%,90%,1) var(--gradientStop),
hsla(0,0%,25%,1) calc(var(--gradientStop) + 0.1px),
hsla(0,0%,40%,1) 120%
);
mix-blend-mode: overlay;
border: 0.15rem solid hsla(0,0%,0%,0.8);
} }
.tier { .tier {
width: calc(3.5rem * 5); width: calc(3.5rem * 3 + 0.5em);
justify-content: center; justify-content: center;
position: relative; position: relative;
} }
.green {
--themeHue: 106;
}
.blue { .blue {
--themeColor: #007; --themeHue: 207;
} }
.red { .red {
--themeColor: #700; --themeHue: 18;
}
.green {
--themeColor: #070;
} }

View file

@ -3,7 +3,7 @@ import Skill from '@components/Skill';
import style from './index.css'; import style from './index.css';
const initialState = { const initialState = {
invested: [12, 0, 20], invested: [4, 5, 6],
}; };
export default function VaultHunter ({ export default function VaultHunter ({
@ -19,6 +19,7 @@ export default function VaultHunter ({
style={{ '--invested': build.invested[treeindex] }} style={{ '--invested': build.invested[treeindex] }}
> >
<h2 class={style.treeName}>{ treename }</h2> <h2 class={style.treeName}>{ treename }</h2>
<div class={style.skills}>
{ Object.keys(skills[treename]).map((tier, tierindex) => { Object.keys(skills[treename]).map((tier, tierindex) =>
<div class={style.tier}> <div class={style.tier}>
{ Object.keys(skills[treename][tier]).map( { Object.keys(skills[treename][tier]).map(
@ -31,6 +32,7 @@ export default function VaultHunter ({
</div> </div>
) } ) }
</div> </div>
</div>
); );
return ( return (

View file

@ -6,6 +6,13 @@
--transition-duration: 300ms; --transition-duration: 300ms;
--font-header: sans-serif; --font-header: sans-serif;
--font-list: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; --font-list: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 1.5vw;
}
@media screen and (min-width: 189vh) {
:root {
font-size: 2.835vh;
}
} }
* { * {
@ -20,11 +27,15 @@
} }
body { body {
color: #333;
position: relative; position: relative;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
color: #333;
font-family: var(--font-list); font-family: var(--font-list);
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
min-height: 100vh;
} }
a { a {

View file

@ -11,7 +11,6 @@
<link rel="shortcut icon" href="/assets/favicon.png"/> <link rel="shortcut icon" href="/assets/favicon.png"/>
<link rel="manifest" href="/assets/manifest.json"/> <link rel="manifest" href="/assets/manifest.json"/>
</head> </head>
<body> <body id="app">
<div id="app"></div>
</body> </body>
</html> </html>