Skip to content

Instantly share code, notes, and snippets.

@axemonkey
Created June 8, 2015 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axemonkey/05c3c62cb1b871ca1225 to your computer and use it in GitHub Desktop.
Save axemonkey/05c3c62cb1b871ca1225 to your computer and use it in GitHub Desktop.
<!-- Challenge: Recreate the image shown in the screenshot. Feel free to add markup below as required. Bonus points for creating re-usable components. Don't worry too much about having the exact fonts. -->
<section>
<section class="intro">
<h1>Main header</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin augue neque, mattis eget lacinia ac, venenatis et lacus.</p>
<a href="#">Yes, Please</a>
</section>
<section class="detail">
<h1>Benefits</h1>
<ul>
<li>This is a great benefit</li>
<li>Lots of benefits</li>
<li>Benefitting everyone</li>
<li>With so many benefits</li>
<li>That the benefits will be abundant</li>
<li>Beneficial</li>
</ul>
<a href="#">Yes, Please</a>
</section>
</section>
$blue: #2de0db;
$pink: #ea2b7d;
$green: #0dc126;
$grey: #f2f2f2;
@mixin btn($col) {
display: inline-block;
text-decoration: none;
font-size: 1.75em;
text-transform: uppercase;
background: $col;
color: #fff;
padding: 34px 50px 20px 50px;
border-radius: 10px;
border-bottom: 10px solid darken($col, 15%);
&:after {
content: '⟩';
font-weight: bold;
margin-left: 10px;
font-size: 1.9rem;
}
}
body {
background-color: #fff;
font-family: helvetica, arial, sans-serif; //ugh, but you know... time...
}
h1 {
margin: 0;
font-size: 4.5em;
}
section {
width: 860px;
margin: auto;
text-align: center;
padding: 90px 0;
p {
font-size: 1.75em;
line-height: 1.5;
margin: 2em 3em;
}
}
.intro {
background-color: $blue;
-webkit-border-top-left-radius: 15px;
-webkit-border-top-right-radius: 15px;
-moz-border-radius-topleft: 15px;
-moz-border-radius-topright: 15px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
color: #fff;
h1 {
text-transform: uppercase;
}
a {
@include btn($pink);
}
}
.detail {
background-color: $grey;
-webkit-border-bottom-left-radius: 15px;
-webkit-border-bottom-right-radius: 15px;
-moz-border-radius-bottomleft: 15px;
-moz-border-radius-bottomright: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
a {
@include btn($green);
}
}
ul {
list-style-type: none;
padding: 0;
margin: 2em;
li {
font-size: 1.75em;
display: block;
border-top: 2px solid darken($grey, 10%);
padding: .5em 0;
&:first-child {
border: 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment