Closed sarahholder closed 4 years ago
``
html
<div class=“center”>
<div class=“fancy-card”>
<div class=“additional”>
<div class=“user-card”>
<svg width=“110” height=“110" viewBox=“0 0 250 250” xmlns=“http://www.w3.org/2000/svg” role=“img” aria-labelledby=“title desc” class=“center”>
<title id=“title”>Teacher</title>
<desc id=“desc”>Cartoon of a Caucasian woman smiling, and wearing black glasses and a purple shirt with white collar drawn by Alvaro Montoro.</desc>
</div>
<div class=“more-info”>
<h1>Jane Doe</h1>
<div class=“coords”>
<span>Group Name</span>
<span>Joined January 2019</span>
</div>
<div class=“coords”>
<span>Position/Role</span>
<span>City, Country</span>
</div>
<div class=“stats”>
</div>
</div>
</div>
<div class=“general”>
<h1>Kenny Mc</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce a volutpat mauris, at molestie lacus. Nam vestibulum sodales odio ut pulvinar.</p>
<span class=“more”>Mouse over the card for more info</span>
</div>
</div>
css
@import url('https://fonts.googleapis.com/css?family=Abel');
html, body {
background: #FCEEB5;
font-family: Abel, Arial, Verdana, sans-serif;
}
.center {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
}
.fancy-card {
width: 450px;
height: 250px;
background-color: #fff;
background: linear-gradient(#f8f8f8, #fff);
box-shadow: 0 8px 16px -8px rgba(0,0,0,0.4);
border-radius: 6px;
overflow: hidden;
position: relative;
margin: 1.5rem;
}
.fancy-card h1 {
text-align: center;
}
.fancy-card .additional {
position: absolute;
width: 150px;
height: 100%;
background: linear-gradient(#dE685E, #EE786E);
transition: width 0.4s;
overflow: hidden;
z-index: 2;
}
.fancy-card.green .additional {
background: linear-gradient(#92bCa6, #A2CCB6);
}
.fancy-card:hover .additional {
width: 100%;
border-radius: 0 5px 5px 0;
}
.fancy-card .additional .user-card {
width: 150px;
height: 100%;
position: relative;
float: left;
}
.fancy-card .additional .user-card::after {
content: "";
display: block;
position: absolute;
top: 10%;
right: -2px;
height: 80%;
border-left: 2px solid rgba(0,0,0,0.025);*/
}
.fancy-card .additional .user-card .level,
.fancy-card .additional .user-card .points {
top: 15%;
color: #fff;
text-transform: uppercase;
font-size: 0.75em;
font-weight: bold;
background: rgba(0,0,0,0.15);
padding: 0.125rem 0.75rem;
border-radius: 100px;
white-space: nowrap;
}
.fancy-card .additional .user-card .points {
top: 85%;
}
.fancy-card .additional .user-card svg {
top: 50%;
}
.fancy-card .additional .more-info {
width: 300px;
float: left;
position: absolute;
left: 150px;
height: 100%;
}
.fancy-card .additional .more-info h1 {
color: #fff;
margin-bottom: 0;
}
.fancy-card.green .additional .more-info h1 {
color: #224C36;
}
.fancy-card .additional .coords {
margin: 0 1rem;
color: #fff;
font-size: 1rem;
}
.fancy-card.green .additional .coords {
color: #325C46;
}
.fancy-card .additional .coords span + span {
float: right;
}
.fancy-card .additional .stats {
font-size: 2rem;
display: flex;
position: absolute;
bottom: 1rem;
left: 1rem;
right: 1rem;
top: auto;
color: #fff;
}
.fancy-card.green .additional .stats {
color: #325C46;
}
.fancy-card .additional .stats > div {
flex: 1;
text-align: center;
}
.fancy-card .additional .stats i {
display: block;
}
.fancy-card .additional .stats div.title {
font-size: 0.75rem;
font-weight: bold;
text-transform: uppercase;
}
.fancy-card .additional .stats div.value {
font-size: 1.5rem;
font-weight: bold;
line-height: 1.5rem;
}
.fancy-card .additional .stats div.value.infinity {
font-size: 2.5rem;
}
.fancy-card .general {
width: 300px;
height: 100%;
position: absolute;
top: 0;
right: 0;
z-index: 1;
box-sizing: border-box;
padding: 1rem;
padding-top: 0;
}
.fancy-card .general .more {
position: absolute;
bottom: 1rem;
right: 1rem;
font-size: 0.9em;
}
User Story
As a developer i need to see the fancy card we want to use
AC
WHEN i look at this ticket THEN i should see html and css for the card
Dev Notes