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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <!-- #navbar starts here -->
<nav>
  <ul id="navbar" class="nav">
    <li class="logo">#PLACEHOLDER</li>
    <li class="responsive"><a href="#home">About</a></li>
    <li class="responsive"><a href="#projects">Projects</a></li>
    <li class="responsive"><a href="#contacts">Contacts</a></li>
  </ul>
  <!-- dummy that pushes the rest of the page by the navbar height-->
</nav>
<!-- main content -->
<main>
  <!-- #welcome section here -->
  <section id="welcome-section" class="welcome-section">
    <h1>I am a Designer</h1>
    <p>It’s about making placeholder text great again. That’s what people want, they want placeholder text to be great again.</p>
    <a href="#projects" class="button">Get to know me</a>
  </section>
  <!-- #projects section starts here -->
  <section id="projects" class="projects-section">
    <h2 class="projects-header">Take a look at these:</h2>
    <!-- div that wraps the #projects cards-->
    <div class="projects-container">
      <!--project thumbnails here -->
      <div class="project-tile">
        <a href="https://codepen.io/dcosta89/pen/ZEGjMwV" alt="Tribute Page" target="_blank">
          <div class="project_thumb_1"></div>
          <p class="project-description">Tribute Page</p>
        </a>
      </div>

      <div class="project-tile">
        <a href="https://codepen.io/dcosta89/details/OJyJbBx" alt="Techincal Documentation" target="_blank">
          <div class="project_thumb_2"></div>
          <p class="project-description">Technical Documentation</p>
        </a>
      </div>

      <div class="project-tile">
        <a href="#" target="_blank"><img src="https://via.placeholder.com/300.png/99f/fff" alt=""></a>
        <p class="project-description">Placeholder #3</p>
      </div>

      <div class="project-tile">
        <a href="#" target="_blank"><img src="https://via.placeholder.com/300.png/99f/fff" alt=""></a>
        <p class="project-description">Placeholder #4</p>
      </div>

      <div class="project-tile">
        <a href="#" target="_blank"><img src="https://via.placeholder.com/300.png/99f/fff" alt=""></a>
        <p class="project-description">Placeholder #5</p>
      </div>

      <div class="project-tile">
        <a href="#" target="_blank"><img src="https://via.placeholder.com/300.png/99f/fff" alt=""></a>
        <p class="project-description">Placeholder #6</p>
      </div>
    </div>
    <!--link to my FCC profile -->
    <a id="profile-link" class="fcclink" target="_blank" href="https://www.freecodecamp.org/dcosta89">I want to see more!</a>
  </section>

  <section id="contacts" class="contacts">
    <p>Get in Touch:</p>
    <div class="arrow-dew"></div>
    <a href="#" target="_blank">@mail</a>
    <a href="#" target="_blank">@facebook</a>
    <a href="https://www.freecodecamp.org/dcosta89" target="_blank">@freeCodeCamp</a>
  </section>

</main>
<!-- end of main section, beginning of footer -->
<footer class="note">
  @2020 Diogo Costa for freeCodeCamp.org
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Roboto&family=Roboto+Slab:wght@600&display=swap");

/* fonts: roboto slab and roboto */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100vh;
  font-family: "Roboto", sans-serif;
  /* Set font size for easy rem calculations
   * default document font size = 16px, 1rem = 16px, 100% = 16px
   * (100% / 16px) * 10 = 62.5%, 1rem = 10px, 62.5% = 10px - Thanks for this Mimic, really helps!
  */
  font-size: 62.5%;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
}

.nav {
  display: flex;
  height: 8rem;
  width: 100vw;
  font-size: 1.8rem;
  background-color: #29ba92;
  justify-content: flex-end;
  list-style: none;
  align-items: center;
  top: 0;
  left: 0;
  position: fixed;
  border-bottom: dotted rgb(41, 110, 110) 2px;
  z-index: 2;
}

.nav .logo {
  flex-grow: 2;
  text-transform: uppercase;
  letter-spacing: 0.33em;
  display: block;
  font-family: "Open Sans", sans-serif;
  text-decoration: none;
  padding: 3rem;
  color: #3b3b3b;
}

.nav .logo {
  cursor: pointer;
}

.nav a {
  display: block;
  font-size: 1.8rem;
  text-transform: uppercase;
  padding: 3rem;
  color: #3b3b3b;
}

.nav a:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

main {
  position: relative;
  margin-top: 8rem;
  width: 100vw;
}

.welcome-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

/* sets transparency effect */
.welcome-section::after {
  content: "";
  background: url("https://images.unsplash.com/photo-1484807352052-23338990c6c6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80")
    center fixed; /* img by Sergey Zolkin @UnSplash */
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;
}

.welcome-section h1 {
  color: HoneyDew;
  font-family: "Roboto Slab", sans-serif;
  line-height: 1.33;
  font-size: 7.2rem;
  text-align: center;
  background-color: DarkSlateBlue;
  padding: 1rem;
}

.welcome-section p {
  color: white;
  font-size: 2.4rem;
  text-align: center;
  margin-top: 2em;
  padding: 1em;
}

.welcome-section .button {
  color: white;
  display: block;
  width: 36rem;
  text-align: center;
  font-size: 3.8rem;
  text-transform: uppercase;
  border: white 3px solid;
  padding: 1rem;
  margin: 3.6rem auto;
  background-color: #3cb371;
  transition: 0.5s ease-out;
}

.welcome-section .button:hover {
  background-color: DarkSlateBlue;
  transition: 0.5s ease-in;
}

.projects-section {
  display: flex;
  background-color: DarkSlateBlue;
  flex-direction: column;
  align-items: center;
}

.projects-header {
  margin: 8rem auto;
  color: HoneyDew;
  font-weight: 900;
  line-height: 1.33;
  letter-spacing: 0.6rem;
  font-size: 3.8rem;
  font-family: "Roboto Slab", sans-serif;
  text-align: center;
}

.projects-container {
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 112rem;
}

.project-tile {
  width: 320px;
  margin: 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #5a5096;
}

.project-tile .project_thumb_1 {
  width: 300px;
  height: 300px;
  background: url("https://codepen.io/dcosta89/pen/ZEGjMwV/image/small.png")
    center;
  background-repeat: no-repeat;
  background-size: auto 300px;
}

.project-tile .project_thumb_2 {
  width: 300px;
  height: 300px;
  background: url("https://codepen.io/dcosta89/pen/OJyJbBx/image/small.png")
    center;
  background-repeat: no-repeat;
  background-size: auto 300px;
}

.project-tile img {
  width: 100%;
  height: auto;
}

.project-description {
  color: white;
  font-weight: bold;
  font-size: 2.4rem;
  text-align: center;
  margin: 2rem auto 1rem;
}

.fcclink {
  margin: 8rem 0;
  font-size: 3.2rem;
  letter-spacing: 0.2rem;
  padding: 1em;
  color: HoneyDew;
  text-decoration: underline;
  border: solid HoneyDew 3px;
}

.contacts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: Indigo;
  color: HoneyDew;
}

.contacts p {
  margin-top: 8rem;
  text-align: center;
  font-size: 4.8rem;
  letter-spacing: 0.3rem;
  font-family: "Roboto Slab", sans-serif;
}

.arrow-dew {
  width: 6rem;
  height: 6rem;
  transform: rotate(45deg);
  border-bottom: solid HoneyDew 3px;
  border-right: solid HoneyDew 3px;
}

.contacts a {
  color: HoneyDew;
  text-decoration: none;
  margin: 2rem 0;
  font-size: 3.8rem;
  letter-spacing: 0.3rem;
  font-family: "Roboto Slab", sans-serif;
}

/* centers contacts block by setting the bottom margin the same as the top margin for the first element of "contacts" */
.contacts a:last-child {
  margin-bottom: 8rem;
}

.note {
  display: flex;
  justify-content: center;
  height: 6rem;
  letter-spacing: 0.3rem;
  align-items: center;
  color: HoneyDew;
  background-color: #262626;
  padding: 1.6rem;
  font-size: 1.2rem;
}

@media screen and (max-width: 600px) {
  .nav {
    flex-flow: column;
    padding: 0;
    height: auto;
  }

  .nav li {
    width: 100vw;
    text-align: center;
    padding: 0;
  }

  .nav .responsive {
    display: none;
  }

  .nav li:first-child {
    display: block;
  }

  .nav li:last-of-type li {
    padding-bottom: none;
  }

  .about {
    max-width: 88vw;
  }

  .arrow {
    width: 30px;
    height: 30px;
  }

  .arrow-dew {
    width: 30px;
    height: 30px;
  }

  .projects-container {
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (max-height: 560px) {
  .nav {
    font-size: 1.2rem;
    padding: 0;
    height: 40px;
  }

  main {
    margin-top: 40px;
  }
}

              
            
!

JS

              
                $(document).ready(function () {
  $(".logo").click(function () {
    $(".responsive").toggle();
  });
});

              
            
!
999px

Console