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 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

              
                <div class="wrapper">
<div class="t">
  <div class="name">
    <img src="https://avatars2.githubusercontent.com/u/34525547" class="avatar" id="avatar" />
    <div class="info">
      <span id="name">Caleb Denio</span>
      <span id="handle">@cjdenio</span>
    </div>
  </div>
  <div class="side">
    <span>#123456</span>
  </div>
<div class="conf">
    <span>CalebConf</span>
    <b>2020</b>
  </div>
  <div class="tagline"><span>Hear<br />people<br /><em>talk</em></span></div>
</div>
  <div id="form">
    <div class="field">
  <label class="label" style="color: #DDD;">GitHub username</label>
  <div class="control">
    <input class="input" type="text" value="cjdenio" id="username-input" />
  </div>
</div>
  </div>
</div>
              
            
!

CSS

              
                html, body {
  margin: 0;
  background-color: black;
  font-family: "Montserrat", sans-serif;
}
.wrapper {
  display: flex;
  flex-direction: column;
}
#form {
  margin: 50px;
}
.t {
  color: white;
  margin: 50px;
  width: 550px;
  height: 250px;
  background-color: #202020;
  position: relative;
  padding: 0 33px;
  box-sizing: border-box;
  border: 3px solid #00afff;
  border-radius: 5px;
  
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr 60px;
  
  transition: transform 300ms;
}

.t:hover {
  transform: scale(1.07) rotate(3deg);
}

.t::after {
  content: '';
  position: absolute;
  left: calc(100% - 27px);
  top: calc(50% - 36px);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  border: 3px solid #00afff;
  background-color: black;
  
  clip-path: inset(0 50% 0 0);
}
.t::before {
  content: '';
  position: absolute;
  left: calc(0px - 33px);
  top: calc(50% - 36px);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  border: 3px solid #00afff;
  background-color: black;
  
  clip-path: inset(0 0 0 50%);
}

.conf {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  font-size: 30px;
  padding-left: 20px;
  position: relative;
  
  grid-column: 1 / 1;
}
.conf::after {
  content: "";
  display: block;
  position: absolute;
  height: 50px;
  width: 3px;
  background-color: #777777;
  border-radius: 999px;
  left: 100%;
}

.name {
  display: flex;
  align-items: center;
  grid-column: 1 / 3;
}

.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
}

.side {
  grid-area: 1 / 3 / 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 2px dashed #777777;
}
.side span {
  writing-mode: vertical-rl;
  font-size: 30px;
  letter-spacing: 5px;
  font-weight: bold;
  color: white;
}

.info {
  margin-left: 15px;
  display: flex;
  flex-direction: column;
}
.info > span:first-child {
  font-weight: bold;
  font-size: 20px;
}

.tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  font-size: 20px;
  padding-right: 15px;
  box-sizing: border-box;
  text-align: right;
  letter-spacing: 3px;
  font-weight: 900;
}
              
            
!

JS

              
                document.getElementById("username-input").addEventListener("change", (e) => {
  axios(`https://api.github.com/users/${e.target.value}`).then((resp) => {
    const user = resp.data
    document.getElementById("name").innerText = user.name
    document.getElementById("avatar").src = resp.data.avatar_url
    document.getElementById("handle").innerText = "@" + resp.data.login
  }).catch(() => {
    alert("user not found :(")
  })
})
              
            
!
999px

Console