Pen Settings

HTML

CSS

CSS Base

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

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.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

Vue

              
                <script>
import GlitchedWriter from "https://cdn.skypack.dev/vue-glitched-writer@1.0.8";

// Glitched Writer vue component:
// https://www.npmjs.com/package/vue-glitched-writer

export default {
	components: {
		GlitchedWriter
	},
	data() {
		return {
			messages: [
				"Deep in the human unconscious",
				"is a pervasive need,",
				"for a logical universe",
				"that makes sense.",
				"But the real universe",
				"is always one step beyond logic.",
				"― Frank Herbert, Dune"
			],
			options: { letterize: true },
			queueOptions: { loop: 800 }
		};
	}
};
</script>

<template>
	<div id="app">
		<div class="planet"></div>
		<GlitchedWriter
			:text="messages"
			appear
			preset="cosmic"
			:options="options"
			:queue="queueOptions"
			tag="h1"
		/>

		<a
			class="npm"
			href="https://www.npmjs.com/package/vue-glitched-writer"
			target="_blank"
		>
			<svg viewBox="0 0 780 250">
				<path
					d="M240,250h100v-50h100V0H240V250z M340,50h50v100h-50V50z M480,0v200h100V50h50v150h50V50h50v150h50V0H480z M0,200h100V50h50v150h50V0H0V200z"
				></path>
			</svg>
		</a>
		<div class="noise"></div>
	</div>
</template>

<style lang="scss">
$black: #03071e;
$white: #e7eafd;
$red: #9d0208;
html {
	color: $white;
	font-family: "Inconsolata", monospace;
}
::selection {
	background: $red;
}
body {
	background: $black;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
}
h1 {
	position: fixed;
	top: 25%;
	left: 20%;
	will-change: contents;
	white-space: pre-wrap;
	display: flex;
	text-transform: uppercase;
	text-shadow: 0px 0px 2px rgba($white, 0.6);
	filter: blur(0.2px);

	.gw-char {
		diplay: flex;
		justify-content: center;
		width: 1.5rem;
		animation: glitch-blink 1s steps(20, end) infinite alternate-reverse;
		animation-delay: 300ms;
		&:nth-child(4n) {
			animation-delay: 500ms;
		}
		&:nth-child(4n + 1) {
			animation-delay: 700ms;
		}
		&:nth-child(4n + 2) {
			animation: none;
		}
	}
}

.planet {
	position: absolute;
	right: -15vw;
	bottom: -30vh;
	width: 110vmin;
	height: 110vmin;
	border-radius: 50%;
	background: $red;
	background: -webkit-radial-gradient(bottom left, $red, $black);
	filter: blur(0.6px);
}

@keyframes glitch-blink {
	$steps: 20;

	@for $i from 0 through $steps {
		#{percentage($i * 1 / $steps)} {
			opacity: 0.65 + random(10) / 10;
		}
	}
}

.npm {
	position: absolute;
	right: 30px;
	bottom: 30px;
	svg {
		width: 80px;
		fill: $black;
	}

	&:hover {
		svg {
			fill: $white;
		}
	}
}

@keyframes grain {
	0%,
	100% {
		transform: translate(0, 0);
	}
	10% {
		transform: translate(-10px, -20px);
	}
	20% {
		transform: translate(-20px, 10px);
	}
	30% {
		transform: translate(10px, -25px);
	}
	40% {
		transform: translate(-10px, 50px);
	}
	50% {
		transform: translate(40px, 30px);
	}
	60% {
		transform: translate(40px, 0);
	}
	70% {
		transform: translate(0, 15px);
	}
	80% {
		transform: translate(5px, 100px);
	}
	90% {
		transform: translate(-30px, 20px);
	}
}

.noise {
	position: absolute;
	top: -100px;
	left: -100px;
	bottom: -100px;
	right: -100px;
	opacity: 0.5;
	pointer-events: none;
	animation: grain 8s steps(5) infinite alternate;
	background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAA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