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.
<head>
<title>WoW-Tools Your WoW Source for everything important!</title>
<link rel = "stylesheet"
type = "text/css"
href = "style.css" />
<style>
body{
background-color: white;
}
header{
/* text-align: center; */
background-color: grey;
}
#logo{
/* top: 20px; */
text-align: left;
}
#crbuttons{
/* position: absolute; */
/* top: 50%; */
text-align: center;
padding-bottom: 20px;
}
#menu{
background-color: blue;
float: left;
width: 20%;
}
#pickcorruption{
background-color: greenyellow;
float: left;
width: 50%;
}
#currentcorruption{
background-color: rgb(38, 184, 45);
float: right;
width: 50%;
}
#info{
display: flex;
flex-flow: column wrap;
margin: auto;
background-color: green;
float: right;
width: 80%;
}
#info > #rotation1 { order: 1;}
#info > #rotation2 { order: 2;}
#info > #rotation3 { order: 3;}
#info > #rotation4 { order: 4;}
#info > #rotation5 { order: 5;}
#info > #rotation6 { order: 6;}
#info > #rotation7 { order: 7;}
#info > #rotation8 { order: 8;}
</style>
</head>
<body>
<header>
<img id="logo" src="" alt="WoW Tools Logo">
<div id="crbuttons">
<button id="retailbutton">Retail</button>
<button id="classicbutton">Classic</button>
</div>
</header>
<div id="menu">
<p id="CVR">
Corruption Vendor Rotation
</p>
<button id="test">Testbutton</button>
</div>
<div id="info">
<p id="pickcorruption">Pick the corruption you are looking for</p>
<p id="currentcorruption">Show mothers available corruptions today</p>
<div id="corruptionbuttons">
<button id="avoidant">Avoidant</button>
<button id="deadlyMomentum">Deadly Momentum</button>
<button id="echoingVoid">Echoing Void</button>
<button id="expedient">Expedient</button>
<button id="glimpseOfClarity">Glimpse of Clarity</button>
<button id="gushingWound">Gushing Wound</button>
<button id="honedMind">Honed Mind</button>
<button id="ineffableTruth">Ineffable Truth</button>
<button id="infiniteStars">Infinite Stars</button>
<button id="masterful">Masterful</button>
<button id="racingPulse">Racing Pulse</button>
<button id="severe">Severe</button>
<button id="siphoner">Siphoner</button>
<button id="strikethrough">Strikethrough</button>
<button id="surgingVitality">Surging Vitality</button>
<button id="twilightDevastation">Twilight Devastation</button>
<button id="twistedAppendage">Twisted Appendage</button>
<button id="versatile">Versatile</button>
<button id="voidRitual">Void Ritual</button>
</div>
<div id="rotation1" class="element">
<p>Rotation 1</p>
<p id="rotation1Date" class="year"></p>
<ul>
<li id="ineffableTruth1">Ineffable Truth 1</li>
<li id="honedMind1">Honed Mind 1</li>
<li id="strikethrough2">Strikethrough 2</li>
<li id="masterful2">Masterful 2</li>
<li id="expedient3">Expedient 3</li>
<li id="twistedAppendage3">Twisted Appendage 3</li>
</ul>
</div>
<div id="rotation2" class="element">
<p>Rotation 2</p>
<p id="rotation2Date" class="year"></p>
<ul>
<li id="masterful1">Masterful 1</li>
<li id="voidRitual1">Void Ritual 1</li>
<li id="deadlyMomentum2">Deadly Momentum 2</li>
<li id="siphoner2">Siphoner 2</li>
<li id="ineffableTruth2">Ineffable Truth 2</li>
<li id="versatile3">Versatile 3</li>
<li id="avoidant2">Avoidant 2</li>
</ul>
</div>
<div id="rotation3" class="element">
<p>Rotation 3</p>
<p id="rotation3Date" class="year"></p>
<ul>
<li id="infiniteStars1">Infinite Stars</li>
<li id="surgingVitality1">Surging Vitality 1</li>
<li id="glimpseOfClarity">Glimpse of Clarity</li>
<li id="severe2">Severe 2</li>
<li id="racingPulse3">Racing Pulse</li>
<li id="siphoner3">Siphoner 3</li>
<li id="avoidant3">Avoidant 3</li>
</ul>
</div>
<div id="rotation4" class="element">
<p>Rotation 4</p>
<p id="rotation4Date" class="year"></p>
<ul>
<li id="severe1">Severe 1</li>
<li id="siphoner1">Siphoner 1</li>
<li id="expedient2">Expedient 2</li>
<li id="twilightDevastation2">Twilight Devastation 2</li>
<li id="honedMind3">Honed Mind 3</li>
<li id="strikethrough3">Strikethrough 3</li>
</ul>
</div>
<div id="rotation5" class="element">
<p>Rotation 5</p>
<p id="rotation5Date" class="year"></p>
<ul>
<li id="expedient1">Expedient 1</li>
<li id="twistedAppendage1">Twisted Appendage 1</li>
<li id="racingPulse2">Racing Pulse 2</li>
<li id="echoingVoid2">Echoing Void 2</li>
<li id="infiniteStars3">Infinite Stars 3</li>
<li id="severe3">Severe 3</li>
</ul>
</div>
<div id="rotation6" class="element">
<p>Rotation 6</p>
<p id="rotation6Date" class="year"></p>
<ul>
<li id="racingPulse1">Racing Pulse 1</li>
<li id="strikethrough1">Strikethrough 1</li>
<li id="surgingVitality2">Surging Vitality 2</li>
<li id="voidRitual2">Void Ritual 2</li>
<li id="masterful3">Masterful 3</li>
<li id="twilightDevastation3">Twilight Devastation 3</li>
<li id="avoidant1">Avoidant 1</li>
</ul>
</div>
<div id="rotation7" class="element">
<p>Rotation 7</p>
<p id="rotation7Date" class="year"></p>
<ul>
<li id="echoingVoid1">Echoing Void 1</li>
<li id="versatile1">Versatile 1</li>
<li id="honedMind2">Honed Mind 2</li>
<li id="infiniteStars2">Infinite Stars 2</li>
<li id="deadlyMomentum3">Deadly Momentum 3</li>
<li id="voidRitual3">Void Ritual 3</li>
<li id="gushingWound">Gushing Wound</li>
</ul>
</div>
<div id="rotation8" class="element">
<p>Rotation 8</p>
<p id="rotation8Date" class="year"></p>
<ul>
<li id="twilightDevastation1">Twilight Devastation 1</li>
<li id="versatile2">Versatile 2</li>
<li id="surgingVitality3">Surging Vitality 3</li>
<li id="twistedAppendage2">Twisted Appendage 2</li>
<li id="deadlyMomentum1">Deadly Momentum 1</li>
<li id="echoingVoid3">Echoing Void 3</li>
</ul>
</div>
</div>
<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script>
const DAYS = 24 * 3600 * 1000;
const countdowns = [{
id: "rotation1Date",
helper: "rotation1",
timestamp: new Date("May 20, 2020 02:00:00 GMT -5:00").getTime(),
interval: 28 * DAYS,
},
{
id: "rotation2Date",
helper: "rotation2",
timestamp: new Date("May 23, 2020 14:00:00 GMT-05:00").getTime(),
interval: 28 * DAYS
},
{
id: "rotation3Date",
helper: "rotation3",
timestamp: new Date("May 27, 2020 02:00:00 GMT-5:00").getTime(),
interval: 28 * DAYS
},
{
id: "rotation4Date",
helper: "rotation4",
timestamp: new Date("May 30, 2020 14:00:00 GMT-05:00").getTime(),
interval: 28 * DAYS
},
{
id: "rotation5Date",
helper: "rotation5",
timestamp: new Date("June 3, 2020 02:00:00 GMT-05:00").getTime(),
interval: 28 * DAYS
},
{
id: "rotation6Date",
helper: "rotation6",
timestamp: new Date("June 6, 2020 14:00:00 GMT-05:00").getTime(),
interval: 28 * DAYS
},
{
id: "rotation7Date",
helper: "rotation7",
timestamp: new Date("June 10, 2020 14:00:00 GMT-05:00").getTime(),
interval: 28 * DAYS
},
{
id: "rotation8Date",
helper: "rotation8",
timestamp: new Date("June 13, 2020 14:00:00 GMT-05:00").getTime(),
interval: 28 * DAYS
},
];
setInterval(() => {
const now = new Date().getTime();
countdowns.forEach(c => {
while (c.timestamp + (3.5 * DAYS) < now) c.timestamp += c.interval;
const tSecs = Math.floor((c.timestamp - now) / 1000);
const secs = tSecs % 60;
const tMins = (tSecs - secs) / 60;
const mins = tMins % 60;
const tHours = (tMins - mins) / 60;
const hours = tHours % 24;
const days = (tHours - hours) / 24;
const reset = new Date(c.timestamp);
document.getElementById(c.id).textContent= `${reset}`;
});
}, 1000);
</script>
</body>
Also see: Tab Triggers