Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!-- https://contributions.taminomartinius.de -->
<div class="loading" style="opacity: 0;">
  <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
    <circle class="loading__center" cx="100" cy="100" r="7" />
    <rect class="loading__rect" x="65" y="65" width="70" height="70" rx="6" />
    <path class="loading__line loading__line--1" d="M100 100c49-26.7 76.7-26.7 86 0 7.6 40-50 75-86 90s-85 16-84-90c.7-70.7 23.3-82.3 68-35l35 35"
          />
    <path class="loading__line loading__line--2" d="M100 100C88 20.7 73-.1 55 25c-27 44-18 178 45 143s83-134 41-148c-28-9.3-41.7 7-41 49.2V119"
          />
    <circle class="loading__dot loading__dot--1" cx="119" cy="100" r="7" />
    <circle class="loading__dot loading__dot--2" cx="100" cy="81" r="7" />
    <circle class="loading__dot loading__dot--3" cx="100" cy="119" r="7" />
    <mask id="loading__mask">
      <rect class="loading__rect loading__rect--masked" transform="rotate(45 100 100)" x="65" y="65" width="70" height="70" rx="6"
            />
    </mask>
    <path class="loading__line loading__line--masked loading__line--1" mask="url(#loading__mask)" d="M100 100c49-26.7 76.7-26.7 86 0 7.6 40-50 75-86 90s-85 16-84-90c.7-70.7 23.3-82.3 68-35l35 35"
          />
    <path class="loading__line loading__line--masked loading__line--2" mask="url(#loading__mask)" d="M100 100C88 20.7 73-.1 55 25c-27 44-18 178 45 143s83-134 41-148c-28-9.3-41.7 7-41 49.2V119"
          />
  </svg>
  <div class="loading__title">
    Loading Git Stats
  </div>
</div>


<!-- dribbble - twitter -->
<a class="dribbble" href="https://dribbble.com/TaminoMartinius" target="_blank">
  <img src="https://cdn.dribbble.com/assets/dribbble-ball-mark-2bd45f09c2fb58dbbfb44766d5d1d07c5a12972d602ef8b32204d28fa3dda554.svg" alt=""/>
</a>
<a class="twitter" target="_top" href="https://twitter.com/TaminoMartinius">
  <svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72">
    <path d="M67.812 16.141a26.246 26.246 0 0 1-7.519 2.06 13.134 13.134 0 0 0 5.756-7.244 26.127 26.127 0 0 1-8.313 3.176A13.075 13.075 0 0 0 48.182 10c-7.229 0-13.092 5.861-13.092 13.093 0 1.026.118 2.021.338 2.981-10.885-.548-20.528-5.757-26.987-13.679a13.048 13.048 0 0 0-1.771 6.581c0 4.542 2.312 8.551 5.824 10.898a13.048 13.048 0 0 1-5.93-1.638c-.002.055-.002.11-.002.162 0 6.345 4.513 11.638 10.504 12.84a13.177 13.177 0 0 1-3.449.457c-.846 0-1.667-.078-2.465-.231 1.667 5.2 6.499 8.986 12.23 9.09a26.276 26.276 0 0 1-16.26 5.606A26.21 26.21 0 0 1 4 55.976a37.036 37.036 0 0 0 20.067 5.882c24.083 0 37.251-19.949 37.251-37.249 0-.566-.014-1.134-.039-1.694a26.597 26.597 0 0 0 6.533-6.774z"/>
  </svg>    
</a>
              
            
!

CSS

              
                @use postcss-nested;

html {
  --color-git: #f05033;
  font-family: sans-serif;
  color: #9999aa;
  font-weight: 400;
  user-select: none;
  background-color: #ECEFFC;
}

.loading {
  top: 50%;
  left: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
  position: absolute;
  opacity: 1 !important;
  transition: opacity 0.2s;

  svg {
    filter: drop-shadow(2px 2px 3px #0004);
    transform: scale(.95);
    animation: loadingSvg 4s 2s ease infinite;
  }

  .loading__rect {
    fill: var(--color-git);
    transform: scale(0) rotate(45deg);
    animation: loadingRect .5s 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: 50% 50%;
  }

  .loading__line {
    fill: none;
    stroke: var(--color-git);
    stroke-width: 5px;
    stroke-dashoffset: 20;
  }

  .loading__line--masked {
    stroke: #ffffff;
  }

  .loading__dot {
    fill: #ffffff;
    transform: scale(0);
    animation: loadingDot .8s cubic-bezier(0.175, 0.885, 0.32, 1.8) forwards;
  }

  .loading__dot--1 {
    transform-origin: 58% 48%;
    animation-delay: 1.75s;
  }

  .loading__dot--2 {
    transform-origin: 50% 40%;
    animation-delay: 1.7s;
  }

  .loading__dot--3 {
    transform-origin: 50% 60%;
    animation-delay: 1.85s;
  }

  #loading__mask {
    fill: red;
  }

  .loading__rect--masked {
    fill: #ffffff;
  }

  .loading__center {
    fill: none;
    stroke: var(--color-git);
    transform: scale(0);
    transform-origin: 50% 50%;
    animation: loadingCenter 1s ease forwards;
  }

  .loading__line--1 {
    stroke-dasharray: 20 585;
    animation: loadingLine1 1.5s 0.7s ease forwards;
  }

  .loading__line--2 {
    stroke-dasharray: 20 630;
    animation: loadingLine2 1.7s 0.7s ease forwards;
  }

  .loading__title {
    opacity: 0;
    transform: scale(.95) translateY(-50%);
    animation: loadingTitle 4s 2s ease infinite;
  }
}

@keyframes loadingCenter {
  0%,
  100% {
    opacity: 1;
    transform: scale(0);
    stroke-width: 30px;
  }
  60% {
    opacity: 1;
    transform: scale(2);
    stroke-width: 3px;
  }
}

@keyframes loadingLine1 {
  0% {
    stroke-dasharray: 20 585;
  }
  100% {
    stroke-dasharray: 48.5 516.5;
    stroke-dashoffset: -516.5;
  }
}

@keyframes loadingLine2 {
  0% {
    stroke-dasharray: 20 630;
    stroke-dashoffset: 20;
  }
  100% {
    stroke-dasharray: 35 575;
    stroke-dashoffset: -575;
  }
}

@keyframes loadingRect {
  0% {
    transform: scale(0) rotate(45deg);
  }
  100% {
    transform: scale(1) rotate(45deg);
  }
}

@keyframes loadingDot {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes loadingTitle {
  0%,
  100% {
    transform: scale(.95) translateY(-50%);
    opacity: 0;
  }
  50% {
    opacity: 1;
    transform: scale(1.05) translateY(0);
  }
}

@keyframes loadingSvg {
  0%,
  100% {
    transform: scale(.95);
  }
  50% {
    transform: scale(1.05);
  }
}


/* dribbble - twitter */
.dribbble {
  position: fixed;
  display: block;
  right: 20px;
  bottom: 20px;
  img {
    display: block;
    height: 28px;
  }
}
.twitter {
  position: fixed;
  display: block;
  right: 64px;
  bottom: 14px;
  svg {
    width: 32px;
    height: 32px;
    path {    
      fill: #1da1f2;
      stroke: none;
    }
  }
}

              
            
!

JS

              
                const loadingElement = document.getElementsByClassName('loading')[0]

setTimeout(() => {
  loadingElement.classList.add('active');
}, 10)

window.addEventListener('click', () => {
  loadingElement.classList.remove('loading');
  setTimeout(() => {
    loadingElement.classList.add('loading');
  }, 10)
})
              
            
!
999px

Console