<!-- Cagla Bacaksiz (1315979) -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>University of Applied Sciences and Arts</title>
</head>
<!-- JavaScript Library -->
<script src="js/jquery.js"></script>
<link href="http://fonts.googleapis.com/css?family=Roboto+Slab:300" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="layout.css">
<link rel="shortcut icon" href="bilder/favicon.ico" type="image/x-png" />
<body>
<!--#####################################################################################################-->
<!-- NAVIGATION -->
<div id="navigation" class="nav">
<a href="javascript:void(0)" class="button_close" onclick="closeNav()">×</a>
<!-- javascript:void()
The void operator evaluates the given expression and then returns undefined.
The void operator is often used merely to obtain the undefined primitive value,
usually using “void(0)” (which is equivalent to “void 0”).
In these cases, the global variable undefined can be used instead (assuming it
has not been assigned to a non-default value).
-->
<a href="#section1">Welcome</a>
<a href="#section2">Information</a>
</div>
<div id="button" onclick="openNav()">☰</div>
<!--#######################################################################################################-->
<!-- SECTION 1 -->
<section id="section1" class="scroll">
<div id="layer_1" class="img-parallax"></div>
<div id="layer_2" class="img-parallax"></div>
<ul class="fly-in-text hidden">
<li>W</li>
<li>E</li>
<li>L</li>
<li>C</li>
<li>O</li>
<li>M</li>
<li>E</li>
<br></br>
<li>E</li>
<li>X</li>
<li>C</li>
<li>H</li>
<li>A</li>
<li>N</li>
<li>G</li>
<li>E</li>
<br></br>
<li>S</li>
<li>T</li>
<li>U</li>
<li>D</li>
<li>E</li>
<li>N</li>
<li>T</li>
<li>S</li>
</ul>
</section>
<!-- External Integration of section1.js -->
<script src="js/section1.js"></script>
<!--#######################################################################################################-->
<!-- SECTION 2 -->
<section id="section2" class="scroll">
<div class="slideshow-container">
<div class="mySlides fade">
<img src="bilder/1.jpg" style="height: 100%; width: 100%;">
</div>
<div class="mySlides fade">
<img src="bilder/2.jpg" style="height: 100%; width: 100%;">
</div>
<div class="mySlides fade">
<img src="bilder/3.jpg" style="height: 100%; width: 100%;">
</div>
<a class="prev" onclick="plusSlides(-1)">❮</a>
<a class="next" onclick="plusSlides(1)">❯</a>
</div>
</section>
<!--########################################################################################################-->
<!-- External Integration of JS Data and JS Libraries -->
<script src="js/jquery.waypoints.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="js/menu.js"></script>
<script src="js/scroll.js"></script>
<script src="js/section2.js"></script>
</body>
</html>
/* Cagla Bacaksiz (1315979) */
/****************************************************************************************************************************************************/
/* General Styles */
/****************************************************************************************************************************************************/
body,html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background: #2A4A69;
font-family: 'Roboto Slab', serif;
}
.scroll {
width: 100%;
height: 100%;
float: left;
position: relative;
}
/****************************************************************************************************************************************************/
/* Navigation */
/****************************************************************************************************************************************************/
.nav {
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: rgba(255,255,255, 0.9);
overflow-x: hidden;
padding-top: 60px;
transition: 0.5s;
}
#button {
font-size: 40px;
cursor: pointer;
margin-left: 10px;
z-index: 50;
position: fixed;
color: rgba(255,255,255, 0.6);
}
.nav .button_close {
position: absolute;
top: -15px;
right: 25px;
font-size: 40px;
margin-left: 50px;
}
.nav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}
.nav a:hover, .offcanvas a:focus {
color: #ff9966;
}
/****************************************************************************************************************************************************/
/* Section 1 */
/****************************************************************************************************************************************************/
#section1 {
background: url(bilder/layer0.jpg);
background-position: center center;
background-size: cover;
}
#section1 ul {
text-align: center;
font-size: 1vw;
}
.img-parallax {
position: fixed;
width: 100%;
height: 100%;
}
#layer_1 {
background: url(bilder/layer1.png) no-repeat;
background-position: center center;
background-size: cover;
}
#layer_2 {
background: url(bilder/layer2.png) no-repeat;
background-position: center center;
background-size: cover;
}
.fly-in-text {
list-style: none;
position: absolute;
left: 50%;
top: 40%;
transform: translateX(-50%) translateY(-50%);
}
.fly-in-text li {
display: inline-block;
margin-right: 30px;
font-family: Open Sans, Arial;
font-weight: 300;
font-size: 4em;
color: #fff;
opacity: 1;
transition: all 2.5s ease;
}
.fly-in-text li:last-child {
margin-right: 0;
}
.fly-in-text.hidden li {
opacity: 0;
}
.fly-in-text.hidden li:nth-child(1) {transform: translateX(-200px) translateY(150px); }
.fly-in-text.hidden li:nth-child(2) {transform: translateX(150px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(3) {transform: translateX(-200px) translateY(150px); }
.fly-in-text.hidden li:nth-child(4) {transform: translateX(150px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(5) {transform: translateX(-200px) translateY(150px); }
.fly-in-text.hidden li:nth-child(6) {transform: translateX(150px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(7) {transform: translateX(-200px) translateY(150px); }
.fly-in-text.hidden li:nth-child(8) {transform: translateX(0px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(9) {transform: translateX(-200px) translateY(0px); }
.fly-in-text.hidden li:nth-child(10){transform: translateX(0px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(11){transform: translateX(-200px) translateY(0px); }
.fly-in-text.hidden li:nth-child(12){transform: translateX(0px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(13){transform: translateX(-200px) translateY(0px); }
.fly-in-text.hidden li:nth-child(14){transform: translateX(0px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(15){transform: translateX(-200px) translateY(0px); }
.fly-in-text.hidden li:nth-child(16){transform: translateX(0px) translateY(-200px); }
.fly-in-text.hidden li:nth-child(17){transform: translateX(-200px) translateY(0px);}
.fly-in-text.hidden li:nth-child(18){transform: translateX(0px) translateY(-200px); }
/****************************************************************************************************************************************************/
/* Section 2 */
/****************************************************************************************************************************************************/
#section2 {
background: #ff9966;
background-repeat: no-repeat;
background-position: top;
background-size: 80vw;
}
/****************************************************************************************************************************************************/
/* Section 2 */
/****************************************************************************************************************************************************/
#section2 {
background: #ff9966;
}
.slideshow-container {
max-width: 100vw;
max-height: 100vw;
position: relative;
margin: auto;
opacity: 0.8;
}
.slideshow-container img {
height: 100vw;
width: 100vw;
}
.prev, .next {
cursor: pointer;
position: absolute;
top: 20vw;
padding: 16px;
color: white;
font-weight: bold;
font-size: 3vw;
transition: 0.6s ease;
border-radius: 0 3px 3px 0;
}
.next {
right: 0;
border-radius: 3px 0 0 3px;
}
.prev:hover, .next:hover {
font-size: 4vw;
}
.active, .dot:hover {
background-color: #717171;
}
.fade {
-webkit-animation-name: fade; /* Browser Support für die Fading-Animation */
-webkit-animation-duration: 1.5s; /* Browser Support für die Fading-Dauer */
animation-name: fade; /* Fading-Animation */
animation-duration: 1.5s; /* Fading-Dauer */
}
@-webkit-keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
@keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
// Cagla Bacaksiz (1315979)
// ########################################################################################################
// Section 1
// ########################################################################################################
// Parallax effect - Mountains and Sky
// Source: https://www.youtube.com/watch?v=ivfnUiCVnBU&t=3s
function parallax(){
var layer_1 = document.getElementById('layer_1');
var layer_2 = document.getElementById('layer_2');
layer_1.style.top = -(window.pageYOffset / 3) + 'px';
layer_2.style.top = -(window.pageYOffset / 3) + 'px';
}
window.addEventListener("scroll", parallax, false);
// Explanation:
// - pageYOffset - pixels the current document has been scrolled from upper left corner of window vertically
// - negative pageYOffset so the layers go up
// - we used photoshop to have the two layers for our background here
// - Add an event listener that works when a user scrolls the website
// ########################################################################################################
// Text Animation
// Source: https://www.youtube.com/watch?v=QZpZ1zRcR6c
$(function(){
setTimeout(function(){
$(".fly-in-text").removeClass("hidden");
}, 400);
})();
// Explanation:
// - has a $-sign because we use jquery for the 'animation'
// - remove class from fly-in-text
// - setTimeout() method calls a function or evaluates an expression after 400 milliseconds
This Pen doesn't use any external CSS resources.