#CodePenChallenge: Typeset This Post

FEATURED

In this example below you will see how to do a #CodePenChallenge: Typeset This Post with some HTML / CSS and Javascript

Fun challenge!

Thumbnail
This awesome code was written by Clara Beyer, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright Clara Beyer ©
  • HTML
  • CSS
  • JavaScript
    # A Tremendous Post Title

**_June 11th, 2018_ by Writerton McWriterpants**

## An Inspiring Subtitle

![cherry blossoms](https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/cherry-blossoms-unsplash.jpg)

Spring has sprung! In this tremendous blog article we're going to cover some points. This is where I'm telling you that what I'm going to tell you. Then I'm going to tell you those things. Then, because your special, and I'm to tell you what I told you. **Here comes a blockquote:**

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus mollis fringilla dolor, a sollicitudin turpis posuere elementum.

That quote was from the famous latin composer... nope, just kidding. Emmet generated it because that's a feature that it has. In the next section, we're really going to get into the meat of this blog post. 

### All the Good Stuff is in These Paragraphs

*Donec accumsan lacinia blandit*. Nunc ornare ante id sapien ullamcorper sollicitudin. Vestibulum vel odio sapien. Nam quis est maximus, cursus nibh at, dictum lorem. Donec vestibulum quam quis lorem egestas semper. Nullam et congue libero, a ultricies urna. Vivamus sed efficitur nisl. Fusce dapibus, lectus vel laoreet mattis, quam tellus fermentum diam, et luctus sem tortor in lorem. Nunc interdum ipsum ligula. Pellentesque sed diam erat.

Aliquam porta metus nec erat ullamcorper accumsan. Etiam egestas sit amet ante vitae lacinia. Donec ultricies eu nisl vel mattis. Suspendisse vestibulum sed velit lacinia imperdiet. Vivamus in nibh ullamcorper, laoreet arcu ut, gravida nulla. Curabitur in diam tempus, cursus mauris a, posuere tellus. Pellentesque purus orci, commodo non ex eu, porttitor sagittis erat. Vestibulum at orci nec turpis pharetra imperdiet quis ut urna. Donec eget accumsan tortor. In interdum mauris at velit gravida, in euismod lacus sodales. Curabitur pellentesque nunc nulla, id convallis enim eleifend vel.

Vivamus mollis fringilla dolor, a sollicitudin turpis posuere elementum. Quisque risus dolor, rhoncus sed imperdiet vel, tristique ac nisi. Sed dapibus aliquam nibh, at posuere dolor lobortis ac. Nam quis urna ac magna facilisis blandit. Maecenas vel arcu nec ipsum venenatis malesuada. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam semper ac sem at interdum. Ut massa est, egestas id sem at, commodo consequat velit.

### Some Key Takeaways

After reading this tremendous blog article, these are the salient points:

- A bullet point
- Another one
  1. Sub point one
  1. Sub point two
- Another one
- How about four?

In a pellentesque eros. Morbi elementum venenatis est quis cursus. Nunc vitae mi maximus, volutpat enim nec, ultricies libero. Donec pharetra dui arcu, vel sagittis dolor scelerisque nec!

/*Downloaded from https://www.codeseek.co/csb324/codepenchallenge-typeset-this-post-gKmQQj */
    @import url('https://fonts.googleapis.com/css?family=Crimson+Text|Roboto:300,400,700');

$pink: #F564A9;
$purple: #533B4D;
$lightpink: #FAA4BD;
$yellow: #FAE3C6;
$neutral: #C1ABA6;
$ratio: 1.61;

$h3: 1em * $ratio;
$h2: $h3 * $ratio;
$h1: $h2 * $ratio;
$body-font: "Roboto", sans-serif;
$display-font: "Crimson Text", sans-serif;

body {
  position: relative;
  padding-top: 10vh;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 10vh;

  line-height: $ratio;
  font-family: $body-font;
  
  border: 15px solid $lightpink;
  
  display: grid;
  grid-template-columns: 
    minmax(50px,1fr) 
    minmax(15em, 30em) 
    minmax(8em, 15em) 
    minmax(50px,1fr);
}

// header
h1 {
  color: $pink;
  font-family: $display-font;
  font-size: $h1;
  line-height: 1.2;
  margin-bottom: 0.5em;
  
  grid-column: 2;
}

// HEADER IMAGE
img {
  max-width: 100%;
}

h2 {
  line-height: 1;
  grid-column: 2;
  font-size: $h3;
  margin-bottom: 1.5em;
}
h2 + p {
  text-align: right;  
  grid-column: 3 / -1;
  grid-row: 3 / 6;
}

h2 + p + p {
  grid-row: 4;
  grid-column: 2;
  padding-right: 20px;
}

blockquote {
  grid-column: 2;
  padding: 15px 30px 15px;
  font-size: $h3;
  margin-bottom: 30px;
  margin-right: 30px;
  font-weight: 300;
}


// post meta
h1 + p {
  color: $neutral;
  font-weight: 300;
  grid-row: 1;
  grid-column: 1 / -1;
  font-size: 1em;
  line-height: 3;
  margin: 2em;
  letter-spacing: 0.1em;
}


// Body content
p, ul {
  color: $purple;
  margin-bottom: 1em;
  grid-column: 2 / 4;
  max-width: 50em;
}

h2, h3 {
  font-family: $display-font;
  color: $lightpink;
  
}

h3 {
  font-size: $h3;
  grid-column: 2 / 4;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

ul {
  list-style: disc;
  margin-left: 2em;
}
ol {
  list-style: decimal;
  margin-left: 2em;
}


@media screen and (max-width: 800px) {
  h2 + p {
    grid-column: 3 / -1;
    grid-row: 3 / 5;
  }
  blockquote {
    grid-column: 2 / -1;
    margin: 0;
  }
  h1 {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0 15px;
  }
}

@media screen and (max-width: 600px) {
  body {
    padding-left: 0;
    padding-right: 0;
    grid-template-columns:     
      minmax(10px,1fr) 
      minmax(10px, 3fr) 
      minmax(10px, 3fr) 
      minmax(10px,1fr);

  }
  blockquote {
    grid-column: 1 / -1;
    font-size: 1.3em;
  }
  h1 {
    font-size: $h2;
  }
  h2 {
    grid-column: 1 / -1; 
    text-align: center;
    grid-row: 3;
    z-index: 1;
    color: #ffffff;
    
    align-self: end;
    font-size: $h2;
    margin-bottom: 0;
    padding-bottom: 0.5em;
    background: linear-gradient(to bottom, rgba(125,185,232,0) 0%, rgba(darken($purple, 5), 0.7) 100%);
  }

  h2 + p {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-bottom: 0;
    img {
      margin-bottom: 0;
      line-height: 0;
      display: block;
    }
  }
  h2 + p + p {
    margin-top: 2em;
    grid-column: 2 / 4;
    grid-row: 4;
    padding-right: 0;
  }
  h1 + p { 
    line-height: 1.2;
  }
}


/*Downloaded from https://www.codeseek.co/csb324/codepenchallenge-typeset-this-post-gKmQQj */
    

Comments