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>
  <nav>
    <span class="site-title">Bobby Showalter</span>
    <ul>
      <li><a href="#">Home</a></li>
      <li><a href="#">Archive</a></li>
      <li><a href="#">Portfolio</a></li>
      <li><a href="#">Uses</a></li>
    </ul>
  </nav>
</header>

<main>
  <div class="homepage-intro">
    <div class="homepage-intro__greeting">
      <h2>šŸ‘‹ Hi, I&rsquo;m Bobby.</h2>
      <p>Iā€™m a <a href="#">User Experience Engineer</a> from the scruffy little city of
        Knoxville, TN. At <a href="#">FPX</a>, I work with OEMs in the fluid
        dynamics industry to design and build powerful SCPQ software for engineers and distributors all
        around the world.</p>
      <p>I have work available at the following sources:</p>
      <ul>
        <li><a href="#">Freelancing Portfolio</a></li>
        <li><a href="#">Github</a></li>
        <li><a href="#">CodePen</a></li>
      </ul>
    </div>
    <div class="homepage-intro__picture">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/55867/profile-bob-2-square.jpg" alt="Bobby and his son, Owen">
    </div>
  </div>
  
  <div class="homepage-links">
    <a href="#" class="homepage-links__blog">
      <div>
        <h3>Latest Blog Post</h3>
        <p>Better Modifier Classes with CSS Custom Properties</p>
        <img src="https://source.unsplash.com/collection/9248817/800x800" alt="">
      </div>
    </a>
    <a href="#" class="homepage-links__portfolio">
      <div>
        <h3>Featured Portfolio Project</h3>
        <p>The Manor at Stowers Hill</p>
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/55867/tmash_cover.jpg" alt="">
      </div>
    </a>
  </div>
</main>

<footer>
  <p>&copy; 2017&ndash;2020 Bobby Showalter</p>
</footer>
              
            
!

CSS

              
                /* color palette: https://colorhunt.co/palette/168262 */

html {
  background-color: #edf7fa;
  box-sizing: border-box;
  color: #404a80;
  font-family: 'Archivo', sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html,
body {
  height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #5f6caf;
}

a {
  color: currentColor;
  transition: opacity 192ms ease-out;
}

a:hover {
  opacity: .8;
}

header {
  padding: 0 1rem;
  margin: 0 auto 2.5rem;
  max-width: 72em;
}

footer {
  margin: 2.5rem auto 0;
  max-width: 72em;
  padding: 0 1rem;
}

footer p {
  border-top: .063em solid #5f6caf;
  padding: 2.5rem 0;
  text-align: center;
}

header nav {
  border-bottom: .063em solid #5f6caf;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  padding-top: 2.5rem;
  width: 100%;
}

header nav .site-title {
  color: #5f6caf;
  display: inline-block;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.125em;
  margin-right: 1rem;
  margin-bottom: 1rem;
}

header nav ul {
  display: flex;
  list-style: none;
  line-height: 1;
  margin: 0 0 2.5rem;
  padding-left: 0;
}

header nav ul li + li {
  margin-left: 1rem;
}

main {
  margin: 0 auto;
  max-width: 72em;
  padding: 0 1rem;
}

@media screen and (min-width: 768px) {
  .homepage-intro {
    display: grid;
    grid-template-columns:
      [left-start]
        3fr
          [center-start right-start]
            1fr
          [center-end left-end]
        3fr
      [right-end];
    grid-template-rows:
      [upper-start]
      1.5em
      [center-start lower-start]
      1fr
      [center-end upper-end]
      1.5em
      [lower-end];
  }
}

.homepage-intro__picture {
  grid-column: left;
  grid-row: upper;
  position: relative;
}

@media screen and (min-width: 768px) {
  .homepage-intro__picture {
    transform: rotate(-2deg);
  }
}

.homepage-intro__picture img {
  border-radius: .25em;
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 25rem;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

@media screen and (min-width: 768px) {
  .homepage-intro__picture img {
    height: 100%;
    max-width: 100%;
  }
}

.homepage-intro__greeting {
  align-self: center;
  background-color: #5f6caff6;
  border-radius: .25em;
  color: #edf7fa;
  font-size: 1.25em;
  grid-column: right;
  grid-row: lower;
  margin-bottom: 2.5rem;
  padding: 1.5em;
  z-index: 2;
}

@media screen and (min-width: 768px) {
  .homepage-intro__greeting {
    margin-bottom: 0;
  }
}

.homepage-intro__greeting > *:first-child {
  margin-top: 0;
}

.homepage-intro__greeting > *:last-child {
  margin-bottom: 0;
}

.homepage-intro__greeting h2 {
  color: #edf7fa;
  font-family: 'Archivo Black', sans-serif;
  font-weight: normal;
}

.homepage-intro__greeting ul {
  padding-left: 0;
}

.homepage-links {
  margin: 2.5em 0;
}

@media screen and (min-width: 768px) {
  .homepage-links {
    display: flex;
  }
}

.homepage-links > a {
  color: #edf7fa;
  display: block;
  flex-basis: 50%;
  text-decoration: none;
}

.homepage-links > a:hover {
  opacity: 1;
}

.homepage-links > a > div {
  display: grid;
  align-content: stretch;
  grid-template-columns: 1fr;
  grid-template-rows:
    [header-start]
    max-content
    [header-end name-start]
    min-content
    [name-end bottom-start]
    1fr
    [bottom-end];
  height: 100%;
  overflow: hidden;
  text-shadow: 0 0 .375em #404a80;
}

.homepage-links > a > div::before {
  content: '';
  display: block;
  grid-column: 1;
  grid-row: 1 / -1;
  z-index: 2;
}

.homepage-links > a > div > img {
  display: block;
  grid-column: 1;
  grid-row: 1 / -1;
  height: 100%;
  max-height: 20em;
  object-fit: cover;
  transition: transform 192ms ease-out;
  width: 100%;
}

.homepage-links > a:hover > div > img {
  transform: scale(1.063);
}

.homepage-links > a > div > h3 {
  color: currentColor;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.25rem;
  font-weight: normal;
  grid-column: 1;
  grid-row: header;
  margin: 0;
  padding: 2.5rem 2.5rem 1em;
  z-index: 3;
}

.homepage-links > a > div > p {
  align-self: start;
  font-size: 2rem;
  grid-column: 1;
  grid-row: name;
  margin: 0;
  padding: 0 2.5rem 2.5rem;
  z-index: 3;
}

.homepage-links > a > div > *:first-child {
  margin: 0;
}

.homepage-links > a > div > *:last-child {
  margin-bottom: 0;
}

.homepage-links__blog > div {
  border-top-left-radius: .25em;
  border-top-right-radius: .25em;
  text-align: right;
}

.homepage-links__portfolio > div {
  border-bottom-left-radius: .25em;
  border-bottom-right-radius: .25em;
}

@media screen and (min-width: 768px) {
  .homepage-links__blog > div {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: .25em;
    border-bottom-left-radius: .25em;
  }

  .homepage-links__portfolio > div {
    border-top-right-radius: .25em;
    border-bottom-right-radius: .25em;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}

.homepage-links__blog > div::before {
  background-image:
    radial-gradient(
      ellipse at top right,
      #ffb677 25%,
      #5f6caf56
    );
}

.homepage-links__portfolio > div::before {
  background-image:
    radial-gradient(
      ellipse at top left,
      #ff8364 25%,
      #5f6caf56
    );
}

.homepage-links__portfolio > div > img {
  object-position: 25% 60%;
}
              
            
!

JS

              
                
              
            
!
999px

Console