Main bulk finished, needs corner circles

This commit is contained in:
Robert McGovern 2021-09-11 14:01:52 +01:00
parent c3e9912adb
commit d1feaedefd
2 changed files with 168 additions and 17 deletions

View File

@ -0,0 +1,126 @@
@import url('https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@400;700&display=swap');
/* sizes: 1440x720 , 375×667 */
*,
*::before,
*::after {
box-sizing: border-box;
}
:root {
--site-color: hsl(185, 75%, 39%);
--dark-cyan: hsl(185, 75%, 39%);
--dark-grayish-blue: hsl(227, 10%, 46%);
--very-dark-desaturated-blue: hsl(229, 23%, 23%);
--dark-gray: hsl(0, 0%, 59%);
--border-gray: hsla(228, 9%, 92%, 1);
/* default font stuff */
--page-base-font-size: 16px; /* for rem calculations*/
--default-font-size: 18px;
--location-font-size: 14px;
--label-font-size: 10px;
}
html {
font-size: var(--page-base-font-size);
height: 100%;
}
body {
background-color: var(--site-color);
font-size: var(--default-font-size);
font-weight: 700;
font-family: 'Kumbh Sans', sans-serif;
color: var(--very-dark-desaturated-blue);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 0 auto;
height: 100%;
}
.card {
background-color: white;
box-shadow: 0px 50px 100px -20px rgba(8, 70, 94, 0.504835);
border-radius: 15px;
text-align: center;
width: min(87vw, 350px);
}
.cardHeader {
background: url(../images/bg-pattern-card.svg);
width: 100%;
height: 140px;
border-radius: 15px 15px 0 0;
}
.photo {
position: relative;
margin: 0 auto;
background: url(../images/image-victor.jpg);
width: 96px;
height: 96px;
border: 5px solid #FFFFFF;
border-radius: 50%;
/* left: calc(50% - 96px/2); */
top: calc(100% - 96px/2);
}
.nameAndAge {
margin-top: 4.5rem;
display: inline-flex;
}
.stats {
display: flex;
justify-content: space-around;
margin-top: 1.5rem;
padding-bottom: 1.5rem;
}
.age {
font-weight: 400;
color: var(--dark-grayish-blue);
margin-left: 0.53125rem;
}
.location {
font-weight: 400;
font-size: var(--location-font-size);
margin-top: 0.5rem;
}
.border {
border: 1px solid var(--border-gray);
margin-top: 1.5rem;
}
.label {
font-weight: 400;
font-size: var(--label-font-size);
color: var(--dark-grayish-blue);
margin-top: 0.5625rem;
}
.attribution {
position: absolute;
font-size: 11px;
text-align: center;
bottom: 1rem;
}
.attribution a { color: hsl(228, 45%, 44%); }
@media screen and (min-width: 1100px) {
}

View File

@ -5,31 +5,56 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<title>Frontend Mentor | Profile card component</title>
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
<!-- <style>
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }
</style>
</style> -->
</head>
<body>
Victor Crest
26
London
80K
Followers
803K
Likes
1.4K
Photos
<div class="page">
<div class="card">
<div class="details">
<div class="cardHeader">
<div class="photo"></div>
</div>
<div class="nameAndAge">
<div class="name">
Victor Crest
</div>
<div class="age">
26
</div>
</div>
<div class="location">
London
</div>
</div>
<div class="border"></div>
<div class="stats">
<div class="followers">
<div class="stat">80K</div>
<div class="label">Followers</div>
</div>
<div class="likes">
<div class="stat">803K</div>
<div class="label">Likes</div>
</div>
<div class="photos">
<div class="stat">1.4K</div>
<div class="label">Photos</div>
</div>
</div>
</div>
</div>
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="#">Your Name Here</a>.
Coded by <a href="https://www.frontendmentor.io/profile/tarasis">Robert McGovern</a>.
</div>
</body>
</html>
</html>