Pen Settings



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


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


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.


                <header class="site-header">
  <div class="site-title">
    A Serverless Blog
  <div class="site-subtitle">
    All the code that powers this blog is right here. 

<main class="site-wrap">

  <div id="articles-list">
    <div class="articles-container" />



                * {
  box-sizing: border-box;

.site-header {
  border-top: 1rem solid #556CF6;
  background: #26232d;
  padding: 2rem;
  position: relative;
.site-title {
  font-size: 2rem;
  letter-spacing: 3px;
.site-subtitle {
  font-style: italic;
  opacity: 0.5;
.sign-in-button {
  position: absolute;
  top: 1rem;
  right: 1rem;

.site-wrap {
  padding: 2rem;

.article-block {
  max-width: 650px;
  margin: 0 auto 2rem;
  background: #403E4F;
  padding: 2rem;
  box-shadow: 0.25rem 0.25rem 1.3rem rgba(0, 0, 0, 0.33);
time {
  display: block;
  padding: 0.25rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  background: linear-gradient(
    to right,
  font-size: 0.75rem;
.article-body {
  color: #9e9fa8;

.article-whole {
  max-width: 850px;
  margin: 0 auto;

body {
  margin: 0;
  background: #323041;
  color: white;
  font-family: 'PT Serif', serif;
  line-height: 1.4;
h1, h2, h3, h4, h5, h6,
.site-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  text-transform: uppercase;
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  letter-spacing: 0.1rem;
  line-height: 1;
h1 {
  font-size: 3.0rem;
  letter-spacing: 0.1rem;
a {
  color: #8b9bff;
  font-weight: bold;
  border-bottom: 1px solid;
  text-decoration: none;
  padding: 0.25rem 0.5rem;  
a svg {
  fill: currentcolor;
  vertical-align: bottom;
a:focus {
  background: rgba(0, 0, 0, 0.33);


                var blog_api_url = '';
var posts_list = document.getElementById('articles-list');
var posts_container = posts_list.querySelector('.articles-container');

var loadJsonFromFirebase = function(url, callback) {
    var xhr = new XMLHttpRequest();
    xhr.addEventListener("load", function () {
    });"GET", url);

loadJsonFromFirebase(blog_api_url, function(data) {
  let list = document.createElement('div');
  Object.keys(data).forEach(function(key) {
    let ts = new Date(data[key].created);
    list.innerHTML += `<article class="article-block">
      <div class="excerpt">
        <p>${data[key].content.substr(0, 150)}...</p>
      <a href="#${key}" data-post="${key}">Read Post</a>
  posts_container.insertBefore(list, posts_container.firstChild);