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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<link href="https://fonts.googleapis.com/css?family=Amatic+SC|Yrsa&display=swap" rel="stylesheet">

<nav id="navbar">
  <a href="#welcome-section" class="nav-link">About me</a>
  <a href="#projects" class="nav-link">My portfolio</a>
  <a href="#contact-section" class="nav-link">Contact</a>
  <a href="https://www.freecodecamp.org/beiti" class="nav-link" id="profile-link" target="_blank">FCC Profile</a>
</nav>

<main id="main-page">
  <section id="welcome-section">

    <div id="welcome-left">
      <h1 id="title-h1">Hi there!</h1>
      <h2 id="slagline">Looking for some honey?</h2>
    </div>

    <div id="welcome-right">
      <img id="logo-image" src="http://sst-public1.s3.eu-central-1.amazonaws.com/codepen/sweet-code-logo.svg">
    </div>

  </section>

  <div class="divider">
    <img src="http://sst-public1.s3.eu-central-1.amazonaws.com/codepen/divider-01.svg" id="divider-image">
  </div>

  <section id="projects">
    <h2 id="heading-projects">Have a look at some of my projects</h2>
    <div class="project-tile">
      <a href="#" class="project-link">Project 1</a>
    </div>
    <div class="project-tile">
      <a href="#" class="project-link">Project 2</a>
    </div>
  </section>

  <div class="divider">
    <img src="http://sst-public1.s3.eu-central-1.amazonaws.com/codepen/divider-01.svg" id="divider-image">
  </div>

  <section id="contact-section">
    <h2 id="heading-contact">Drop me a line!</h2>
    <form id="contact-form">
      <input type="text" id="name-input" placeholder="Please enter your name" required>
      <input type="email" id="email-input" placeholder="Please enter your email" required>
      <textarea id="msg-input">Please leave a message after the bzzz.</textarea>
      <input type="submit" value="Send form" id="submit-input">
    </form>
  </section>

</main>

<!-- CHANGELOG
1.0.0 structural setup, functioning mini-sample, no content
1.0.1 color scheme adjustments, minor formatting, font changes
1.0.2 some more adjustments
1.0.3 better colours and images

To Do:
- Menu unfold/ open + fix to top of ViewPort
- Full colour scheme
- resizing / media queries not working properly yet
- content
- unclutter the chaos flex flow in welcome section
- flex flow in projects not the way i want it
- change the curly c in logo

https://css-tricks.com/responsive-menu-concepts/

-->
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;

  /* styling options */
  display: flex;
  flex-direction: row;
  background: #1865b4;
  align-items: flex-start;
}

/* Font options:

font-family: 'Amatic SC', cursive;
font-family: 'Yrsa', serif;

*/

/* =====================
    styling navigation
   ===================== */

#navbar {
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: #96c3ee;
}

.nav-link {
  display: block;
  padding: 20pt;
  margin: 0pt;
  border: 1px solid black;
  color: black;
  font-family: "Amatic SC", cursive;
  text-decoration: none;
  font-size: 28px;
}

a:hover {
  color: grey;
}

@media (max-width: 600px) {
  #navbar {
    position: flex;
    flex-direction: column;
  }
}

/* =====================
     end of navigation
   ===================== */

/* =====================
    styling main block
   ===================== */

#main-page {
  width: 100%;
}

#welcome-section {
  height: 100vh;
  /*overflow: auto;*/
  display: flex;
  flex-direction: row;
  flex-flow: space-around;
  gap: 10%;
}

#welcome-left {
  width: 40%;
  display: flex;
  flex-direction: column;
  padding: 5%;
}

h1 {
  font-family: "Amatic SC", cursive;
  font-size: 60px;
  color: #262017;
  padding: 0;
  margin: 0;
}

#title-h1 {
  align-self: flex-end;
}

h2 {
  font-family: "Amatic SC", cursive;
  font-size: 33px;
  color: #96c3ee;
  padding: 0;
  margin: 0;
}

#slagline {
  align-self: flex-end;
}

#welcome-right {
  width: 40%;
  padding: 5%;
}

#logo-image {
  width: 60%;
  /*max-width: 50%;*/
}

/* =====================
      end main block
   ===================== */

.divider {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  z-index: -20;
}

#divider-image {
  max-width: 400px;
  width: 40%;
}

/* =====================
      styling projects
   ===================== */

#projects {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-wrap: wrap;
}

#heading-projects {
  display: block;
}

.project-tile {
  border: 1px solid blue;
  padding: 50px;
  margin: 50px;
  width: 30%;
}

/* =====================
       end projects
   ===================== */

/* styling contact section */

#contact-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

#heading-contact {
}

#contact-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

input {
  width: 300px;
  padding: 10px;
  margin: 10px;
  border: 1px solid black;
}

textarea {
  width: 300px;
  margin: 10px;
  padding: 10px;
  border: 1px solid black;
}

#submit-input {
  width: 320px;
  margin: 10px;
  padding: 10px;
}

/* Alternative colours:

 background: #97caef    
 background: #55bcc9   */

@media (max-width: 1000px) {
  #projects,
  #welcome-section {
    flex-direction: column;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console