<h1>What makes you S.P.E.C.I.A.L?<span>(Click card to reveal perk!)</span></h1>
<div class="card-scene">
<div id="card" class="card">
<div class="card-face card-backing">
<div class="grain-overlay"></div>
<div class="bump"></div>
<div class="top-banner"></div>
<div class="back-main">
<div class="pipboy">
<div class="twelve-point-star"></div>
<img src="https://vignette.wikia.nocookie.net/fallout/images/c/c0/VaultBoyFO3.png/revision/latest?cb=20110809182235" />
</div>
<div class="vault-tec">
<div class="center"></div>
<div class="lines">
<div class="line line--left">
<div class="line-inner"></div>
<div class="line-inner"></div>
<div class="line-inner"></div>
</div>
<div class="line line--right">
<div class="line-inner"></div>
<div class="line-inner"></div>
<div class="line-inner"></div>
</div>
</div>
</div>
</div>
</div>
<div class="card-face card-front">
<h1>
<span class="bump">
<b class="outer">
<b class="inner">1</b>
</b>
</span>
Slugger
</h1>
<div class="main-pane">
<img class="slugger" src="https://vignette.wikia.nocookie.net/fallout/images/6/69/Fo76_Slugger.png/revision/latest/scale-to-width-down/353?cb=20181125171021"/>
</div>
<div class="desc">
<p>Your two-handed melee weapons now do +10% damage.</p>
<div class="special" data-category="strength">S</div>
<div id="level" class="level" data-level-cap="3" data-level-current="1"></div>
</div>
<div class="grain-overlay"></div>
</div>
</div>
</div>
// Base styles
*,*:before, *:after {box-sizing:border-box;}
html {
overflow: hidden;
font-size: 56.25%;// 9px
// CSS Variables
--color-yellow: #ddb724;
--color-orange: #d19245;
--color-off-black: #352d2a;
--color-grey: #6c6c6c;
--color-white: #e3dfc6;
--color-bone: #e7e4d5;
--color-main: #8cd1b3;
--color-main-lighten: #afdbbf;
--color-main-lighten2: #b2efcd;
--color-main-dark: #84a782;
--color-backing-top: #4e79ad;
--color-backing-light1: #b6cff3;
--color-backing-light2: #c8dcf1;
--color-backing-light3: #88b4ed;
--color-backing-light4: #2f5c8c;
--main-bg-color: #8cd1b3; // blue
--border-radius: 1.5rem;
}
body {
// background-color: var(--main-bg-color);
color: var(--color-yellow);
background-color: #1a1616;
min-height: 100vh;
display: grid;
justify-items: center;
align-items: center;
> h1 {
font-size: 4rem;
color: var(--color-off-bone);
}
}
.card h1, .level {
font-family: 'Staatliches', sans-serif;
}
p, .card span, .special{
font-family: 'Lakki Reddy', cursive;
}
body > h1 {
font-family: 'Sriracha', cursive;
text-transform: uppercase;
text-align: center;
margin: auto .5rem 3rem;
font-size: 4rem;
line-height: 135%;
span {
display: block;
font-size: 50%;
}
}
// Scene set-up for flipping
.card-scene {
width: 37rem;
height: 47rem;
perspective: 600px;
animation: cardAppear 1.4s forwards;
}
@keyframes cardAppear {
0% {
transform: rotate3d(0,0,1,15deg) translate3d(0,-100vh,0);
}
30% {
transform: rotate3d(0,0,0,0deg) translate3d(0,0,0);
}
65% {
transform: rotate3d(0,0,0,0deg) translate3d(0,0,0) scale3d(1,1,1);
}
80% {
transform: rotate3d(0,0,1,-5deg) scale3d(1.05,1.05,1);
}
}
.card {
height: 100%;
width: 100%;
position: relative;
transform-style: preserve-3d;
transform: rotateY(180deg);
&.card--flipped {
animation: cardFlip .275s forwards linear;
}
&.card--unflip {
animation: cardUnFlip .275s forwards linear;
}
}
@keyframes cardFlip {
0% {
transform: rotateZ(0deg) rotateY(180deg);
}
50% {
transform: rotateZ(-10deg) rotateY(90deg);
}
100% {
transform: rotateZ(0deg) rotateY(0deg);
}
}
@keyframes cardUnFlip {
0% {
transform: rotateZ(0deg) rotateY(0deg);
}
50% {
transform: rotateZ(-10deg) rotateY(90deg);
}
100% {
transform: rotateZ(0deg) rotateY(180deg);
}
}
.card-backing {
position: absolute;
z-index: 4;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
transform: rotateY(180deg);
.top-banner {
position: relative;
z-index: 1;
background-color: var(--color-backing-top);
width: 100%;
height: 5.85rem;
border-radius: 3px 3px 0 0;
}
.back-main {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
width: 100%;
background: var(--color-backing-light1);
background: linear-gradient(135deg, var(--color-backing-light1) 0% 25%,var(--color-backing-light2) 25% 50%,var(--color-backing-light3) 50% 75%,var(--color-backing-light4) 75%);
z-index: 1;
border-radius: 0 0 3px 3px;
}
.pipboy {
width: 50%;
margin: 3rem auto 0;
position: relative;
opacity:.7;
.twelve-point-star, .twelve-point-star:before, .twelve-point-star:after {
height: 17rem;
width: 17rem;
background-color: #9bbfde;
position: absolute;
}
.twelve-point-star {
left: 1rem;
top: 1rem;
transform: rotateZ(20deg);
&:before, &:after {
content: '';
}
&:before {
transform: rotate(30deg);
}
&:after {
transform: rotate(-30deg);
}
}
img {
height: auto;
width: 100%;
filter: grayscale(50%);
overflow: hidden;
}
}
}
.card-face {
position: absolute;
backface-visibility: hidden;
box-shadow: 0 0 3px 2px #4e4e4e;
height: 46rem;
width: 36rem;
border-radius: 9px;
border: .5rem solid var(--color-bone);
}
.bump {
display: block;
position: absolute;
top: -2rem;
height: 8.4rem;
width: 8.4rem;
border: 5px solid var(--color-bone);
border-radius: .8rem;
&:before, &:after {
content: '';
position: absolute;
}
// // Covers all the number outer borders
&:before {
z-index: 2;
background-color: var(--color-bone);
}
&:after {
background-color: var(--color-bone);
}
}
.card-backing .bump {
right: -2rem;
&:before {
// Covers the box shadow along the top.
left: -2rem;
top: 1rem;
height: 0.3rem;
width: 1.5rem;
background-color: var(--color-bone);
}
&:after {
background-color: var(--color-backing-top);
right: 0;
height: 100%;
width: 100%;
border-radius: .3rem;
}
}
.card-front .bump {
left: -2rem;
box-shadow: 0 0 4px 2px #4e4e4e;
&:before {
left: 5rem;
top: 1rem;
height: .45rem;
width: 4rem;
}
&:after {
top: 1rem;
left: 1rem;
height: 100%;
width: 6.5rem;
}
}
.vault-tec {
position: relative;
justify-self: end;
height: 8rem;
width: 80%;
margin: 0 auto 2rem;
.center:before, .lines > line {
background-color: var(--color-bone);
}
.center {
border: 1rem solid var(--color-bone);
height: 8rem;
width: 8rem;
margin: 0 auto;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
&:before {
content: '';
height: 3.5rem;
width: 3.5rem;
border-radius: 50%;
}
}
.lines {
position: absolute;
top: 0;
height: 100%;
width: 100%;
display: grid;
grid-template-columns: 40% 1fr 40%;
grid-template-rows: 1fr;
.line {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
.line-inner {
background-color: var(--color-bone);
height: 10px;
width: 60%;
&:nth-child(2) {
width: 75%;
margin-top: .6rem;
margin-bottom: .6rem;
}
position: relative;
&:before {
content: '';
position: absolute;
top: 0;
height: 100%;
width: 10%;
background-color: var(--color-bone);
}
}
&.line--left {
align-items: flex-end;
.line-inner:before {
left: -5%;
border-radius: 50% 0 0 50%;
}
.line-inner:nth-child(2) {
margin-right: .5rem;
}
}
&.line--right {
grid-column-start: 3;
.line-inner:before {
right: -5%;
border-radius: 0 50% 50% 0;
}
.line-inner:nth-child(2) {
margin-left: .5rem;
}
}
}
}
}
// Card content
// Seperated grid styling for clarity
.card-front {
grid-template-rows: 4.4rem 1fr auto;
> h1,
> .main-pane,
> .desc {
grid-column-start: 0;
grid-column-end: 1;
grid-column-gap: 0;
}
h1, .mane-pane {
grid-row-start: 1;
}
.main-pane {
grid-row-end: 4;
z-index: 1;
border-radius: 0 0 25% 25%;
}
// end grid styling
// begin the rest of the front styling
position: relative;
display: grid;
grid-template-rows: 3;
background-color: var(--color-bone);
h1 {
position: relative;
color: var(--color-white);
font-size: 3.6rem;
text-align: center;
letter-spacing: 1px;
line-height: 135%;
background-color: var(--color-main-dark);
width: 100%;
padding-left: 4rem;
border-top-right-radius: 1rem;
&:before, &:after {
content: '';
position: absolute;
}
// Covers the border between the card title and it's number
&:after {
left: 5.1rem;
background-color: var(--color-main-dark);
height: 100%;
width: 2rem;
}
span.bump {
color: #4e4943;
font-size: 5.5rem;
line-height: 170%;
vertical-align: middle;
}
/* Needed to wrap the number in 2 <b>s to give the correct effect for the border radius.
The outer tag gives the background colour to give the appearance of extending the heading.
The inner tag provides the background colour and inner border radius. */
b.outer {
display: inline-block;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
padding: .3rem;
background-color: var(--color-main-dark);
border-radius: .3rem;
z-index:2;
}
b.inner {
display: block;
background-color: var(--color-white);
height: 100%;
width: 100%;
border-radius: 3px;
}
}
.desc {
grid-row-start: 3;
z-index: 2;
align-self: end;
width: 100%;
background: #d3c297;
background: linear-gradient(to bottom, #b8cbad, #ede8d4 15% 65%, #a5bc9e 100%);
text-align: center;
min-height: 32%;
max-height: 80%;
padding: 2rem;
border: 2px solid var(--color-off-black);
border-radius: 1rem;
p {
font-size: 2rem;
line-height: 125%;
color: var(--color-off-black);
}
}
.special {
position: absolute;
bottom: 1rem;
left: 1rem;
color: var(--color-off-black);
font-size: 4.2rem;
text-shadow: 0 0 2px white, 0 0 2px white;
line-height: 130%;
background-color: var(--color-main);
height: 4.5rem;
padding: .5rem;
border: .2rem solid white;
border-radius: .2rem;
vertical-align: top;
transform: skew(-7deg, -10deg);
overflow:hidden;
}
.level {
position: absolute;
bottom: 7px;
right: -3px;
height: 3rem;
font-size: 2.6rem;
color: var(--color-off-black);
background-color: var(--color-main-dark);
padding: 2px 7px 2px 0;
border-top: 2px solid var(--color-off-black);
border-bottom: 2px solid var(--color-off-black);
border-left: 2px solid var(--color-off-black);
border-right: 1px solid var(--color-grey);
border-radius: 3px;
&:before, &:after {
content:'';
position: absolute;
}
&:before {
top: -8px;
right: -1px;
border-width: 0 3px 7px 0;
border-color: transparent transparent darken(#84a782, 20%) transparent;
border-style: solid;
display: block;
}
&:after {
right: -3px;
}
.star, .star:before, .star:after {
border-color: transparent var(--color-off-black) transparent transparent;
border-width: 1rem .5rem 1rem 0;
border-style: solid;
}
.star.current-level, .star.current-level:before, .star.current-level:after {
border-right-color: var(--color-white);
}
.star {
display: inline-block;
width: 1.5rem;
transform: rotate3d(0,0,1,270deg);
margin-top: .5rem;
margin-left: .9rem;
&:before, &:after {
content: '';
position: absolute;
left: .9rem;
}
&:before {
transform: rotate3d(0,0,1,68deg);
top: -.9rem;
}
&:after {
transform: rotate3d(0,0,1,-68deg);
top: -1.1rem;
}
}
}
}
.main-pane {
overflow: hidden;
position: relative;
&:before {
content: '';
position:absolute;
top: -42rem;
left: -32rem;
//height: 735px;
height: 69.5rem;
width: 100rem;
// Trying to work out the correct values took a while
background: repeating-conic-gradient(
from 90deg,
var(--color-main-lighten2) 0 25deg, var(--color-bone) 0 35deg, var(--color-main) 0 40deg, var(--color-bone) 0 47deg, var(--color-main-lighten) 0 50deg, var(--color-bone) 0 55deg,
var(--color-main) 0 127deg,
var(--color-bone) 0 132deg, var(--color-main-lighten) 0 135deg, var(--color-bone) 0 140deg, var(--color-main) 0 145deg, var(--color-bone) 0 155deg, var(--color-main-lighten2) 0 360deg
);
border-radius: 50%;
}
img.slugger {
margin-top: -4rem;
// talk about time consuming...hand calculated path clipping
clip-path: polygon(24% 33%, 50% 14.5%, 54% 15%, 62% 17%, 70% 14%, 73% 18%, 72.5% 20%, 62% 24%, 64% 36%, 60% 40%, 61% 45%, 70% 60%, 69.5% 64.5%, 63% 65%, 63% 61%, 51% 54%, 44% 65%, 36% 62%, 40% 42%, 31% 36%, 25.5% 37%);
}
}
@media screen and (min-width: 370px) {
html {
font-size: 62.5%;
}
}
.grain-overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 10;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAgAElEQVR4Xm3d7bFbxRKFYen/+YuDAHIwBAFBYOdgyMEQhAkCyMEmCBOEr94pHtVi11WVkbT3TE93T3+s7tk63H/44YeXX3/99dbr999/v3333Xe3N2/e3D58+HD7888/b4/7tx9//PG89/rnn39uP/300xnTtd9+++32888/n7GfPn26vXr16nyO5ldffXXGN/+PP/4447r+7bffnnt9/vrrrw/d5kUvustP8837/Pnzode/1mrt6LRe/H7zzTfne/Sj9e7du9svv/xy3v/+++8zDt9n0ccreaPz8ePHJ71oRKt1fG5e86NlXjzTSeNcT4+tH+34jFavPkcnfUSn+62RXI1p3v0hyEsLxX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Qud23Y3RvxPHx3UJKAwpADTlvAgHDenLJudUO4JKfiBysBFtQrDUP2qr+SX7QgAJ6ryrQnAVflR2PbcmTmtDzTQkWITmtLBSC4eLunLkaJI9M8vqBqwLeIGUFCTFHvqEr2XGBYnNzmvtRCKpywqu4YFMBOokKuiraNqnXjssxzDghM63h0fUJBk6zRROI5GhsVwhBfwVRSwTvR5kdDa9+67d91cetomKiMzT3h7tt8xrjnXAOjIeYO+UMzb8awQSkuRnraIKRVyjFIkBlgxkNB6LLn3Xh4MkJPWMuOBp6jem6MfxsAcPCky4zUDNLc5woVNaSzj2F4YxNR84XxrEj0xAEmV3xryBrrqHfqDcE8dEkMSOuShRyRZsTCHShSCsZTlSRPuGk0dXK1t7t86No1VtwY+zGVta3XOQSTZLWLjK6XLe+I9IKKY611dFO3kZLV0gK9k3HDFE3gIwLOGymMbk0FrUlq/NTdPJVM6PygrpYGSXDrlut7kPqtHoK0WUjcIcVt1S5ILDrbxCLtrgSRQL3Cz99Zg5RJo75SpCGT5AAOvcuYCORI82jtWZQ2NxYccRKbGODX0fG/rUvYeI3s0KBoQIW+7PlsGcbbOKQwlZ4JG2K467xVq/Pk8AmyyTgnr1gT2AICiS6V9DYEqZjlEntA+aXyb1pq6Ab4r2MR6yClaaqDoxyMFav+HmNQeeOh7NBRyjIai1WCtJzmDu6KACr25WjrJ5DkCnt13sPo85KBVAuGkODXEYm4oRftYs20PnRSHFBIjrPF6D1hYQYzFCwWpfIUekJXlN24PgHjfhkzhguf7fk3I8QCWymNCtcKOLtQPkB6E1jgPcTv7aD0dcFGAJybP8cjHhxOyQN8IpkwvCEzyY70R2GJo291++CJhs0jxHbZX0fZ9URNYDR6mMMVhinFmwxAWMkfHeGEs+vjWsealurAq8d5TZnMBneYAOfQidOlgADYMYGsbeVGkiJd0osmoDuv6/wCiiw+ViXMk9gAAAABJRU5ErkJggg==);
}
// Reference: https://www.youtube.com/watch?v=hXLSKvmDlC4&t=178s
View Compiled
var level = document.getElementById('level');
var levelCap = parseInt(level.getAttribute('data-level-cap'));
var curLevel = parseInt(level.getAttribute('data-level-current'));
var card = document.getElementById("card");
for(var i = 1; i <= levelCap; i++) {
if(curLevel >= i) {
level.innerHTML += '<div class="star current-level"></div>';
}
else {
level.innerHTML += '<div class="star"></div>';
}
}
card.addEventListener('click', function(e){
e.stopPropagation();
if(card.classList.contains('card--flipped')) {
card.classList.add('card--unflip');
setTimeout(function(){
card.classList.remove('card--flipped', 'card--unflip');
}, 500);
}
else {
card.classList.add("card--flipped");
}
});
/*
References in the <head> for the conic-gradient background due to lack of browser support outside of Chrome.
via: https://leaverou.github.io/conic-gradient/
*/
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.