HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<!-- start new event -->
<div class="event default">
<div class="container">
<div class="inner">
<div class="bg"></div>
<canvas class="particles"></canvas>
<div id="particleAnimation">
<div id="particleBackground"></div>
</div>
<div class="left">
<div class="bgLeft"></div>
<div class="bg"></div>
<div class="svgHolder">
<svg version="1.1" class="shadowSvg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 25 1350" style="enable-background:new 0 0 25 1350;" xml:space="preserve">
<path d="M21.9,1012.7c-16.4-33.1,6.2-45.2-3.9-67.6C8,926,22.7,900.8,12.3,881.6c-10.4-20.8,7.9-35.5-0.1-67.4c0-0.1-0.3-1-0.4-1.4
c-5.2-24.8,11.9-45.7,5.9-70.3c-6.9-22.8,10.7-45.3,3.3-67.6c-6.9-20.6,7.3-42.7,0.9-63.5c-12.1-21.7,4-49.8-5.3-72.3
c-12.5-24,4.9-42.7-0.7-65.5c-6-22.7,10.7-44.1,4.8-67.1c-6.2-22.6,10.2-47,1.1-68.8c-16.4-33.1,6.2-45.2-3.9-67.6
C8,251,22.7,225.8,12.3,206.6c-10.4-20.8,7.9-35.5-0.1-67.4c0-0.1-0.3-1-0.4-1.4c-5.2-24.8,11.9-45.7,5.9-70.3
C10.8,44.8,28.5,22.3,21,0H0v675v675h21c-6.9-20.6,7.3-42.7,0.9-63.5c-12.1-21.7,4-49.8-5.3-72.3c-12.5-24,4.9-42.7-0.7-65.5
c-6-22.7,10.7-44.1,4.8-67.1C14.6,1059,31,1034.5,21.9,1012.7z"/>
</svg>
<svg version="1.1" class="waveSvg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 25 1350" style="enable-background:new 0 0 25 1350;" xml:space="preserve">
<path d="M21.9,1012.7c-16.4-33.1,6.2-45.2-3.9-67.6C8,926,22.7,900.8,12.3,881.6c-10.4-20.8,7.9-35.5-0.1-67.4c0-0.1-0.3-1-0.4-1.4
c-5.2-24.8,11.9-45.7,5.9-70.3c-6.9-22.8,10.7-45.3,3.3-67.6c-6.9-20.6,7.3-42.7,0.9-63.5c-12.1-21.7,4-49.8-5.3-72.3
c-12.5-24,4.9-42.7-0.7-65.5c-6-22.7,10.7-44.1,4.8-67.1c-6.2-22.6,10.2-47,1.1-68.8c-16.4-33.1,6.2-45.2-3.9-67.6
C8,251,22.7,225.8,12.3,206.6c-10.4-20.8,7.9-35.5-0.1-67.4c0-0.1-0.3-1-0.4-1.4c-5.2-24.8,11.9-45.7,5.9-70.3
C10.8,44.8,28.5,22.3,21,0H0v675v675h21c-6.9-20.6,7.3-42.7,0.9-63.5c-12.1-21.7,4-49.8-5.3-72.3c-12.5-24,4.9-42.7-0.7-65.5
c-6-22.7,10.7-44.1,4.8-67.1C14.6,1059,31,1034.5,21.9,1012.7z"/>
</svg>
</div>
<div class="nameHolder">
<div class="name hiddenName">NerdOrDie</div>
</div>
</div>
<div class="visibleName nameHolder">
<div class="name">NerdOrDie</div>
</div>
<div class="right">
<div class="tagHolder">
<div class="tag">Sub</div>
</div>
</div>
</div>
</div>
<div class="extra">
<svg class="iconSvg" viewBox="0 0 80 80">
<g id="Heart">
<path d="M131.03,20.21c7.25,0.04,13.11,5.9,13.15,13.15c0,13.28-24.17,26.43-24.17,26.43S95.83,46.45,95.83,33.36
c0-7.26,5.89-13.15,13.15-13.15l0,0c4.45-0.03,8.6,2.2,11.02,5.93C122.44,22.43,126.59,20.2,131.03,20.21z"/>
</g>
<g id="Twitch">
<path d="M141.58,17.43c0,0.13-0.01,0.26-0.01,0.4c0,8.89,0,17.79,0.01,26.68c0,0.28-0.09,0.48-0.28,0.67
c-3.76,3.75-7.51,7.5-11.25,11.25c-0.17,0.17-0.33,0.24-0.57,0.24c-2.72-0.01-5.44,0-8.16-0.01c-0.24,0-0.41,0.07-0.59,0.24
c-1.8,1.81-3.6,3.61-5.4,5.42c-0.17,0.17-0.35,0.24-0.59,0.24c-1.72-0.01-3.44,0-5.16,0c-0.37,0-0.37,0-0.37-0.38
c0-1.72,0-3.44,0-5.16c0-0.36,0-0.36-0.36-0.36c-3.32,0-6.65,0-9.97,0c-0.08,0-0.17,0-0.25,0c-0.15,0.01-0.22-0.06-0.21-0.21
c0-0.08,0-0.15,0-0.23c0-10.19,0-20.38,0-30.57c0-0.21,0.04-0.43,0.11-0.63c0.94-2.53,1.89-5.07,2.84-7.6
C114.78,17.43,128.18,17.43,141.58,17.43z M114.12,55.61c0.02,0.01,0.04,0.02,0.06,0.02c0.07-0.07,0.14-0.13,0.21-0.2
c1.79-1.79,3.59-3.59,5.38-5.39c0.17-0.17,0.33-0.23,0.57-0.23c3.38,0.01,6.76,0,10.14,0.01c0.22,0,0.38-0.06,0.53-0.22
c2.13-2.14,4.26-4.27,6.4-6.4c0.17-0.17,0.25-0.34,0.25-0.58c-0.01-6.95-0.01-13.9-0.01-20.85c0-0.41,0-0.41-0.41-0.41
c-6.11,0-12.21,0-18.32,0c-4.44,0-8.88,0-13.32,0c-0.32,0-0.32,0-0.33,0.33c0,0.02,0,0.04,0,0.06c0,9.22,0,18.44,0,27.67
c0,0.07,0,0.14,0,0.21c0,0.14,0.07,0.2,0.21,0.2c0.08,0,0.17,0,0.25,0c2.68,0,5.35,0,8.03,0c0.33,0,0.34,0.01,0.34,0.34
c0,1.71,0,3.43,0,5.14C114.11,55.4,114.12,55.51,114.12,55.61z M119.99,29.53c0-0.3-0.01-0.3-0.31-0.3c-1.1,0-2.2,0-3.3,0
c-0.28,0-0.3,0.01-0.3,0.29c0,3.72,0,7.44,0,11.17c0,0.28,0.02,0.29,0.3,0.29c1.09,0,2.19,0,3.28,0c0.33,0,0.33,0,0.33-0.33
c0-1.85,0-3.69,0-5.54C119.99,33.25,119.99,31.39,119.99,29.53z M126.87,40.69c0,0.27,0.02,0.29,0.28,0.29c1.12,0,2.23,0,3.35,0
c0.26,0,0.28-0.02,0.28-0.29c0-3.72,0-7.44,0-11.16c0-0.28-0.01-0.3-0.3-0.3c-1.09,0-2.19,0-3.28,0c-0.33,0-0.33,0-0.33,0.34
c0,1.84,0,3.68,0,5.52C126.87,36.95,126.87,38.82,126.87,40.69z"/>
</g>
<g id="Power">
<path d="M123.31,14.78C106.7,12.67,92.67,26.7,94.78,43.31c1.44,11.32,10.58,20.46,21.9,21.9c16.61,2.11,30.64-11.92,28.53-28.53
C143.78,25.36,134.64,16.22,123.31,14.78z M116.45,58.32c-7.55-1.4-13.56-7.54-14.83-15.11c-1.73-10.32,5.08-19.45,14.5-21.45
v11.84c0,2.14,1.73,3.87,3.87,3.87h0c2.14,0,3.87-1.73,3.87-3.87V21.76c8.43,1.79,14.77,9.28,14.77,18.24
C138.65,51.44,128.29,60.51,116.45,58.32z"/>
</g>
<g id="Rules">
<path d="M140.03,23.73L140.03,23.73c-1.49-1.53-3.95-1.57-5.48-0.08l-25.07,24.39l-3.9-4.19c-1.49-1.6-4.01-1.65-5.56-0.12l0,0
c-1.49,1.47-1.54,3.86-0.11,5.39l6.54,7.03c1.53,1.65,4.12,1.71,5.74,0.14l27.78-27.09C141.49,27.72,141.52,25.27,140.03,23.73z"/>
</g>
<g id="About">
<path d="M97.91,23.77v28.16c0,1.18,0.96,2.14,2.14,2.14h3.46c1.18,0,2.14,0.96,2.14,2.14v0c0,1.74,1.97,2.76,3.39,1.75l4.93-3.5
c0.36-0.26,0.8-0.4,1.24-0.4h24.72c1.18,0,2.14-0.96,2.14-2.14V23.77c0-1.18-0.96-2.14-2.14-2.14h-39.88
C98.87,21.63,97.91,22.59,97.91,23.77z M105.66,44.19V31.52c0-1.18,0.96-2.14,2.14-2.14h24.38c1.18,0,2.14,0.96,2.14,2.14v12.66
c0,1.18-0.96,2.14-2.14,2.14h-24.38C106.62,46.33,105.66,45.37,105.66,44.19z"/>
</g>
<g id="Cheer">
<polygon points="119.77,11.01 98.59,47.97 119.55,68.99 141.41,47.75 "/>
</g>
<g id="Tip">
<path d="M123.33,13.33h-6.42l-0.12,6.18c0,0-11.12,1.13-11.12,11.36c0,13.26,18.85,10.53,18.85,17.84c0,1.13-0.18,4.22-6.24,4.22
c-7.02,0-10.82-2.91-10.82-2.91s-2.08,7.85-2.14,7.79c5.83,2.56,11.24,2.68,11.24,2.68v6.18h6.3v-6.66c0,0,11.83-1.31,11.83-12.25
c0-13.92-18.91-11.24-18.91-17.84c0-0.42,0-3.75,5.77-3.75c5.77,0,9.04,2.38,9.04,2.38l2.2-7.25c-3.39-2.44-9.46-2.26-9.46-2.26
V13.33z"/>
</g>
<g id="Follower">
<path d="M142.89,65.56c0.05,0-45.78,0.11-45.78-0.05c0-15.45,13.33-22.97,22.97-22.97C131.47,42.54,142.89,51.86,142.89,65.56z
M120.19,14.41c-6.32,0-12.8,4.67-12.8,12.8c0,8.85,7.22,12.59,12.85,12.59c5.63,0,12.43-4.51,12.43-13.12
C132.67,19.98,126.51,14.41,120.19,14.41z"/>
</g>
<g id="Host">
<path d="M153.86,38.59c-0.12-0.18-3.11-4.56-8.71-8.94c-7.45-5.82-16.05-8.9-24.88-8.9c-0.06,0-0.12,0-0.18,0
c-0.03,0-0.06,0-0.09,0c-0.09,0-0.18,0.01-0.28,0.01c-11.72,0.15-20.19,4.98-25.24,9.05c-5.57,4.48-8.3,8.98-8.41,9.17
c-0.47,0.79-0.48,1.77-0.01,2.57c0.11,0.18,2.72,4.57,8.25,8.93c5.08,4,13.71,8.77,26.03,8.77c8.97,0,17.61-3.08,24.98-8.91
c5.55-4.39,8.44-8.78,8.56-8.97C154.43,40.52,154.42,39.43,153.86,38.59z M142.06,46.5c-6.53,5.12-13.84,7.72-21.72,7.72
c-8.65,0-16.3-2.54-22.75-7.56c-3.15-2.45-5.23-4.93-6.31-6.38c1.96-2.63,7.18-8.65,15.84-12.05c-1.24,2.17-1.96,4.67-1.96,7.35
c0,8.19,6.64,14.83,14.83,14.83s14.83-6.64,14.83-14.83c0-2.65-0.71-5.14-1.93-7.29c3.12,1.27,6.13,2.99,9.01,5.23
c3.21,2.49,5.48,5.01,6.71,6.51C147.43,41.52,145.21,44.03,142.06,46.5z"/>
</g>
<g id="Merch">
<path d="M102.77,61.88c0,0-0.36,2.02,1.78,2.02c2.14,0,28.5-0.06,29.15-0.06s1.72-0.36,1.72-2.14s0-25.94,0-25.94
s2.26,1.42,2.14,1.48c0.8-0.4,8.07-7.84,8.55-8.43c0.47-0.59,0.53-0.36,0.53-1.31c0-0.95-0.71-1.37-0.71-1.37l-9.91-10.03
c0,0-7.84,0.06-8.37,0.06s-1.6,0.71-1.6,2.55c0,1.84-2.2,3.8-4.21,3.8c-2.02,0-2.73,0-3.92,0s-4.1-1.9-4.1-4.16s-1.6-2.2-1.6-2.2
h-8.37L93.51,26.38c0,0-0.59,1.54,0.53,2.79s6,8.01,6,8.01l2.79-1.48"/>
</g>
<g id="Raid">
<path d="M97.73,66.54c0-0.69-0.02-1.34,0.01-1.99c0.02-0.5,0.09-1,0.16-1.5c0.06-0.41,0.15-0.82,0.22-1.23c0.06-0.32,0.11-0.64,0.19-0.96c0.08-0.36,0.17-0.71,0.27-1.07c0.09-0.31,0.19-0.62,0.31-0.92c0.22-0.6,0.41-1.23,0.69-1.8c0.4-0.84,0.84-1.67,1.32-2.46c1.01-1.68,2.31-3.14,3.77-4.44c1.29-1.15,2.71-2.14,4.25-2.93c0.81-0.42,1.65-0.8,2.49-1.17c0.64-0.28,1.31-0.51,1.97-0.73c0.42-0.14,0.86-0.24,1.29-0.35c0.41-0.11,0.81-0.22,1.22-0.31c0.36-0.08,0.73-0.13,1.09-0.19c0.56-0.08,1.11-0.17,1.67-0.23c0.45-0.04,0.9-0.04,1.35-0.04c0.58,0,1.17-0.01,1.75,0.03c0.52,0.04,1.04,0.14,1.56,0.22 c0.36,0.06,0.73,0.11,1.09,0.19c0.28,0.06,0.56,0.14,0.85,0.22c0.33,0.09,0.66,0.17,0.98,0.27c0.45,0.14,0.9,0.28,1.34,0.44 c0.58,0.22,1.15,0.45,1.71,0.72c0.81,0.39,1.62,0.81,2.4,1.25c0.93,0.53,1.8,1.15,2.64,1.82c0.93,0.74,1.8,1.55,2.59,2.43 c1.26,1.4,2.33,2.94,3.13,4.65c0.31,0.67,0.62,1.34,0.88,2.03c0.18,0.47,0.31,0.96,0.44,1.45c0.14,0.5,0.28,0.99,0.39,1.5 c0.08,0.38,0.13,0.77,0.19,1.15c0.08,0.58,0.18,1.17,0.22,1.75c0.04,0.62,0.03,1.25,0.04,1.87c0,0.15-0.12,0.12-0.21,0.12c-0.99,0-1.98,0-2.97,0.01c-3.23,0.01-6.46,0.01-9.68,0.02c-5.43,0.02-10.86,0.05-16.29,0.08c-5.01,0.03-10.03,0.05-15.04,0.08C97.92,66.54,97.82,66.54,97.73,66.54z M119,13.57c-0.42,0.05-0.85,0.09-1.26,0.19c-0.53,0.13-1.06,0.29-1.57,0.47c-0.58,0.21-1.16,0.43-1.71,0.71c-0.95,0.48-1.83,1.06-2.65,1.75c-1.08,0.91-1.98,1.96-2.69,3.18c-0.67,1.15-1.1,2.39-1.33,3.69c-0.1,0.59-0.16,1.2-.16,1.81c0,0.65,0.07,1.31,0.14,1.95c0.05,0.45,0.13,0.91,0.25,1.34c0.16,0.6,0.36,1.19,0.58,1.76 c0.44,1.15,1.09,2.18,1.91,3.09c0.51,0.56,1.07,1.08,1.63,1.59c0.63,0.57,1.35,1.03,2.11,1.41c0.58,0.29,1.18,0.57,1.78,0.81 c0.45,0.18,0.93,0.31,1.4,0.42c0.38,0.09,0.78,0.13,1.17,0.19c0.56,0.09,1.12,0.15,1.68,0.08c0.6-0.07,1.21-0.15,1.81-0.26c0.54-0.1,1.07-0.24,1.59-0.41c0.65-0.22,1.3-0.47,1.93-0.74c1.54-0.68,2.88-1.64,4-2.91c0.91-1.03,1.57-2.2,2.01-3.49c0.22-0.65,0.38-1.33,0.5-2.01c0.11-0.59,0.16-1.2,0.16-1.81c0-0.78-0.06-1.56-0.14-2.33c-0.06-0.59-0.18-1.17-0.33-1.74
c-0.14-0.55-0.31-1.09-0.53-1.61c-0.39-0.94-0.92-1.81-1.57-2.61c-0.92-1.13-2.03-2.04-3.29-2.77c-1.41-0.81-2.93-1.36-4.53-1.67
c-0.6-0.11-1.21-0.15-1.76-0.21C119.71,13.5,119.36,13.52,119,13.57z M141.57,22.45c-0.56,0.06-1.08,0.23-1.61,0.42c-0.9,0.33-1.71,0.79-2.44,1.41c-0.59,0.5-1.1,1.07-1.54,1.7c-0.14,0.2-0.3,0.41-0.36,0.64c-0.08,0.31-0.07,0.64-0.1,0.97 c-0.03,0.32-0.06,0.63-0.09,0.94c-0.02,0.18-0.05,0.35-0.09,0.53c-0.1,0.44-0.2,0.87-0.32,1.31c-0.12,0.42-0.26,0.83-0.4,1.25
c-0.06,0.18-0.17,0.37-0.16,0.54c0.03,0.34,0.11,0.69,0.21,1.02c0.18,0.59,0.35,1.19,0.61,1.75c0.67,1.41,1.61,2.62,2.88,3.55
c0.71,0.53,1.51,0.86,2.35,1.11c0.34,0.1,0.68,0.19,1.02,0.26c0.39,0.09,0.77,0.19,1.16,0.22c0.53,0.04,1.06,0.03,1.59,0.03
c0.59,0,1.18-0.07,1.74-0.26c0.48-0.16,0.98-0.3,1.43-0.53c1.58-0.8,2.73-2.05,3.6-3.57c0.49-0.85,0.89-1.72,1.08-2.69
c0.1-0.48,0.19-0.97,0.23-1.45c0.06-0.8,0-1.6-0.24-2.37c-0.17-0.53-0.33-1.07-0.55-1.58c-0.3-0.69-0.72-1.31-1.18-1.91
c-0.59-0.77-1.27-1.46-2.07-2.01c-1.09-0.75-2.34-1.13-3.63-1.34c-0.5-0.08-1-0.08-1.62-0.13C142.68,22.32,142.13,22.39,141.57,22.45z M96.56,40.06c0.56-0.05,1.13-0.05,1.69-0.15c0.57-0.11,1.12-0.29,1.68-0.47
c0.84-0.27,1.58-0.72,2.22-1.33c0.51-0.49,1.01-1,1.48-1.54c0.52-0.6,0.95-1.26,1.26-1.99c0.18-0.43,0.36-0.87,0.5-1.32c0.11-0.37,0.17-0.77,0.24-1.15c0.01-0.07-0.01-0.15-0.03-0.22c-0.21-0.55-0.44-1.1-0.62-1.66c-0.15-0.5-0.26-1.01-0.35-1.53c-0.1-0.59-0.16-1.19-0.25-1.79c-0.02-0.13-0.06-0.27-0.13-0.37c-0.27-0.4-0.55-0.8-0.85-1.19c-0.6-0.78-1.33-1.42-2.17-1.93
c-0.72-0.44-1.49-0.77-2.33-0.95c-0.56-0.12-1.11-0.24-1.69-0.23c-0.51,0.01-1.02,0.04-1.53,0.07c-0.29,0.02-0.58,0.04-0.86,0.11c-0.54,0.14-1.06,0.31-1.59,0.47c-0.84,0.26-1.58,0.72-2.23,1.29c-1.23,1.08-2.17,2.38-2.78,3.91c-0.32,0.79-0.54,1.6-0.62,2.44c-0.06,0.66,0.01,1.33,0.05,2c0.03,0.58,0.22,1.13,0.41,1.68c0.27,0.78,0.67,1.48,1.15,2.15c0.62,0.88,1.39,1.63,2.29,2.22c0.54,0.36,1.1,0.67,1.72,0.87c0.37,0.12,0.73,0.24,1.1,0.33c0.4,0.1,0.8,0.18,1.2,0.23c0.34,0.04,0.69,0.01,1.04,0.01C96.56,40.02,96.56,40.04,96.56,40.06z M116.84,41.1c-0.04-0.03-0.08-0.07-0.13-0.08c-0.23-0.06-0.46-0.12-0.69-0.17c-0.32-0.07-0.64-0.13-0.96-0.18c-0.51-0.08-1.03-0.18-1.54-0.22c-0.5-0.04-1-0.03-1.5-0.03c-0.8,0-1.6,0.02-2.39,0.17c-0.4,0.08-0.82,0.1-1.22,0.19c-0.49,0.11-0.98,0.24-1.45,0.39c-0.71,0.24-1.43,0.48-2.12,0.78c-1.21,0.54-2.29,1.31-3.29,2.18c-1.01,0.88-1.93,1.86-2.73,2.94c-0.69,0.93-1.29,1.91-1.8,2.94c-0.59,1.19-1.01,2.43-1.29,3.72c-0.12,0.55-0.22,1.11-0.24,1.67c-0.04,0.83-0.01,1.66-0.01,2.49c0,0.08,0.05,0.16,0.1,0.27c0.06-0.15,0.09-0.25,0.13-0.34c0.23-0.62,0.43-1.26,0.7-1.87c0.44-1.01,0.95-1.98,1.53-2.92c0.76-1.23,1.62-2.38,2.58-3.45c1.56-1.72,3.33-3.2,5.31-4.4c0.93-0.57,1.9-1.08,2.88-1.57c0.65-0.33,1.34-0.58,2.02-0.85c0.43-0.17,0.87-0.33,1.31-0.48c0.37-0.13,0.75-0.24,1.13-0.34c0.37-0.1,0.74-0.19,1.11-0.28c0.42-0.1,0.84-0.22,1.27-0.3c0.42-0.08,0.84-0.14,1.26-0.21C116.81,41.13,116.82,41.11,116.84,41.1z123.17,41.05c0.5,0.09,1,0.18,1.5,0.28c0.43,0.08,0.86,0.16,1.28,0.27c0.54,0.14,1.06,0.31,1.59,0.48c0.52,0.17,1.04,0.33,1.55,0.53c0.63,0.25,1.26,0.51,1.86,0.81c0.89,0.45,1.78,0.91,2.65,1.42c1.27,0.74,2.46,1.59,3.55,2.58c0.8,0.72,1.56,1.48,2.3,2.26c0.5,0.53,0.97,1.09,1.38,1.69c0.61,0.88,1.21,1.78,1.73,2.72c0.46,0.83,0.83,1.71,1.21,2.57c0.21,0.47,0.37,0.96,0.57,1.5c0.04-0.16,0.09-0.28,0.09-0.4c-0.01-0.81-0.03-1.63-0.06-2.44c-0.02-0.71-0.16-1.4-0.34-2.08c-0.14-0.53-0.25-1.07-0.45-1.58c-0.29-0.75-0.62-1.48-0.97-2.21c-0.74-1.52-1.73-2.86-2.88-4.09c-0.8-0.86-1.69-1.62-2.67-2.27c-0.77-0.5-1.57-0.93-2.43-1.25c-0.68-0.25-1.36-0.52-2.06-0.72c-0.6-0.18-1.23-0.31-1.85-0.42c-0.66-0.11-1.33-0.23-2-0.24c-1.04-0.02-2.08,0.04-3.13,0.07c-0.03,0-0.05,0.01-0.08,0.01c-0.42,0.07-0.83,0.14-1.25,0.23c-0.37,0.08-0.73,0.17-1.1,0.26C123.17,41.02,123.17,41.04,123.17,41.05z"/>
</g>
<g id="Sub">
<path d="M120,11.09l8.33,20.5l22.07,1.58l-16.93,14.25l5.32,21.48L120,57.22l-18.79,11.69l5.32-21.48L89.6,33.18l22.07-1.58
L120,11.09z"/>
</g>
<g id="TopTip">
<path d="M123.25,21.83c0,0,5.26-0.15,8.2,1.96l-1.91,6.29c0,0-2.84-2.06-7.84-2.06s-5,2.89-5,3.25c0,5.72,16.39,3.4,16.39,15.47
c0,9.49-10.26,10.62-10.26,10.62v5.77h-5.46v-5.36c0,0-4.69-0.1-9.74-2.32c0.05,0.05,1.86-6.75,1.86-6.75s3.3,2.53,9.38,2.53
c5.26,0,5.41-2.68,5.41-3.66c0-6.34-16.34-3.97-16.34-15.47c0-8.87,9.64-9.85,9.64-9.85l0.1-5.36h5.57V21.83z M140.97,25.32
l-2.56,0.64l0.57,2.47c0,0-4.31,1.57-3.29,5.64c1.33,5.28,8.56,2.3,9.29,5.21c0.11,0.45,0.35,1.7-2.06,2.31
c-2.79,0.7-4.6-0.07-4.6-0.07s-0.04,3.33-0.07,3.31c2.58,0.43,4.74-0.06,4.74-0.06l0.62,2.46l2.51-0.63l-0.67-2.65
c0,0,4.58-1.71,3.48-6.06c-1.4-5.54-8.65-2.57-9.31-5.2c-0.04-0.17-0.38-1.49,1.92-2.07c2.3-0.58,3.84,0.04,3.84,0.04l0.15-3.11
c-1.59-0.63-3.99,0.05-3.99,0.05L140.97,25.32z M102.13,25.9l-2.57-0.58l-0.61,2.46c0,0-4.55-0.56-5.48,3.54
c-1.2,5.31,6.59,5.92,5.92,8.85c-0.1,0.45-0.45,1.67-2.88,1.12c-2.81-0.64-4.07-2.15-4.07-2.15s-1.55,2.95-1.56,2.92
c2.1,1.55,4.26,2.09,4.26,2.09l-0.56,2.48l2.52,0.57l0.6-2.67c0,0,4.85,0.55,5.85-3.83c1.26-5.57-6.55-6.21-5.95-8.86
c0.04-0.17,0.34-1.5,2.65-0.98c2.31,0.52,3.4,1.77,3.4,1.77l1.54-2.7c-1.14-1.28-3.58-1.76-3.58-1.76L102.13,25.9z"/>
</g>
<g id="SuperChat">
<path d="M146.71,24.83c0-4.02-3.26-7.28-7.28-7.28h-38.85c-4.02,0-7.28,3.26-7.28,7.28v22.39c0,4.02,3.26,7.28,7.28,7.28h35.17
l7.31,7.31c1.35,1.35,3.65,0.39,3.65-1.51V47.9c0-0.11-0.02-0.21-0.04-0.31c0.01-0.12,0.04-0.24,0.04-0.37V24.83z M120,49.56
c-1.62,0-2.93-1.31-2.93-2.93c0-1.62,1.31-2.93,2.93-2.93s2.93,1.31,2.93,2.93C122.93,48.25,121.62,49.56,120,49.56z M122.93,37.07
c0,1.62-1.31,2.93-2.93,2.93s-2.93-1.31-2.93-2.93v-10.6c0-1.62,1.31-2.93,2.93-2.93s2.93,1.31,2.93,2.93V37.07z"/>
</g>
<g id="YTMember">
<path d="M141.16,29.37c-0.51-1.9-2-3.4-3.91-3.91c-3.44-0.92-17.26-0.92-17.26-0.92s-13.81,0-17.26,0.92c-1.9,0.51-3.4,2-3.91,3.91
C97.91,32.81,97.91,40,97.91,40s0,7.19,0.92,10.63c0.51,1.9,2,3.4,3.91,3.91c3.44,0.92,17.26,0.92,17.26,0.92s13.81,0,17.26-0.92
c1.9-0.51,3.4-2,3.91-3.91c0.92-3.44,0.92-10.63,0.92-10.63S142.09,32.81,141.16,29.37z M115.58,46.63V33.37L127.06,40
L115.58,46.63z"/>
</g>
<g id="NOD">
<path d="M120,15.78L84.08,36.53l10.82,6.7L120,28.78l9.77,5.57v6.86l11.22-6.46v-0.4v-6.46L120,15.78z M99.01,52.11v-6.46v-0.4
l11.22-6.46v6.86l9.77,5.57l25.11-14.45l10.82,6.7L120,64.22L99.01,52.11z"/>
</g>
<g id="Resub">
<path d="M120,16.29l6.83,16.82l18.1,1.3l-13.88,11.69l4.36,17.62L120,54.12l-15.41,9.59l4.36-17.62L95.07,34.4l18.1-1.3L120,16.29z
M88.38,46.86L81,47.38l5.66,4.77l-1.78,7.18l6.28-3.91l6.28,3.91l-1.78-7.18l5.66-4.77l-7.38-0.53L91.16,40L88.38,46.86z
M146.05,46.86l-7.38,0.53l5.66,4.77l-1.78,7.18l6.28-3.91l6.28,3.91l-1.78-7.18l5.66-4.77l-7.38-0.53L148.84,40L146.05,46.86z"/>
</g>
</svg>
<span class="time"></span>
</div>
</div>
<!-- //// end new event -->
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');
:root {
--eventLayout: block; /* block or inline-block; */
--margin: 0px; /* min 0 max 20 */
--textTransform: uppercase; /* uppercase or normal */
--fontSize: 36px; /* Min 12 max 48 */
--fontFamily: 'Fredoka One', sans-serif;
--borderRadius: 20px; /* min 0 max 40 */
--leftSideOffset: -30px; /* min -50 max 10 */
--paddingTopBottom: 20px; /* min 6 max 50 */
--rotateAmount: rotate(30deg); /* min 0 max 30 */
--leftSideBgColor: #FFFFFF;
--rightSideBgColor: #E0009F;
--rightOpacity: calc(100 * .01); /* min 0 max 100 */
--shadowColor: #AA007D;
--nameColor: #E0009F;
--tagColor: #FFFFFF;
--extraAreaSize: 16px;
--extraFontColor: #FFF;
--extraFillColor: #E0009F;
/* XXXX */
}
body {
background: #333;
font-family: var(--fontFamily);
font-size: var(--fontSize);
white-space: nowrap;
text-transform: var(--textTransform);
}
.name, .tag, .nameHolder, .tagHolder {
backface-visibility: hidden;
}
.event {
display: var(--eventLayout);
margin: 0 var(--margin) var(--margin) 0;
opacity: 0;
}
.container {
display: inline-block;
border-radius: var(--borderRadius);
overflow: hidden;
transform-origin: left 50%;
will-change: transform;
}
.inner {
transform-origin: left 50%;
}
.left, .right, .name, .tag, .nameHolder, .tagHolder {
position: relative;
display: inline-block;
}
.visibleName {
position: absolute;
top: 0;
left: 0;
z-index: 999;
}
.name, .tag {
z-index: 99;
}
.name {
color: var(--nameColor);
}
.hiddenName {
opacity: 0;
}
.tag {
color: var(--tagColor);
}
.bgLeft {
position: absolute;
width: 100%;
height: 2000px;
top: -1000px;
right: 50%;
z-index: 0;
background: var(--leftSideBgColor);
}
.bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0;
background: var(--rightSideBgColor);
}
.visibleName, .left {
padding: var(--paddingTopBottom) 25px var(--paddingTopBottom) 25px;
}
.left {
transform: var(--rotateAmount);
position: relative;
left: var(--leftSideOffset);
}
.left .bg {
height: 2000px;
top: -1000px;
background: var(--leftSideBgColor);
}
.right {
padding: var(--paddingTopBottom) 25px var(--paddingTopBottom) 25px;
}
.right .bg {
opacity: var(--rightOpacity);
}
.svgHolder {
position: absolute;
right: 2px;
top: 0;
transform-origin: left top;
height: 100%;
}
.waveSvg {
position: absolute;
bottom: -100px;
left: 0;
height: 1350px;
fill: var(--leftSideBgColor);
}
.shadowSvg {
position: absolute;
top: -100px;
left: 12px;
width: 25px;
height: 1350px;
fill: var(--shadowColor);
transform-origin: right bottom;
transform: scaleX(1.2);
}
.particles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* Added */
.extra {
height: var(--extraAreaSize);
font-size: var(--extraAreaSize);
line-height: var(--extraAreaSize);
top: 4px;
left: calc(var(--extraAreaSize) / 2);
position: relative;
color: var(--extraFontColor)
}
.time {
position: relative;
left: calc(var(--extraAreaSize) * 1.4);
}
.iconSvg {
fill: var(--extraFillColor);
width: var(--extraAreaSize);
height: var(--extraAreaSize);
position: absolute;
left: 0;
transform-origin: center center;
transform: scale(2);
}
.default #Heart path {
transform: translateX(-80px);
}
console.clear();
var particlesColor = "#FFFFFF", // default white
animateParticles = true, // true or fales
rotationAmount = 12 // min 0 max 30
;
CustomEase.create("spring", "M0,110.41c0,0,14.75-131.47,29.63-131.47c10.6,0,14.13,28.27,23.71,28.27C64.96,7.21,70.12-5.6,79.39-5.6s11.34,7.21,20.47,7.21c11.04,0,14.28-2.94,23.12-2.94s16.64,2.5,24.88,2.5S167.74,0,176.13,0");
CustomEase.create("higherSpring", "M0,110.41c0,0,14.75-141.47,29.63-141.47c10.6,0,14.13,48.27,23.71,48.27c11.63,0,16.79-32.81,26.06-32.81S90.73,1.62,99.86,1.62c11.04,0,14.28-2.94,23.12-2.94s16.64,2.5,24.88,2.5S167.74,0,176.13,0");
var tl = new TimelineMax();
var offset = gsap.utils.random(1, 200);
var shadowOffset = offset * -1;
// removes 300 to compensate for max padding and max offset
var svgMovement = $(".waveSvg").outerHeight() - $(".container").outerHeight() - 300 - gsap.utils.random(1, 60);
var shadowMovement = svgMovement * -1;
var movementDuration = gsap.utils.random(25, 40, .1);
tl.set(".waveSvg", {y: offset});
tl.set(".shadowSvg", {y: shadowOffset});
tl.set(".event", {opacity: 1});
tl.to(".svgHolder", {duration: movementDuration, scaleY: "random(1, 3, .1)"});
tl.from(".inner", {duration: 0.35, ease: "power1.out", scaleX: 0}, 0);
tl.from(".particles", {duration: .4, opacity: 0}, 0);
tl.from(".container", {duration: 1.8, ease: "spring", rotation: rotationAmount}, 0.2);
tl.from(".extra", {duration: 1.8, ease: "higherSpring", y: 20, opacity: 0}, 0.2);
tl.from(".tag", {duration: 1.4, ease: "higherSpring", y:40}, 0.2);
tl.from(".tagHolder", {duration: 0.1, opacity: 0}, 0.2);
tl.from(".left", {duration: 2, ease: "expo.out", x: "-140%"}, 0.4);
tl.from(".visibleName", {duration: 0.2, opacity: 0}, .4);
tl.from(".visibleName .name", {duration: 2, ease: "spring", y:40, opacity: 0}, .5);
gsap.to(".waveSvg", {duration: movementDuration, ease: "power2.out", y: svgMovement});
gsap.to(".shadowSvg", {duration: movementDuration, ease: "power2.out", y: shadowMovement});
////////////////////////////////////////////////////////////
var xmlns = "http://www.w3.org/2000/svg";
var numParticles = 250;
// var particlesSvg = $(".particles")[0];
var particlesWidth = $(".container").outerWidth();
var particlesHeight = $(".container").outerHeight();
var endX = particlesWidth / 2;
var endY = particlesHeight / 2;
var canvas = document.querySelector(".particles");
var ctx = canvas.getContext("2d");
canvas.width = particlesWidth;
canvas.height = particlesHeight;
ctx.fillStyle = particlesColor;
var randomX1 = gsap.utils.random(-particlesWidth, particlesWidth * 2, true);
var randomX2 = gsap.utils.random(-particlesWidth, 0, true);
var randomX3 = gsap.utils.random(particlesWidth, particlesWidth * 2, true);
var randomY1 = gsap.utils.random(-particlesHeight, particlesHeight * 2, true);
var randomY2 = gsap.utils.random(-particlesHeight, 0, true);
var randomY3 = gsap.utils.random(particlesHeight, particlesHeight * 2, true);
var randomScale1 = gsap.utils.random(0.25, 0.75, .001, true);
var randomScale2 = gsap.utils.random(0.5, 1, .001, true);
var randomAlpha = gsap.utils.random(0.25, 1, .001, true);
var randomDuration = gsap.utils.random(40, 42, true);
var radius = 4;
// var size = radius * 2;
var particlePath = new Path2D();
particlePath.arc(0, 0, radius, 0, Math.PI * 2);
var particles = [];
var particleAnimations = [];
for (var i = 0; i < numParticles; i++) {
var particle = { x: 0, y: 0, scale: 0, alpha: 0 };
particles.push(particle);
spawnParticle(particle, true);
}
// var texture = generateTexture();
render();
if (animateParticles) {
gsap.to({}, {
duration: 20, // timer to stop particles
onUpdate: render,
onComplete() {
particleAnimations.forEach(animation => animation.pause());
}
});
}
function spawnParticle(particle, firstRun) {
var x, y;
if (firstRun) {
x = randomX1;
y = randomY1;
} else {
x = Math.random() < 0.5 ? randomX2 : randomX3;
y = Math.random() < 0.5 ? randomY2 : randomY3;
}
gsap.set(particle, {
alpha: randomAlpha,
scale: Math.random() < 0.5 ? randomScale1: randomScale2,
x,
y
});
if (!animateParticles) {
return;
}
var animation = gsap.to(particle, {
duration: randomDuration,
x: endX,
y: endY,
scale: 0,
onComplete: spawnParticle,
onCompleteParams: [particle],
ease: "sine.in"
});
if (firstRun) {
animation.progress(Math.random());
}
particleAnimations.push(animation);
}
function render() {
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, particlesWidth, particlesHeight);
for (var i = 0; i < particles.length; i++) {
var p = particles[i];
ctx.setTransform(p.scale, 0, 0, p.scale, p.x, p.y);
ctx.globalAlpha = p.alpha;
ctx.fill(particlePath);
}
}
// ADDED
var now = new Date();
var hours = now.getHours();
function getTime() {
var d = new Date();
var n = d.toLocaleString([], {
hour: '2-digit',
minute: '2-digit'
});
document.querySelector(".time").innerHTML = n;
}
getTime();
Also see: Tab Triggers