Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <header class="header container">
  <div class="logo-container">
    <div class="logo"></div>
    <h1>Ron Yellin</h1>
  </div>
  <nav class="menu-container">
    <input class="menu-btn" type="checkbox" id="menu-btn" />
    <label class="menu-icon" for="menu-btn">
      <span class="navicon"></span>
    </label>
    <ul class="menu">
      <li><a href="#">About</a></li>
      <li><a href="#">Blog</a></li>
      <li><a href="#">Coaching</a></li>
      <li><a href="#">The&nbsp;Armory</a></li>
    </ul>
  </nav>
</header>
<div class="value-prop container">
  <h2>Building <span class="highlight-bg">strong&nbsp;bodies</span> and unshakeable minds through the sport of <span class="highlight-bg">Weightlifting.</span></h2>
  <button class="button button-primary">Book a Free Consultation</button>
</div>
<div class="hero-image container"></div>
<div class="social-icons">
  <div class="icons-container">
    <a href="#" class="icon instagram"></a>
    <a href="#" class="icon facebook"></a>
    <a href="#" class="icon youtube"></a>
  </div>
</div>
<div class="brand-mark container"></div>
<div class="services container">
  <div class="service-container">
    <div class="service personal-training"></div>
    <a class="stacked-icon-link">Personal Training</a>
  </div>
  <div class="service-container">
    <div class="service custom-program"></div>
    <a class="stacked-icon-link">Clinics &amp; Seminars</a>
  </div>
  <div class="service-container">
    <div class="service corporate-wellness"></div>
    <a class="stacked-icon-link">Corporate Wellness</a>
  </div>
</div>
<div class="testimonial container">
<!--   <p class="quote">Ron's coaching and astute understanding of body mechanics were absolutely instrumental in getting me to the next level.<br>- Jane Doe, 2018 Nationals Weightlifter</p> -->
  <p class="quote">Ron's coaching and astute understanding of body mechanics were absolutely instrumental in getting me to the Nationals platform.</p>
  <p class="quote-attribution">- Jane Doe, 2018 Nationals Weightlifter</p>
</div>
<div class="cta-headline container">
  <h3>Coaching athletes at all levels, ages, and abilities.</h3>
  <button class="button button-primary">Find Out More</button>
</div>
<div class="triangle-overlay">
  <div class="triangle1"></div>
  <div class="triangle2"></div>
</div>
              
            
!

CSS

              
                // TODO: $breakHuge responsive styles

/* Variables */

// Colors
$primaryColorDark: #000;
$primaryColorLight: #fff;
$primaryColorMedium: #232658;
$popColor: #ffab00;
$tertiaryColor: lighten($primaryColorMedium, 25%);
$actionColor: #00ffaa;

// Breakpoints
$breakSmall: 550px;
$breakMedium: 800px;
$breakLarge: 1000px;
$breakHuge: 1500px;

// Spacing and fonts
:root {
  --spaceSmall: 8px;
  --spaceStandard: 16px;
  --spaceLarge: 24px;
  --spaceExtraLarge: 32px;
  
  --fontSans: 'Montserrat', sans-serif;
  --fontRegular: 300;
  --fontMedium: 500;
  --fontBold: 800;
}

/* Mixins */
@mixin boxPadding {
  padding: var(--spaceStandard) var(--spaceExtraLarge);
  
  @media (max-width: $breakMedium) {
    padding: var(--spaceExtraLarge) var(--spaceExtraLarge);
  }
}
@mixin centerContent {
  display: flex;
  justify-content: center;
  align-items: center;
}
@mixin bodyText {
  font-family: var(--fontSans);
  font-size: 1em;
  font-weight: var(--fontRegular);
  line-height: 1.5em;
}

/* General Styles */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 350px;
  min-height: 500px;
  height: 100vh;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  background: $primaryColorDark;
  border: 8px solid $popColor;
  color: $primaryColorLight;
  @include bodyText;
  
  @media (max-width: $breakMedium) {
    height: 100%;
    grid-template-rows: repeat(11, minmax(100px, auto));
  }
}
.container {
  overflow: hidden;
  transition: all 0.2s ease-in;
}
h1 {
  font-family: var(--fontSans);
  font-weight: var(--fontBold);
  color: $tertiaryColor;
  color: $popColor;
  font-size: 1.25em;
  line-height: 1.5em;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  
  @media (max-width: $breakSmall) {
    font-size: 1.2em;
  }
}
h2 {
  font-family: var(--fontSans);
  font-size: 2em;
  font-weight: var(--fontMedium);
  line-height: 1.6em;
  color: $primaryColorLight;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  margin-bottom: var(--spaceLarge);
  
  @media (max-width: $breakMedium) {
    font-size: 1.8em;
    color: $primaryColorLight;
  }
  @media (min-width: $breakLarge) and (min-height: $breakMedium) {
    font-size: 2.25em;
  }
}
h3 {
  font-family: var(--fontSans);
  font-size: 1.4em;
  font-weight: var(--fontMedium);
  line-height: 1.5em;
  color: $primaryColorLight;
  position: relative;
  margin-bottom: var(--spaceSmall);
  z-index: 2;
  text-align: center;
  
  @media (max-width: $breakMedium) {
    font-size: 1.6em;
  }
}
p, a {
  @include bodyText;
  
  @media (min-width: $breakLarge) and (min-height: $breakMedium) {
    font-size: 1.1em;
  }
}
a {
  text-decoration: none;
  color: inherit;
}
.button {
  position: relative;
  font-family: var(--fontSans);
  font-size: 1em;
  line-height: 1.5em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  margin: var(--spaceStandard) 0;
  padding: var(--spaceStandard) var(--spaceLarge);
  border: 0;
  border-radius: 2px;
  box-shadow: 1px 8px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  z-index: 2;
  
  @media (max-width: $breakMedium) {
    width: fit-content;
    margin: var(--spaceExtraLarge) auto;
  }
  @media (max-width: $breakSmall) {
    width: 100%;
  }
  
  &.button-primary {
    background: $actionColor;
    color: $primaryColorDark;
    border-radius: 4px;
    
    &:hover {
      background: darken($actionColor, 10%);
    }
  }
}

/* Decorative Text Background */
.highlight-bg {
  position: relative;
  z-index: 1;
  color: $primaryColorDark;
  text-shadow: none;
  
  @media (max-width: $breakMedium) {
      color: inherit;
  }
  
  &:after {
    content: '';
    background: $popColor;
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: -1;
    height: 36px;
    transform: rotate(1deg);
    
    @media (max-width: $breakMedium) {
      background: none;
    }
  }
}

/* Full-width Header */
.header {
  grid-column: 1/11;
  grid-row: 1/2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  @include boxPadding;
  position: relative;
  z-index: 3;
  
  @media (max-width: $breakMedium) {
    // Align start for open hamburger menu
    align-items: flex-start;
  }
}

/* Nav */
.menu-container {
  min-width: 0; //keep content from overflowing container
}
.menu-container .menu {
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  //background-color: $primaryColorDark;
  max-height: none;
  transition: max-height 0.5s ease-in-out;

  li {
    margin-right: var(--spaceLarge);

    &:last-of-type {
      margin-right: 0;
    }
    a {
      opacity: 0.6;
      transition: all 0.3s ease-in;
      
      &:hover {
        opacity: 1;
      }
    }
  }
}
// Hide hamburger icon
.menu-container .menu-icon,
.menu-container .menu-btn {
  display: none;
}

// Show hamburger menu at medium breakpoint
@media (max-width: $breakMedium) {
  // Style dropdown menu
  .menu-container {
    .menu {
      clear: both;
      max-height: 0;
      
      li {
        &:last-of-type {
          margin-right: var(--spaceLarge);
        }
        a {
          display: block;
          padding: var(--spaceLarge) 0;
          font-size: 1em;
        }
      }
    }
  }
// Position hamburger icon
.menu-container .menu-icon {
  cursor: pointer;
  display: inline-block;
  float: right;
  margin-bottom: var(--spaceSmall);
  padding: var(--spaceStandard);
  position: relative;
  user-select: none;
  
  // Render hamburger icon
  .navicon {
    background: $primaryColorLight;
    display: block;
    height: 2px;
    position: relative;
    transition: background .2s ease-out;
    width: var(--spaceLarge);
    
    // Render top and bottom lines
    &:before,
    &:after {
      background: $primaryColorLight;
      content: '';
      display: block;
      height: 100%;
      position: absolute;
      transition: all .2s ease-out;
      width: 100%;
    }
    &:before {
      top: 8px;
    }
    &:after {
      top: -8px;
    }
  }
}
// Hide checkbox
.menu-container .menu-btn {
  // Prevent <li> from showing in a row before menu has finished animating up
  &:not(:checked) {
    ~ .menu li {
      display: none;
    }
  }
  // On hamburger click, eveal menu
  &:checked ~ .menu {
    max-height: 20em;
    flex-direction: column;
  }
  // Animate icon and show as X
  &:checked ~ .menu-icon .navicon {
    background: transparent;
    
    &:before {
      transform: rotate(-45deg);
      top: 0;
    }
    &:after {
      transform: rotate(45deg);
      top: 0;
    }
  }
}
}

/* Value Prop Headline */
.value-prop {
  grid-column: 1/6;
  grid-row: 3/10;
  @include boxPadding;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  
  @media (max-width: $breakMedium) {
    grid-column: 1/11;
    grid-row: 2/6;
    @include centerContent;
    background: none;
    color: $primaryColorLight;
    text-align: center;
    z-index: 3;
  }
}

/* Hero Image */
.hero-image {
  grid-column: 1/11;
  grid-row: 1/11;
  background: url("https://static1.squarespace.com/static/5872ea841e5b6cc5fbb90bd8/58ab6395b8a79b717867c17f/58adc1ae6a4963f4308766dd/1538614325646/weightliftingnyc_photo_3.jpg?format=2500w") no-repeat;
  background-size: 130%;
  background-position: 50% center;
  
  &:before {
    content: "";
    background: $primaryColorDark;
    background-blend-mode: screen;
    opacity: 0.05;
    display: block;
    width: 100%;
    height: 100%;
  }
  @media (max-width: $breakMedium) {
    grid-column: 1/11;
    grid-row: 2/6;
    z-index: 2;
    background-position: right center;
    
    &:before {
      background: lighten($tertiaryColor, 10%);
      background-blend-mode: multiply;
      opacity: 0.2;
    }
  }
  @media (max-width: $breakSmall) {
    background-size: cover;
  }
  @media (min-width: $breakLarge) {
    background-position: center top;
  }
}

/* Social Icons */
.social-icons {
  grid-column: 10/11;
  grid-row: 3/6;
  position: relative;
  height: 100%;
  z-index: 3;
  
  @media (max-width: $breakMedium) {
    grid-column: 1/11;
    grid-row: 11/12;
    @include boxPadding;
  }
  
  .icons-container {
    background: $popColor;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: fit-content;
    float: left;
    padding: var(--spaceSmall) 0;
    height: 100%;
    
    @media (max-width: $breakMedium) {
      flex-direction: row;
      justify-content: center;
      float: none;
      width: 100%;
      height: 100%;
      background: none;
    }
  }
}
.social-icons .icons-container {
  .icon {
    width: 24px;
    height: 24px;
    margin: var(--spaceStandard);
    cursor: pointer;
    
    &.instagram {
      background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Instagram.png") no-repeat;
      background-size: contain;
      background-position: center center;
    }
    &.facebook {
      background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-facebook-logo.png") no-repeat;
      background-size: contain;
      background-position: center center;
    }
    &.youtube {
      width: 26px;
      background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Youtube.png") no-repeat;
      background-size: contain;
      background-position: center center;
    }
    
    @media (max-width: $breakMedium) {
      width: 38px;
      height: 38px;
      margin: var(--spaceLarge);
      
      &.instagram {
        background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Instagram-Tertiary.svg") no-repeat;
        background-size: cover;
      }
      &.facebook {
        background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Facebook-Tertiary.svg") no-repeat;
        background-size: cover;
      }
      &.youtube {
        width: 48px;
        background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Youtube-Tertiary.svg") no-repeat;
        background-size: contain;
        background-position: center center;
      }
    }
  }
}
/* Tall Illustration */
.brand-mark {
  grid-column: 8/10;
  grid-row: 6/9;
  // background: $primaryColorDark url("https://static1.squarespace.com/static/5872ea841e5b6cc5fbb90bd8/58ab6395b8a79b717867c17f/58adc18686e6c078136b66ae/1538614325630/weightliftingnyc_image_1-01.jpg?format=2500w") no-repeat;
  background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/WLNYC_nyc-strong.jpg") no-repeat;
  background-size: 200%;
  background-position: center center;
  position: relative;
  z-index: 2;
  
  @media (max-width: $breakMedium) {
    grid-column: 1/4;
    grid-row: 7/10;
    background-size: 200%;
    background-position: center center;
  }
}

/* Services Offered */
.services {
  display: none;
  
  @media (max-width: $breakMedium) {
      grid-column: 1/11;
      grid-row: 6/7;
      flex-direction: row;
      justify-content: space-around;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: space-around;
      background: $primaryColorMedium;
      position: relative;
      z-index: 4;
    
      .service-container {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex-grow: 1;
        width: 100%;
        min-width: 0;
        text-align: center;
        @include boxPadding;
        cursor: pointer;
        transition: all 0.3s ease-in;

        &:hover {
          background: $primaryColorDark;
        }
      }
  }
  .service {
    width: 38px;
    height: 32px;
    
    &.personal-training {
      background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Dumbbell%402x.png") no-repeat;
      background-size: contain;
      background-position: center center;
    }
    &.custom-program {
      background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-Rack%402x.png") no-repeat;
      background-size: contain;
      background-position: center center;
    }
    &.corporate-wellness {
      background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/437197/Icon-heart%402x.png") no-repeat;
      background-size: contain;
      background-position: center center;
    }
    @media (min-width: $breakLarge) {
      width: 48px;
      height: 42px;
    }
  }
  .stacked-icon-link {
    margin-top: var(--spaceStandard);
    line-height: 1.35em;
  }
}

/* Testimonial/Quote */
.testimonial {
  display: none;

  @media (max-width: $breakMedium) {
    grid-column: 4/11;
    grid-row: 7/10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    @include boxPadding;
    position: relative;
    background: $primaryColorDark;
    z-index: 3;
    
      .quote {
      font-size: 1.15em;
      line-height: 1.75em;
      font-style: italic;
      opacity: 0.6;
      margin-top: 0;

      &:before {
        content: '"';
        font-size: 2.5em;
        display: block;
      }
    }
    .quote-attribution {
      margin-top: var(--spaceSmall);
      font-size: 0.9em;
      opacity: 0.6;
    }
  }
  @media (max-width: $breakSmall) {
    grid-column-start: 1;
  }
}

/* CTA Button */
.cta-headline {
  display: none;
  
  @media (max-width: $breakMedium) {
    grid-column: 1/11;
    grid-row: 10/11;
    display: flex;
    flex-direction: column;
    @include boxPadding;
  }
}
.triangle-overlay {
  grid-column: 1/11;
  grid-row: 8/11;
  @include boxPadding;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  .triangle1 {
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%);
    background: lighten($tertiaryColor, 10%);
    background-blend-mode: multiply;
    opacity: 0.3;
    z-index: 1;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    
    @media (max-width: $breakMedium) {
      // Make triangles meet at center
      clip-path: polygon(0% 0%, 0% 100%, 100% 100%);
    }
  }
  .triangle2 {
    clip-path: polygon(100% 0%, 0% 100%, 100% 100%);
    background: $tertiaryColor;
    background-blend-mode: multiply;
    opacity: 0.4;
    z-index: 1;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
  @media (max-width: $breakMedium) {
    grid-column: 1/11;
    grid-row: 10/12;
    text-align: center;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console