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.
<html>
<head></head>
<body>
<div id="app">
<aside>
<div class="quote-mode">
<input type="radio" id="long-quote" v-model="isLongQuote" :value="true" name="quoteMode">
<label for="long-quote">blockquote tag</label>
<input type="radio" id="short-quote" v-model="isLongQuote" :value="false" name="quoteMode">
<label for="short-quote">q tag</label>
</div>
<p>What's the difference? <a href="https://quentin-bellanger.com/semantic-quotes" target="_blank" rel="noopener">Read this post</a>.</p>
</aside>
<main>
<h1>Quotes for the web</h1>
<hr>
<!-- For long quotes, use <blockquote> tag -->
<blockquote v-if="isLongQuote" cite="https://www.brainyquote.com/quotes/michael_jordan_127660">
<p class="quote">I've missed more than 9000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.</p>
<span class="author">Michael Jordan</span>
</blockquote>
<!-- For short quotes, use <q> tag -->
<p v-else>As the famous scientist <span>Albert Einstein</span> once said, <q cite="https://www.brainyquote.com/quotes/albert_einstein_103652">Everything should be made as simple as possible, but not simpler.</q> and as a minimalist I can't agree more.</p>
</main>
</div>
</body>
</html>
$color-blue: #91EAE4;
$color-purple: #7F7FD5;
$color-black: #000000;
$color-white: #ffffff;
body {
background: $color-purple;
background: -webkit-linear-gradient(to right, $color-blue, $color-purple);
background: linear-gradient(to right, $color-blue, $color-purple);
height: 100vh;
margin: 0;
#app {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
main {
background: $color-white;
border-radius: 5px;
box-shadow: 0 4px 8px 0 rgba($color-black, 0.2), 0 6px 20px 0 rgba($color-black, 0.19);
max-width: 400px;
padding: 25px;
position: relative;
&::after {
content: "";
background: $color-white;
border-radius: 5px;
position: absolute;
top: -0;
left: 0;
height: 100%;
transform: rotate(2deg);
width: 100%;
z-index: -1;
}
h1 {
margin: 0;
text-align: center;
}
blockquote {
margin: 0;
padding: 0;
}
p {
font-size: 1.2em;
line-height: 1.5em;
&::first-letter {
font-size: 2em;
font-weight: bold;
}
q {
font-style: italic;
}
}
}
aside {
margin: 25px 0;
text-align: center;
input {
display: none;
&:checked + label::after {
background: $color-purple;
}
}
label {
display: inline-block;
font-family: sans-serif;
font-size: 18px;
margin: 0 30px;
position: relative;
text-align: left;
width: auto;
&::after {
background: $color-white;
border: 2px solid $color-white;
border-radius: 50%;
box-shadow: 0 0 0px 2px $color-purple;
content: '';
height: 10px;
left: -25px;
position: absolute;
top: 5px;
transition: background 0.3s;
width: 10px;
}
}
p {
font-family: sans-serif;
font-size: 14px;
a {
color: $color-white;
text-decoration: none;
&:hover,
&:focus {
border-bottom: 1px solid $color-white;
}
}
}
}
}
}
.author {
display: block;
font-size: 1.2em;
font-style: italic;
text-align: right;
}
hr {
border: none;
border-bottom: 3px solid rgba($color-blue, 0.6);
box-shadow: 0 -3px 0 rgba($color-purple, 0.4);
margin: 25px auto;
width: 100px;
}
new Vue({
el: '#app',
data() {
return {
isLongQuote: true,
}
}
})
Also see: Tab Triggers