A Pen by 2020cbustos

Thumbnail
This awesome code was written by 2020cbustos, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 2020cbustos ©
  • HTML
  • CSS
  • JavaScript
    
<nav class="fixed">
  <ul>
  <li><a href="#home">Home</a></li>
  <li><a href="#news">News</a></li>
  <li><a href="#contact">Contact</a></li>
  <ul style="float:right;list-style-type:none;">
    <li><a class="active" href="#about">About</a></li>
    <li><a href="#login">Login</a></li>
  </ul>
</ul>
</nav>
&nbsp;

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>


<h1><b>MY WEBSITE </b></h1>

<div class="image1"><img src= "https://pbs.twimg.com/profile_images/512107676679958528/TGvOMHFW.jpeg" height="150" width="150" align=center>
  

<p1> Picture </p1>

<p2> Picture </p2>

<p3> Picture </p3>


<p4> Picture </p4>

<p5> Picture </p5>

<p6> Picture </p6>

<br>
  <br>
  <br>
  
<div class="post"><img src= " http://imgc.allpostersimages.com/images/P-473-488-90/74/7488/J5WQ100Z/posters/philippe-hugonnard-sunset-skyscraper-landscape-empire-state-building-and-one-world-trade-center-manhattan-new-york.jpg" 
height="303" width="273">

<div class="image3"><img src= " https://wdpromedia.disney.go.com/resize/mwImage/1/1200/600/90/wdpromedia.disney.go.com/media/abd/refresh/north-america/southern-california-vacations/adventures-by-disney-north-america-southern-california-hero-03-paradise-pier-at-disney-california-adventure-park.jpg" 
height="303" width="273">


<div class="image4"><img src= "http://blog.theclymb.com/wp-content/uploads/2015/06/shutterstock_11372353.jpg" 
height="303" width="273"> 
  
  <div class="image5"><img src= " http://imgc.allpostersimages.com/images/P-473-488-90/74/7488/J5WQ100Z/posters/philippe-hugonnard-sunset-skyscraper-landscape-empire-state-building-and-one-world-trade-center-manhattan-new-york.jpg" 
height="303" width="273">
    
  <div class="image6"><img src= " http://www.livescience.com/images/i/000/054/836/i02/beach-sea-130716.jpg?1373978821" 
height="303" width="273">
    
    
    <div class="image7"><img src= "http://edu-geography.com/data_images/countries/thailand/thailand-01.jpg" height="303" width="273"> 
      
      


<div class="slider">
	  <div class="arrows">
	    <a class="previous" href="#">&#xf053;</a>
	    <a class="next" href="#">&#xf054;</a>
	  </div>
	  <div class="slides">
			<div class="slide active blue" data-icon="&#xf0ac;">
				<h2>Timezones</h2>
				<p>Clocks+ helps you break the barriers of space and time to get information for any city you like. You can search for and organise your favorite cities so that you can easily find out the correct local time.</p>
				<a target="_blank" href="https://itunes.apple.com/gb/app/clocks+/id937380413?mt=8">Check me out</a>
			</div>
			<div class="slide white" data-icon="&#xf0f3;">
				<h2>Alarms</h2>
				<p>Nobody wants to miss out on important events, but sometimes, it’s hard to find the time in another city. Clocks+ lets you set alarms for your favorite cities in a simple and intuitive way.</p>
				<a target="_blank" href="https://itunes.apple.com/gb/app/clocks+/id937380413?mt=8">Start the Clock</a>
			</div>
			<div class="slide red" data-icon="&#xf013;">
				<h2>Widgets/Today Extension</h2>
				<p>Clocks+ wouldn’t be a modern app without Widgets. Your favorite cities appear in the Today View with just a swipe down, for quick glancing, Did we mention that they look awesome, too?</p>
				<a target="_blank" href="https://itunes.apple.com/gb/app/clocks+/id937380413?mt=8">Download on AppStore</a>
			</div>
		</div>
		<div class="bullets">
		</div>
	</div>

/*Downloaded from https://www.codeseek.co/2020cbustos/a-pen-by-2020cbustos-bpVRwy */
    ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
  font-family: georgia;
  font-size: 17px;
    overflow: hidden;
    background-color:#909090 ;
}

li {
    float: left;
}

li a {
    display: block;
    color: white;
    text-align: center;
    padding: 20px 89px;
    text-decoration: none;
}

li a:hover {
    background-color: #777;
}




h1 {position: abcolute;
 text-align: center;
  font-size:80px; 
  color:#606060;
  font-family: impact}


.fixed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 50px;
  background-color: #00a087;
}

.image1 {padding: 21px 495px}

h2 {position: absolute;
    font-size:72px;
  top: 1105px;
  left: 370px;}


.post {position: absolute;
 align:center;
  left: 442px
 }

 

p1 {
    border-style: solid;
  position: absolute;
   font-size:27px;
  top: 739px;
  left: 187px;
   
}

p2 {
    border-style: solid;
    position: absolute;
    font-size:27px;
  top: 739px;
  left: 533px;
}
p3 {
    border-style: solid;
    position: absolute;
    font-size:27px;
  top: 739px;
  left:896px;
}

p4 {
    border-style: solid;
   position: absolute;
    font-size:27px;
  top: 1167px;
  left: 187px;
}

p5 {
    border-style: solid;
   position: absolute;
    font-size:27px;
  top: 1167px;
  left: 533px;
}

p6 {
    border-style: solid;
   position: absolute;
    font-size:27px;
  top: 1167px;
  left: 896px;
}

.image3 {padding: 123px 5px}

.image4 { position: absolute;
  top: 428px;
  left: -343px;}

.image5 {position: absolute;
  top: 1px;
  left: 700px;}

.image6 {position: absolute;
  top: -430px;
  left:0px;}

.image7 {position: absolute;
  top: 2px;
  left:-710px;}














body{
  background: url('https://subtlepatterns.com/images/transp_bg.png');
}
h2{
		font-weight: 300;
		font-size: 3vw;
		padding: 20px 0;
	}
	p{
		font-size: 1.2vw;
		line-height: 1.7em;
	}
	.slider{
		position: relative;
		width: 100%;
		overflow: hidden;
		transition: all .3s;
		perspective: 900px;
		transform-style: preserve-3d;
	}
	.slider .previous, .slider .next{
		font-family: "FontAwesome";
		font-size: 20px;
		position: absolute;
		top: 50%;
		color: white;
		padding: 20px;
		text-decoration: none;
		left: -100px;
		margin-top: -34px;
		transition: all .3s;
		opacity: 0;
		z-index: 10000;
	}
	.slider .next{
		right: -100px;
		content: "\f054";
		left: auto;
	}
	.slider:hover .previous, .slider:hover .next{
		opacity: 1;
	}
	.slider:hover .previous{
		left: 0;
	}
	.slider:hover .next{
		right: 0;
	}
	.slider .slides{
		height: 100%;
	}
	.slide{
		padding: 10%;
		width: 100vw;
		text-align: center;
		position: absolute;
		transform: scale(0.5,0.5);
		opacity: 0;
		transition: all .3s;
	}

	.slide.blue{
		background: #1E73BE;
		color: white;
	}
	.slide.white{
		background: #ccc;
		color: #444444;
	}
	.slide.red{
		background: #BF525A;
		color: white;
	}
	.slide.active{
		z-index: 10;
		left: 0;
		opacity: 1;
		transform: scale(1,1);
	}

	.slide.inactiveLeft{
		left: -100vw;
		z-index: 11;
	}
	.slide.inactiveRight{
		left: 100vw;
		z-index: 11;
	}
  .slide:after{
    content: attr(data-icon);
    font-family: "FontAwesome";
    font-size: 15vw;
    position: absolute;
    bottom: -8vw;
    left: 0;
    opacity: 0.3;
  }
	.slide a{
		color: inherit;
		border: 2px solid;
		padding: 10px;
		font-size: 1.3vw;
		margin-top: 20px;
		display: inline-block;
		transition: all .3s;
		text-transform: uppercase;
		letter-spacing: 1px;
		position: relative;
	}
	.slide a:hover{
		background: rgba(255, 255, 255, 0.2);
		border: 2px solid transparent;
		text-decoration: none;
		letter-spacing: 2px;
		padding-right: 30px;
	}
	.slide a:after{
		content: " \f105";
		font-family: "FontAwesome";
		position: absolute;
		margin-left: -10px;
		transition: all .3s;
		opacity: 0;
	}
	.slide a:hover:after{
		margin-left: 10px;
		opacity: 1;
	}
	.slider .bullets{
		text-align: center;
		position: absolute;
		bottom: 10px;
		width: 100%;
	}
	.slider .bullets .bullet{
		position: relative;
		display: inline-block;
		background: rgba(255,255,255,.8);
		border-radius: 50%;
		width: 8px;
		height: 8px;
		z-index: 14;
		margin: 0 5px;
		cursor: pointer;
		border: 2px solid transparent;
		transition: all .3s;
	}
	.slider .bullets .bullet.active{
		background: rgba(255,255,255,.4);
	}
	.slider .bullets .bullet:hover{
		border: 2px solid rgba(255,255,255,.8);
		background: transparent;
	}


/*Downloaded from https://www.codeseek.co/2020cbustos/a-pen-by-2020cbustos-bpVRwy */
    var $slider = $(".slider"), $bullets = $(".bullets");
		function calculateHeight(){
			var height = $(".slide.active").outerHeight();
			$slider.height(height);
		}

		$(window).resize(function() {
			calculateHeight();
		    clearTimeout($.data(this, 'resizeTimer'));
		});
		
		function resetSlides(){
			$(".slide.inactive").removeClass("inactiveRight").removeClass("inactiveLeft");
		}

		function gotoSlide($activeSlide, $slide, className){
			 $activeSlide.removeClass("active").addClass("inactive "+className);
			 $slide.removeClass("inactive").addClass("active");
			 calculateHeight();
			 resetBullets();
			 setTimeout(resetSlides, 300);
		}

		$(".next").on("click", function(){
			 var $activeSlide = $(".slide.active"),
				 $nextSlide = $activeSlide.next(".slide").length != 0 ? $activeSlide.next(".slide") : $(".slide:first-child");
				 console.log($nextSlide);
				 gotoSlide($activeSlide, $nextSlide, "inactiveLeft");
		});
		$(".previous").on("click",  function(){
			 var $activeSlide = $(".slide.active"),
				 $prevSlide = $activeSlide.prev(".slide").length != 0 ? $activeSlide.prev(".slide") : $(".slide:last-child");

				 gotoSlide($activeSlide, $prevSlide, "inactiveRight");
		});
		$(document).on("click", ".bullet", function(){
			if($(this).hasClass("active")){
				return;
			}
			var $activeSlide = $(".slide.active");
			var currentIndex = $activeSlide.index();
			var targetIndex = $(this).index();
			console.log(currentIndex, targetIndex);
			var $theSlide = $(".slide:nth-child("+(targetIndex+1)+")");
			gotoSlide($activeSlide, $theSlide, currentIndex > targetIndex ? "inactiveRight" : "inactiveLeft");
		})
		function addBullets(){
			var total = $(".slide").length, index = $(".slide.active").index();
			for (var i=0; i < total; i++){
				var $bullet = $("<div>").addClass("bullet");
				if(i==index){
					$bullet.addClass("active");	
				}
				$bullets.append($bullet);
			}
		}
		function resetBullets(){
			$(".bullet.active").removeClass("active");
			var index = $(".slide.active").index()+1;
			console.log(index);
			$(".bullet:nth-child("+index+")").addClass("active");
		}
		addBullets();
		calculateHeight();	

Comments