JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
div.main
div.editor
span Click grid to toggle squares
br
span Select a color scheme:
input(type='radio' name='color' id='blue' checked=true)
label(for='blue') Non-Photo Blue
input(type='radio' name='color' id='sepia')
label(for='sepia') Old Scroll
input(type='radio' name='color' id='monochrome')
label(for='monochrome') High Contrast
input(type='radio' name='color' id='monochrome2')
label(for='monochrome2') Low Ink
br
span Check this box to add text & symbols
input(type="checkbox" class="editing")
- var n = 0;
div.grid
while n < 1024
input(id='x'+n type="checkbox" class="tile" checked="false")
label(for='x'+n++)
input
div.symbols
div
b Symbols (Copy & Paste)
div
div ✪ ❂ ★ Statue
div Ⓒ Ⓕ Ⓢ Trap door
div ● Pillar
div ⊠ Covered Pit
div ▣ Open Pit
div Τ Trap
div ◉ Well
div ◎ Fountain
div ≋ Water
div ⌹ Altar
div 🄲 Chest
div 🅃 Table
div ⩌ ⩍ ⫏ ⫐ Chairs
div ⚰ Sarcophagus
div ⚗ Alchemy Still
div ⚔ Weapons
div ⚒ Tools
div ⊜ Barrel
div ⊟ Crate
div ⢸ ⋯ Bars/Portcullis
div ⌇ 〰 Curtain/Tapestry
div ⊞ Grate
div ⬚ Skylight
div ⊥ Lever
div ⎈ Wheel
div ← ↑ → ↓ ↖ ↗ ↘ ↙ Arrows
div ⇠ ⇡ ⇢ ⇣ Dotted Arrows
div ↜ ↝ ⇜ ⇝ Wavy Arrows
body {
font-family: 'Apple Symbols', sans-serif;
}
.main {
min-height: 900px;
max-width: 1000px;
margin: auto;
}
.editor {
width: 800px;
margin: auto;
float: left;
}
.grid {
margin: 10px auto;
display: flex;
flex-wrap: wrap;
width: 800px;
}
input.tile[type=checkbox] {
display: none;
}
input.tile[type=checkbox] + label {
box-sizing: border-box;
display: block;
border: 0;
padding: 0;
display: block;
width: 25px;
min-width: 25px;
height: 25px;
}
label > input {
box-sizing: border-box;
background: red;
border: 0;
padding: 3px 0 0 0;
background: none;
text-align: center;
font-size: 19px;
font-family: 'Apple Symbols', sans-serif;
width: 100%;
height: 23px;
line-height: 23px;
pointer-events: none;
}
.editing:checked + .grid label > input {
pointer-events: auto;
}
.symbols {
float: right;
}
/* colors */
#sepia:checked ~ .grid {
box-shadow: 0 0 10px rgba(0,0,0,0.5), inset 0 0 100px 15px rgba(50,50,0,0.3);
padding: 5px;
background: -webkit-linear-gradient(top, rgba(217,181,121, 1), rgba(218,188,134, 1) 100%);
}
#sepia:checked ~ .grid input.tile[type=checkbox] + label {
border: 1px solid rgba(93,78,45, 0.7);
}
#sepia:checked ~ .grid input.tile[type=checkbox]:checked + label {
background-image: linear-gradient(
45deg,
transparent 33%,
rgba(93,78,45, 0.7) 33%,
rgba(93,78,45, 0.7) 66%,
transparent 66%
);
background-size: 3px 3px;
}
#sepia:checked ~ .grid input.tile[type=checkbox]:not(:checked) + label {
bbackground-color: rgba(235,221,195, 0.90);
}
#sepia:checked ~ .grid label > input {
color: rgba(73,50,16, 0.8);
}
#blue:checked ~ .grid,
#blue:checked ~ .grid input.tile[type=checkbox] + label {
border: 1px solid #99d0e1;
}
#blue:checked ~ .grid input.tile[type=checkbox]:checked + label {
background-color: #a4dded;
}
#blue:checked ~ .grid input.tile[type=checkbox]:not(:checked) + label {
background-color: #ffffff;
}
#blue:checked ~ .grid label > input {
color: #99d0e1;
}
#monochrome:checked ~ .grid,
#monochrome:checked ~ .grid input.tile[type=checkbox] + label {
border: 1px solid #000;
}
#monochrome:checked ~ .grid input.tile[type=checkbox]:checked + label {
background-color: #000;
}
#monochrome:checked ~ .grid input.tile[type=checkbox]:not(:checked) + label {
background-color: #ffffff;
}
#monochrome:checked ~ .grid label > input {
color: #000;
}
#monochrome2:checked ~ .grid {
border: 1px solid #000;
background-image: linear-gradient(
-45deg,
transparent 50%,
#888 50%,
#888 60%,
transparent 60%
), linear-gradient(
45deg,
transparent 50%,
#888 50%,
#888 60%,
transparent 60%
);
background-size: 10px 10px;
}
#monochrome2:checked ~ .grid input.tile[type=checkbox] + label {
}
#monochrome2:checked ~ .grid input.tile[type=checkbox]:checked + label {
border: 1px solid transparent;
background: transparent;
}
#monochrome2:checked ~ .grid input.tile[type=checkbox]:not(:checked) + label {
border: 1px solid #000;
background-color: #ffffff;
}
#monochrome2:checked ~ .grid label > input {
color: #000;
}
Also see: Tab Triggers