Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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.

HTML

              
                <div id="app">
	<h1 class="title">{{ !isOpenMenu ? 'Click this button' : 'and again...'}}</h1>
	<nav class="circle-navigation">
		<button class="circle-navigation__nav-btn" @click="toggleMenu" :style="{backgroundImage: menu_btn.icon}"></button>
		<ul class="circle-navigation__list">
			<li class="circle-navigation__item" 
					v-for='item, i in menu_items' 
					v-bind:key='item.name'
					:style="{transform: item.position, transitionDelay: setURL[i].delay}"
					@click="showAf"
					>
				<a href="#" class="circle-navigation__link" :style="{backgroundImage: setURL[i].icon}"></a>
			</li>
		</ul>
	</nav>
	<blockquote v-if='isOpenMenu' class="af">{{ activeAf.blq }}
		<cite class='af__auth'>{{ activeAf.auth }}</cite>
	</blockquote>
</div>


              
            
!

CSS

              
                
@import url('https://fonts.googleapis.com/css?family=Josefin+Sans');
$font: 'Josefin Sans', sans-serif;
$accent: #ffcc80;
body{
	font-family: $font;
	background: #fff3e0;
}
.title{
	color: $accent/1.6;
}
.af{
	display: block;
	font-size: 1.1em;
	position: fixed;
	bottom: 1em;
	right: 1em;
	&__auth{
		display: block;
		margin-top: 0.5em;
		font-size: 0.9em;
	}
}
.circle-navigation{
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	&__nav-btn{
		width: 80px;
		height: 80px;
		border-radius: 50%;
		border: none;
		transition: .3s ease;
		cursor: pointer;
		background-repeat: no-repeat;
		background-position: center;
		font-family: $font;
		background-color: #ffe0b2;
		z-index: 15;
		outline: none;
		box-shadow: 1px 2px 10px #ffb74d;
		&:hover{
			background: $accent;
			background-repeat: no-repeat;
			background-position: center;	
		}
		&:active{
			background: #ff9800;
			background-repeat: no-repeat;
			background-position: center;
			box-shadow: 1px 2px 1px #ffb74d;
		}
	}
	&__list{
		list-style-type: none;
		padding: 0;
		margin: 0;
		position: absolute;
		top: 4px;
		left: 6px;
		z-index: -1;
	}
	&__item{
		position: absolute;
		transition-property: all;
		transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
		transition-duration: .2s;
	}
	&__link{
		color: #000;
		text-decoration: none;
		display:block;
		width: 70px;
		height: 70px;
		border-radius: 50%;
		background-repeat: no-repeat;
		background-position: center;
		&:hover{
			background-repeat: no-repeat!important;
			background-position: center!important;
			transition: .3s ease;
			background: $accent;
		}
	}
}
.icon-position{
	background-repeat: no-repeat;
	background-position: center;
}
              
            
!

JS

              
                const {sin, cos, floor, random, PI} = Math;
new Vue({
	el: '#app',
	data: {
		initialDistans: 0,
		distanceBeforeItems: 100,
		delayAnimation: 30,
		isOpenMenu: false,
		maxRadius: PI*2,
		menu_btn: {
			name: 'menu',
			icon: 'url(http://fdsea.ru/icons/icons8-xbox-menu-50.png)'
		},
		menu_items: [
			{
				name: 'AboutUs',
				icon:'http://fdsea.ru/icons/icons8-approval-50.png',
				position: ''
			},
			{
				name: 'News',
				icon: 'http://fdsea.ru/icons/icons8-comments-50.png',
				position: ''
			},
			{
				name: 'Links',
				icon: 'http://fdsea.ru/icons/icons8-envelope-50.png',
				position: ''
			},
			{
				name: 'Follow',
				icon: 'http://fdsea.ru/icons/icons8-mind-50.png',
				position: ''
			},
			{
				name: 'Lists',
				icon: 'http://fdsea.ru/icons/icons8-pie-chart-50.png',
				position: ''
			},
			{
				name: 'Customers',
				icon: 'http://fdsea.ru/icons/icons8-user-male-50.png',
				position: ''
			}
		],
		af: [
			{blq: "Success doesn't come to you…you go to it.", auth: "Marva Collins"},
			{blq: "Not to know is bad, not to wish to know is worse.", auth: "Proverb"},
			{blq: "Being entirely honest with oneself is a good exercise.", auth: "Sigmund Freud"},
			{blq: "Recognition is the greatest motivator.", auth: "Gerard C. Eakedale"},
			{blq: "Many a small thing has been made large by the right kind of advertising.", auth: "Mark Twain"},
		],
		activeAf: {blq: '', auth: ''}
	},
	methods: {
		toggleMenu(){
			if(!this.isOpenMenu){
				this.initialDistans = this.distanceBeforeItems;
			}else{
				this.initialDistans = 0;
			}
				let items_amount = this.menu_items.length;
				let angle = this.maxRadius / items_amount;
				this.menu_items = this.menu_items.map((v, i)=>{
					return {
						...v,
						position: `translate(${floor(sin(i * angle)*this.initialDistans)}px,
																 ${floor(cos(i * angle)*-this.initialDistans)}px
						)`,
					}
				});
			this.isOpenMenu = !this.isOpenMenu;
		},
		showAf(){
			this.activeAf = this.af[floor(random() * this.af.length)];
		}
	},
	computed:{
		setURL(){
			let a = this.menu_items.map((v, i)=>{
				return {...v, icon: `url(${v.icon})`, delay: `${i / this.delayAnimation}s`};
			});
			return a;
		}
	},
	created(){
	}
});
              
            
!
999px

Console