mirror of
https://github.com/seigler/bl3skills.com
synced 2025-07-27 09:46:10 +00:00
cleanup
This commit is contained in:
parent
d0b516e662
commit
51a4c5bfba
9 changed files with 113 additions and 73 deletions
|
@ -1,3 +1,4 @@
|
||||||
main {
|
main {
|
||||||
padding: 1rem 1rem 3rem;
|
padding: 1rem 1rem 3rem;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 />
|
export default App;
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,17 +19,19 @@ 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>
|
||||||
{ Object.keys(skills[treename]).map((tier, tierindex) =>
|
<div class={style.skills}>
|
||||||
<div class={style.tier}>
|
{ Object.keys(skills[treename]).map((tier, tierindex) =>
|
||||||
{ Object.keys(skills[treename][tier]).map(
|
<div class={style.tier}>
|
||||||
skillname => <Skill
|
{ Object.keys(skills[treename][tier]).map(
|
||||||
{...skills[treename][tier][skillname]}
|
skillname => <Skill
|
||||||
name={skillname}
|
{...skills[treename][tier][skillname]}
|
||||||
enabled={build.invested[treeindex] >= 5 * tierindex - 5}
|
name={skillname}
|
||||||
/>
|
enabled={build.invested[treeindex] >= 5 * tierindex - 5}
|
||||||
) }
|
/>
|
||||||
</div>
|
) }
|
||||||
) }
|
</div>
|
||||||
|
) }
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,14 @@
|
||||||
--offwhite: #F8F8FA;
|
--offwhite: #F8F8FA;
|
||||||
--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 {
|
||||||
|
|
|
@ -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>
|
||||||
|
|
20
src/index.js
20
src/index.js
|
@ -3,17 +3,17 @@ import App from '@components/App';
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
let elem = document.querySelector('#app');
|
let elem = document.querySelector('#app');
|
||||||
let root = render(<App/>, elem, elem.firstElementChild);
|
let root = render(<App />, elem, elem.firstElementChild);
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development' && module.hot) {
|
if (process.env.NODE_ENV === 'development' && module.hot) {
|
||||||
// enable preact devtools
|
// enable preact devtools
|
||||||
require('preact/debug');
|
require('preact/debug');
|
||||||
// respond to HMR updates
|
// respond to HMR updates
|
||||||
module.hot.accept('@components/App', New => {
|
module.hot.accept('@components/App', New => {
|
||||||
New = require('@components/App').default;
|
New = require('@components/App').default;
|
||||||
root = render(<New />, elem, root);
|
root = render(<New />, elem, root);
|
||||||
});
|
});
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
// Service Worker registration
|
// Service Worker registration
|
||||||
require('offline-plugin/runtime').install();
|
require('offline-plugin/runtime').install();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue