123

Pen Settings

CSS Base

Vendor Prefixing

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              #process-container
	#process-title The Whiskey Process
	#process-progress
		#process-progress-bar
	#process-numbers
		.process-number.selected 1
		.process-number 2
		.process-number 3
		.process-number 4
		.process-number 5
		.process-number 6
	#process-steps
		#process-steps-scroller
			.process-step.visible
				.step-label STEP ONE
				.step-img#corn
					img(src="http://data.baltimoresun.com/greg-kohn/temp/corn.png")				
				.step-desc Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
				.step-desc Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non  mauris vitae erat consequat auctor eu in elit.
			.process-step
				.step-label STEP TWO
				.step-img#mash
					.img-boundary
						img(src="http://data.baltimoresun.com/greg-kohn/temp/mash.png")
						#mash-circle-1.mash-circle
						#mash-circle-2.mash-circle
						#mash-circle-3.mash-circle						
						#mash-circle-4.mash-circle						
				.step-desc Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
				.step-desc Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non  mauris vitae erat consequat auctor eu in elit.			
			.process-step
				.step-label STEP THREE
				.step-img#ferment
					img(src="http://data.baltimoresun.com/greg-kohn/temp/ferment.png")
				.step-desc Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
				.step-desc Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non  mauris vitae erat consequat auctor eu in elit.					
			.process-step
				.step-label STEP FOUR
				.step-img#distill
					.img-boundary
						img#still(src="http://data.baltimoresun.com/greg-kohn/temp/still.png")
						img#cloud(src="http://data.baltimoresun.com/greg-kohn/temp/cloud.png")
				.step-desc Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
				.step-desc Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non  mauris vitae erat consequat auctor eu in elit.						
			.process-step
				.step-label STEP FIVE
				.step-img#age
					img.barrel(src="http://data.baltimoresun.com/greg-kohn/temp/barrel.png")
					#clock
						#hand
				.step-desc Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
				.step-desc Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non  mauris vitae erat consequat auctor eu in elit.					
			.process-step
				.step-label STEP SIX
				.step-img#bottle
					.img-boundary
						img#bottle-outline(src="http://data.baltimoresun.com/greg-kohn/temp/bottle.png")
						img#filling(src="http://data.baltimoresun.com/greg-kohn/temp/bottle-filling.png")

				.step-desc Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
				.step-desc Morbi accumsan ipsum velit. Nam nec tellus a odio tincidunt auctor a ornare odio. Sed non  mauris vitae erat consequat auctor eu in elit.			
            
          
!
            
              @import bourbon

$red-1: #a53030
$red-2: #ca6161

$container-width: 570px

body
	background-color: #222

#process-container
	width: $container-width
	margin: 20px auto
	color: white
	@media (max-width: ($container-width) + 20px)
		width: 95%

#process-title
	font-family: "Patua One", serif
	//font-family: , "EB Garamond", "Geared Slab", "Josefin Slab", serif
	//text-transform: uppercase
	font-size: 42px
	color: #555
	color: #E0E0E0

#process-progress
	+size(100% 18px)
	background-color: $red-1
	margin: 5px 0 20px 0
	overflow: hidden

#process-progress-bar
	+size(12% 100%)
	background-color: $red-2
	position: relative
	+transition(width 0.5s ease)
	&:after
		content: ''
		position: absolute
		top: 0
		left: 100%
		width: 0
		height: 0
		border-style: solid
		border-width: 18px 18px 0 0
		border-color: $red-2 transparent transparent transparent

#process-numbers
	text-align: center
	margin-bottom: 20px

.process-number
	display: inline-block
	border: 2px solid #555
	color: #555
	font-family: "Montserrat", "Helvetica Neue", helvetica, sans-serif
	+size(30px)
	line-height: 26px
	margin: 0 5px
	cursor: pointer
	+user-select(none)
	&:hover
		background-color: #555
		color: white
	&.selected
		//border: 2px solid $red-1
		//background-color: $red-1
		//color: white
		border: 2px solid white
		background-color: white
		color: $red-1
		cursor: default

#process-steps
	+size(100% 300px)
	overflow: hidden

#process-steps-scroller
	+size(600% 100%)
	+transition(all 0.5s ease)
	+transform(translateX(0))
	position: relative

.process-step
	+size((100%/6) 100%)
	//border: 1px solid green
	float: left
	font-family: "Montserrat", "Helvetica Neue", helvetica, sans-serif
	opacity: 0
	+transition(all 0.5s ease)
	&.visible
		+transition(all 2s ease)		
		opacity: 1

.step-label
	font-weight: 700

.step-desc
	color: #999
	margin: 10px 0
	font-size: 14px
	line-height: 1.5

.step-img
	width: 200px
	float: right
	position: relative
	@media (max-width: ($container-width + 20px))
		display: none

.img-boundary
	display: inline-block
	position: relative

#corn
	text-align: center
	img
		width: 115px
		//+animation(shake 2s linear alternate infinite)
		
#mash
	text-align: center
	img
		width: 100px
		
.mash-circle
	+size(20px)
	border-radius: 10px
	border: 2px solid white
	border: 2px solid #b18606
	background-color: white
	background-color: rgba(255,255,255,0.2)
	position: absolute
	bottom: 45px
	left: 40px
	+transform(scale(0.5))
	opacity: 0
	+animation(bubble 5s linear infinite)
		
#mash-circle-1
	bottom: 45px
	left: 40px

#mash-circle-2
	bottom: 50px
	left: 30px
	+animation(bubble 5s 2s linear infinite)

#mash-circle-3
	bottom: 70px
	+animation(bubble 5s 1s linear infinite)

#mash-circle-4
	bottom: 40px
	left: 45px
	+animation(bubble 5s 3s linear infinite)
		
#ferment
	text-align: center
	img
		width: 100px
	
#distill
	text-align: center

#still
	width: 100px

#cloud
	position: absolute
	top: 60px
	left: 75px
	width: 40px
	+animation(float 3s linear infinite)

#age
	text-align: center
	.barrel
		width: 100px
		position: relative
		top: 50px
		left: -15px

#clock
	margin: 20px auto
	+size(60px)
	background-color: #444
	border-radius: 150px
	position: absolute
	top: 0
	right: 0
	background-image: url('http://data.baltimoresun.com/greg-kohn/temp/clock-no-border.png')
	background-size: 97%
	background-position: center center
	
#hand
	+size(28px 2px)
	background-color: #999
	position: absolute
	top: 50%
	left: 50%
	+transform-origin(center left)
	+animation(tick 15s infinite linear)	
	
#bottle
	text-align: center
	.img-boundary
		position: relative
		overflow: hidden
	
#bottle-outline
	width: 90px
	position: relative
	z-index: 5
	display: block

#filling
	position: absolute
	top: 100%
	left: 0
	z-index: 4
	width: 90px
	//+animation(fill 4s ease infinite)
	&.animate
		+animation(fill 4s ease forwards)
	
//Keyframes		

+keyframes(shake)
	from
		+transform(rotate(-5deg))
	to
		+transform(rotate(5deg))
		
+keyframes(bubble)
	0%
		+transform(scale(0.5) translateX(0) translateY(0))
		opacity: 0
	20%
		+transform(scale(0.6) translateX(10px) translateY(-10px))
	40%
		+transform(scale(0.7) translateX(0) translateY(-20px))
	60%
		+transform(scale(0.8) translateX(-10px) translateY(-30px))
		opacity: 1
	80%
		+transform(scale(0.9) translateX(0) translateY(-40px))
	100%
		+transform(scale(1) translateX(10px) translateY(-50px))
		opacity: 0
	
+keyframes(float)
	0%
		+transform(translateX(0) translateY(0) scale(0.7))
		opacity: 0
	50%
		opacity: 1
	100%
		+transform(translateX(20px) translateY(20px) scale(1))
		opacity: 0
	
+keyframes(tick)
	from
		+transform(rotate(0deg))
	to
		+transform(rotate(360deg))
	
+keyframes(fill)
	from
		+transform(translateY(0%))
	to
		+transform(translateY(-100%))
		
		
		
*, *:before, *:after
	box-sizing: border-box

            
          
!
            
              var app = app || {
	
	init: function(){
		
		app.number_click();
		//app.slide_to(4);
		
	},
	
	slide_to: function(num){
		
		var total_slides = 6;
		var slide_increment = 100/total_slides;
		var new_position = (-(num-1)*slide_increment)+"%";
		
		if (Modernizr.csstransforms){
			
			//Slide using css transforms
			$("#process-steps-scroller")
				.css("transform","translateX("+new_position+")")
				.css("-webkit-transform","translateX("+new_position+")")
				.css("-moz-transform","translateX("+new_position+")")
				.css("-ms-transform","translateX("+new_position+")")
				.css("-o-transform","translateX("+new_position+")");
			
		} else {
	
			//Legacy support
			$("#process-steps-scroller").css("left",-(num-1)*100+"%");
			
		}
		
		//Fade in new slide, fade out old slide
		$(".process-step").removeClass("visible");
		$(".process-step").eq(num-1).addClass("visible");
		
	},
	
	progress_to: function(num){
		
		var total_slides = 6;
		var width = num/6*100+"%";
		
		$("#process-progress-bar").css("width",width);
		
	},
	
	number_click: function(){
				
		$(".process-number").on("click", function(){
			
			//Update style
			$(".process-number").removeClass("selected");
			$(this).addClass("selected");			

			//Move scroller
			app.slide_to(Number($(this).text()));
			
			//Update progress bar
			app.progress_to(Number($(this).text()));
			
			//Special case: Initiate one-time animation for Step 6
			//If this type of single-run animation needed to be implemented
			//on other processes, consider adding parameter to app.slide_to()
			if (Number($(this).text()) === 6){
				$("#filling").addClass("animate");
			} else {
				$("#filling").removeClass("animate");
			}
			
		});
		
	}
	
}

$(document).ready(function(){
	app.init();
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console