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.
<div class="container">
<image class="eye centered" src="https://cdn1.iconfinder.com/data/icons/hr-management-1/64/4-512.png" />
<div class="current">
<h4 class="refnumber"> ref: 123</h4>
<div class="legalshiz"> </div>
<h4 class="easyout">without prejudice save as to costs</h4>
</div>
<div class="previous">
</div>
</div>
$red: #1243aa;
* {
box-sizing: border-box;
font-family: Merriweather, serif;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
}
.container {
width: 100%;
height: 100%;
background: #cecece;
position: relative;
overflow: hidden;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
align-content: center;
text-align: center;
margin: auto;
justify-items: center;
}
.eye {
filter: blur(1px) opacity(30%);
height: 80%;
user-select: none;
}
.centered {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.current {
width:70%;
@media only screen and (max-width: 600px) {
width: 100%;
}
}
.cult {
color: $red;
font-size: 2rem;
font-weight: bold;
text-align: center;
opacity: 0.1;
transition: all 1s;
@media only screen and (max-width: 600px) {
font-size: 1rem;
}
}
.shown {
opacity: 1;
}
.previous {
position: absolute;
top: 80%;
height: 20%;
left: 50%;
text-align: center;
transform: translate(-50%, -50%);
overflow-x: hidden;
width: 80%;
h2 {
color: darken($red, 15%);
opcaity: 0.7;
opcaity: 0.7;
font-size: 1rem;
@media only screen and (max-width: 600px) {
font-size: 0.5rem;
}
}
}
h4 {
color: darken($red, 15%);
opcaity: 0.7;
}
.refnumber {
margin-bottom:20px;
}
.easyout {
margin-top:10px;
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: gray;
}
::-webkit-scrollbar-thumb {
background: $red;
}
::-webkit-scrollbar-thumb:hover {
background: darken($red, 10%);
}
let cultText = $(".cult")[0];
let current = $(".legalshiz")[0];
let previous = $(".previous")[0];
let refno = $(".refnumber")[0];
let fadeTimer = null;
Splain.addEntry({
person:['my client', 'the judge', 'the witness', 'the prosicution', 'the defendant','me, personally as a lawyer', 'the baliff'],
alias:['me','i',' you', 'them', 'the man in question', 'mr big dick', 'daddies special little boy', 'it', 'the scum', 'mr innocent', 'the party', 'innocent bystander 4', 'your honour', 'rockit'],
wholePerson:["{{person}} ({{alias}})","{{person}} ({{alias}}, {{alias}})"],
actions:['acquit stuff', 'aid and abet', 'arrest this mother fucker', 'settle', 'request legal concil', 'get an extension', 'cross examine a witness', 'depose', 'treat {{person}} as hostile', 'do some law', 'make an order', 'prove resonable doubt', 'get summary judgment', 'request takesy backsies', 'go to trial', 'declare a mistrial', 'dissolve parliment', 'strike all marks from the record', 'stop requesting my presence','assign a police detail', 'never show your miserable face in court', 'wear just a few more clothes in the house of law', 'reconsider your position', 'stop quoting lord of the rings as a defence', 'calling the deceased to the stand', 'declaring a mistrial due to being too cool for crime', 'saying its not crime if its banter' ],
timeFrames:['post haste', 'immediatly','ASAP', 'with immediate effect', 'within a reasonable hour', 'in 4-16 business days', 'not, today but soon', 'when it pleases the court','sometime this year', ' right fucking now... and i mean it','before i lose my shit', 'by sunset', 'within the house', 'in a timely manner', 'by days end', 'when it suits them'],
wouldLikeTo: ['would like ', '{{`humbly`?}} requests'],
due: ['due to', 'thanks to', 'because', 'on account of', 'for the express reasons of'],
reason: ['being reallly fucking guilty', 'legal incompetance', 'the fact i just cant be fucked anymore', 'lack of proof', 'lack of due diligance','obvious violation of human rights', 'a dangerous precedents being set','i went to the wrong court thanks to drugs', 'witness tampering', 'flagrent coercion', 'having personally recieved a death threat','them blackamailing me proper good', 'them paying enough to make it go away', ' i was just seeing if i could wangle some money','reasons i cant get into right now','cant tell what the judge is saying because his accent is super thick', 'just not really feeling the legal vibe', 'not being as prepared for this as i thought i was', 'it not happening like this on suits', 'it smelling like privilege in here', 'reconsidering my career and switching to journalism', 'actually only having a phillosophy degree', 'taking something and i can feel it kicking in', 'not really being sure how to answer that', 'seeing something similar on judge judy', 'it not being right under the eyes of the lord', 'the rules needing updating anyway', 'intererance by Trump']
});
Splain.addEntry({
cultName: [
"{{person|wholePerson}} {{wouldLikeTo}} {{`we`|`you`}} {{actions}} {{timeFrames}} due to {{reason}}"
]
});
let newCult = function() {
if (!fadeTimer) {
var history = document.createElement("h2");
history.innerHTML = current.textContent;
$(".previous").prepend(history);
current.innerHTML = "";
refno.innerHTML = `ref: ${Math.random().toString(36).slice(6)}`;
var nc = document.createElement("h1");
nc.innerText = Splain.process("{{cultName}}");
nc.classList.add("cult");
current.append(nc);
fadeTimer = setTimeout(() => {
nc.classList.add("shown");
fadeTimer = null;
}, 100);
}
};
newCult();
document.body.addEventListener("click", newCult, true);
Also see: Tab Triggers