Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Auto Save

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.

HTML

              
                
<body class="bg-grey-lightest font-sans leading-normal tracking-normal">

<nav id="header" class="fixed w-full z-10 pin-t">
	
	<div id="progress" class="h-1 z-20 pin-t" style="background:linear-gradient(to right, #4dc0b5 var(--scroll), transparent 0);"></div>

		<div class="w-full md:max-w-md mx-auto flex flex-wrap items-center justify-between mt-0 py-3">
				
			<div class="pl-4">
				<a class="text-black text-base no-underline hover:no-underline font-extrabold text-xl"  href="#"> 
					Minimal Blog
				</a>
            </div>

			<div class="block lg:hidden pr-4">
				<button id="nav-toggle" class="flex items-center px-3 py-2 border rounded text-grey border-grey-dark hover:text-black hover:border-teal appearance-none focus:outline-none">
					<svg class="fill-current h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/></svg>
				</button>
			</div>

			<div class="w-full flex-grow lg:flex lg:items-center lg:w-auto hidden lg:block mt-2 lg:mt-0 bg-grey-lightest md:bg-transparent z-20" id="nav-content">
				<ul class="list-reset lg:flex justify-end flex-1 items-center">
					<li class="mr-3">
						<a class="inline-block py-2 px-4 text-black font-bold no-underline" href="#">OXItocin</a>
					</li>
					<li class="mr-3">
						<a class="inline-block text-grey-dark no-underline hover:text-black hover:text-underline py-2 px-4" href="#">luna</a>
					</li>
					<li class="mr-3">
						<a class="inline-block text-grey-dark no-underline hover:text-black hover:text-underline py-2 px-4" href="#">al cafe</a>
					</li>
				</ul>
			</div>
		</div>
	</nav>

	<!--Container-->
	<div class="container w-full md:max-w-md mx-auto pt-20">
		
		<div class="w-full px-4 md:px-6 text-xl text-grey-darkest leading-normal" style="font-family:Georgia,serif;">
			
			<!--Title-->
			<div class="font-sans">
          <div id="layout-1">

    <h1 contenteditable>angel in the offside</h1>
          </div>
				<p class="text-sm md:text-base font-normal text-grey-dark">Published 29 February 2019</p>
			</div>
		
			
			<!--Post Content-->
			

			<!--Lead Para-->
			<p class="py-6">
				šŸ‘‹ Welcome fellow <a class="text-teal no-underline hover:underline" href="https://www.tailwindcss.com">Tailwind CSS</a> and miminal monochrome blog fan.  This starter template provides a starting point to create your own minimal monochrome blog using Tailwind CSS and vanilla Javascript.
			</p>

			<p class="py-6">The basic blog page layout is available and all using the default Tailwind CSS classes (although there are a few hardcoded style tags). If you are going to use this in your project, you will want to convert the classes into components.</p>				
		

			<h1 class="py-2 font-sans">Vatrogasci gase, piromani pale</h1>
			<h2 class="py-2 font-sans">Heading 2</h2>
			<h3 class="py-2 font-sans">Heading 3</h3>
			<h4 class="py-2 font-sans">Heading 4</h4>
			<h5 class="py-2 font-sans">Heading 5</h5>
			<h6 class="py-2 font-sans">Heading 6</h6>

			<p class="py-6">Sed dignissim lectus ut tincidunt vulputate. Fusce tincidunt lacus purus, in mattis tortor sollicitudin pretium. Phasellus at diam posuere, scelerisque nisl sit amet, tincidunt urna. Cras nisi diam, pulvinar ut molestie eget, eleifend ac magna. Sed at lorem condimentum, dignissim lorem eu, blandit massa. Phasellus eleifend turpis vel erat bibendum scelerisque. Maecenas id risus dictum, rhoncus odio vitae, maximus purus. Etiam efficitur dolor in dolor molestie ornare. Aenean pulvinar diam nec neque tincidunt, vitae molestie quam fermentum. Donec ac pretium diam. Suspendisse sed odio risus. Nunc nec luctus nisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis nec nulla eget sem dictum elementum.</p>

			<ol>
				<li class="py-3">Maecenas accumsan lacus sit amet elementum porta. Aliquam eu libero lectus. Fusce vehicula dictum mi. In non dolor at sem ullamcorper venenatis ut sed dui. Ut ut est quam. Suspendisse quam quam, commodo sit amet placerat in, interdum a ipsum. Morbi sit amet tellus scelerisque tortor semper posuere.</li>
				<li class="py-3">Morbi varius posuere blandit. Praesent gravida bibendum neque eget commodo. Duis auctor ornare mauris, eu accumsan odio viverra in. Proin sagittis maximus pharetra. Nullam lorem mauris, faucibus ut odio tempus, ultrices aliquet ex. Nam id quam eget ipsum luctus hendrerit. Ut eros magna, eleifend ac ornare vulputate, pretium nec felis.</li>
				<li class="py-3">Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc vitae pretium elit. Cras leo mauris, tristique in risus ac, tristique rutrum velit. Mauris accumsan tempor felis vitae gravida. Cras egestas convallis malesuada. Etiam ac ante id tortor vulputate pretium. Maecenas vel sapien suscipit, elementum odio et, consequat tellus.</li>
			</ol>

			<blockquote class="border-l-4 border-teal italic my-8 pl-8 md:pl-12">Example of blockquote - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at ipsum eu nunc commodo posuere et sit amet ligula.</blockquote>

			<p class="py-6">Example code block:</p>
			<pre class="bg-black rounded text-white font-mono text-base p-2 md:p-4">
				<code class="break-words whitespace-pre-wrap">
&lt;header class="site-header outer"&gt;
&lt;div class="inner"&gt;
{{&gt; "site-nav"}}
&lt;/div&gt;
&lt;/header&gt;
				</code>
			</pre>

											
			<!--/ Post Content-->
					
		</div>
		
		<!--Tags -->
		<div class="text-base md:text-sm text-grey px-4 py-6">
			Tags: <a href="#" class="text-base md:text-sm text-teal no-underline hover:underline">Novocain</a> . <a href="#" class="text-base md:text-sm text-teal no-underline hover:underline">OxiTonCin</a>
		</div>
		
		<!--Divider-->
		<hr class="border-b-2 border-grey-light mb-8 mx-4">
		
		
		<!--Subscribe-->	
		<div class="container px-4">
			<div class="font-sans bg-white rounded-lg shadow-md p-4 text-center">
				<h2 class="break-normal text-xl md:text-3xl">Subscribe to my Newsletter</h2>
				<h3 class="break-normal font-normal text-grey-dark text-sm md:text-base">Get the latest posts delivered right to your inbox</h3>
				<div class="w-full text-center pt-4">
					<form action="#">
						<div class="max-w-sm mx-auto p-1 pr-0 flex flex-wrap items-center">
							<input type="email" placeholder="youremail@example.com" class="flex-1 mt-4 appearance-none border border-grey-light rounded shadow-md p-3 text-grey-dark mr-2 focus:outline-none">
							<button type="submit" class="flex-1 mt-4 block md:inline-block appearance-none bg-teal text-white text-base font-semibold tracking-wide uppercase py-4 rounded shadow hover:bg-teal-light">Subscribe</button>
						</div>
					</form>
				</div>
			</div>
		</div>
		<!-- /Subscribe-->
	
		

		<!--Author-->
		<div class="flex w-full items-center font-sans px-4 py-12">
			<img class="w-10 h-10 rounded-full mr-4" src="http://i.pravatar.cc/300" alt="Avatar of Author">
			<div class="flex-1 px-2">
				<p class="text-base font-bold text-base md:text-xl leading-none mb-2">Jo Bloggerson</p>
				<p class="text-grey-dark text-xs md:text-base">Minimal Blog Tailwind CSS template by <a class="text-teal no-underline hover:underline" href="https://www.tailwindtoolbox.com">TailwindToolbox.com</a></p>
			</div>
			<div class="justify-end">
				<button class="bg-transparent border border-grey hover:border-teal text-xs text-grey hover:text-teal font-bold py-2 px-4 rounded-full">Read More</button>
			</div>
		</div>
		<!--/Author-->
		
		<!--Divider-->
		<hr class="border-b-2 border-grey-light mb-8 mx-4">
		
		<!--Next & Prev Links-->
		<div class="font-sans flex justify-between content-center px-4 pb-12">
			<div class="text-left">
				<span class="text-xs md:text-sm font-normal text-grey-dark">&laquo; Previous Post</span><br>
				<p><a href="#" class="break-normal text-base md:text-sm text-teal font-bold no-underline hover:underline">Vatrene vijesti</a></p>
			</div>
			<div class="text-right">
				<span class="text-xs md:text-sm font-normal text-grey-dark">Next Post &raquo;</span><br>
				<p><a href="#" class="break-normal text-base md:text-sm text-teal font-bold no-underline hover:underline">Ledene vijesti</a></p>
			</div>
		</div>
		
		
		<!--/Next & Prev Links-->

	</div> 
	<!--/container-->
	
	<footer class="bg-white border-t border-grey-light shadow">	
		<div class="container max-w-md mx-auto flex py-8">

			<div class="w-full mx-auto flex flex-wrap">
				<div class="flex w-full md:w-1/2 ">
					<div class="px-8">
						<h3 class="font-bold text-black">About</h3>
						<p class="py-4 text-grey-dark text-sm">
							Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vel mi ut felis tempus commodo nec id erat. Suspendisse consectetur dapibus velit ut lacinia. 
						</p>
					</div>
				</div>
				
				<div class="flex w-full md:w-1/2">
					<div class="px-8">
					<h3 class="font-bold text-black">Social</h3>
						<ul class="list-reset items-center text-sm pt-3">
						  <li>
							<a class="inline-block text-grey-dark no-underline hover:text-black hover:text-underline py-1" href="#">Add social link</a>
						  </li>
						  <li>
							<a class="inline-block text-grey-dark no-underline hover:text-black hover:text-underline py-1" href="#">Add social link</a>
						  </li>
							<li>
							<a class="inline-block text-grey-dark no-underline hover:text-black hover:text-underline py-1" href="#">Add social link</a>
						  </li>
						</ul>
					</div>
				</div>
			</div>
        

		
		</div>
	</footer>


              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Dosis);

/* Layout 1 */
#layout-1 {
  background: #fff;
}

#layout-1 h1 { display:flex-inline;
  font: 300 3.3rem/1.5em 'Dosis', sans-serif;
  color: #172838;
  text-transform: uppercase;
  margin-bottom: 50px;
  text-align: center;
  border: 2px solid #172838;
  padding: 6px 0;

}

#layout-1 p {
  color: #172838;
  font: 400 1.3em/1.75em 'Gudea', sans-serif;
  margin-bottom: 1.1em;
  text-align: justify;
}

#layout-1 a {
  color: #c32847;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #c32847;
  transition: background-color 0.5s ease;
}

#layout-1 a:hover {
  color: #fff;
  background: #c32847;
}

              
            
!

JS

              
                	/* Progress bar */
	//Source: https://alligator.io/js/progress-bar-javascript-css-variables/
	var h = document.documentElement,
		  b = document.body,
		  st = 'scrollTop',
		  sh = 'scrollHeight',
		  progress = document.querySelector('#progress'),
		  scroll;
	var scrollpos = window.scrollY;
	var header = document.getElementById("header");
	var navcontent = document.getElementById("nav-content");

	document.addEventListener('scroll', function() {

	/*Refresh scroll % width*/
	scroll = (h[st]||b[st]) / ((h[sh]||b[sh]) - h.clientHeight) * 100;
	progress.style.setProperty('--scroll', scroll + '%');

	/*Apply classes for slide in bar*/
	scrollpos = window.scrollY;

    if(scrollpos > 10){
      header.classList.add("bg-white");
	  header.classList.add("shadow");
	  navcontent.classList.remove("bg-grey-lightest");
	  navcontent.classList.add("bg-white");
    }
    else {
	  header.classList.remove("bg-white");
	  header.classList.remove("shadow");
	  navcontent.classList.remove("bg-white");
	  navcontent.classList.add("bg-grey-lightest");
	  
    }

	});


	//Javascript to toggle the menu
	document.getElementById('nav-toggle').onclick = function(){
		document.getElementById("nav-content").classList.toggle("hidden");
	}
	
              
            
!
999px

Console