Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework 6 update #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions hall.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<title>Grad Križevci</title>
<script src="main.js"></script>
</head>
<body>
<header>
<div class="header">
<h1 class="naslov">Rezervacija dvorana</h1>
<nav>
<a href="index.html" class="nav_links">Home</a>
<a href="#" class="nav_links">O nama</a>
<a href="#" class="nav_links">Dvorane</a>
<a href="register.html" class="nav_links">Registracija</a>

</nav>
</div>
</header>
<footer>
<h4>Grad Križevci</h4>
</footer>
</body>
</html>
9 changes: 9 additions & 0 deletions hover-min.css

Large diffs are not rendered by default.

52 changes: 30 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>Grad Križevci</title>
</head>
<body>
<header>
<h1>Rezervacija dvorana</h1>
<nav>
<a href="#">Home</a>
<a href="#">O nama</a>
<a href="register.html">Registracija</a>
</nav>
</header>

<img src="https://images.unsplash.com/photo-1497366754035-f200968a6e72?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" alt="office">

<footer>
<h4>Grad Križevci</h4>
</footer>
</body>
<!DOCTYPE html>
<html lang="ru">
<head>
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="hover-min.css">
<title>Grad Križevci</title>
</head>
<body>
<header>
<div class="header">
<h1 class="naslov">Rezervacija dvorana</h1>
<nav>
<a href="#" class="nav_links">Home</a>
<a href="#" class="nav_links">O nama</a>
<a href="hall.html" class="nav_links">Dvorane</a>
<a href="register.html" class="nav_links">Registracija</a>

</nav>
</div>
</header>

<div class="content">
</div>

<footer>
<h4>Grad Križevci</h4>
</footer>
</body>
</html>
45 changes: 45 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
var ID;
var name;
var isReserved;
var reservedFrom;
var reservedUntil;

var hall = {
ID,
name,
reservation: {
isReserved,
reservedFrom,
reservedUntil
}
};

let polje = new Array();

function add(ime){

hall.ID=polje.length+1;
hall.name = ime;
hall.reservation.isReserved = true;
hall.reservation.reservedFrom = Date.now();
hall.reservation.reservedUntil = null;
polje.push(hall);
}

function remove(id){
polje.splice(id,1);
}

function reservation(id, reservedFromInput, reservedUntilInput){
hall[id].reservation.isReserved = true;
hall[id].reservation.reservedFrom = reservedFromInput;
hall[id].reservation.reservedUntil = reservedUntilInput;
}

function checkReservation(id){
if (polje[id].reservation.ReservedUntil < Date.now() ){
polje[id].reservation.isReserved = false;
polje[id].reservation.reservedFrom= null;
polje[id].reservation.reservedUntil = null;
}
}
101 changes: 58 additions & 43 deletions register.html
Original file line number Diff line number Diff line change
@@ -1,44 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Registracija</title>
</head>
<body>
<header>
<h1>Rezervacija dvorana</h1>
<nav>
<a href="#">Home</a>
<a href="#">O nama</a>
<a href="register.html">Registracija</a>
</nav>
</header>

<form action="index.html" method="post">
<label for="username">Korisničko ime</label>
<input id="username" name="username" type="text" required>
<br>

<label for="password">Lozinka</label>
<input id="password" name="password" type="password" required>
<br>

<label for="firstName">Ime</label>
<input id="firstName" name="firstName" type="text">
<br>

<label for="lastName">Prezime</label>
<input id="lastName" name="lastName" type="text">
<br>

<input type="submit">
</form>

<footer>
<h4>Grad Križevci</h4>
</footer>

</body>
<!DOCTYPE html>
<html lang="ru">
<head>

<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>Registracija</title>
</head>
<body>
<header>
<div class="header">
<h1 class="naslov">Rezervacija dvorana</h1>
<nav>
<a href="index.html" class="nav_links">Home</a>
<a href="#" class="nav_links">O nama</a>
<a href="hall.html" class="nav_links">Dvorane</a>
<a href="#" class="nav_links">Registracija</a>

</nav>
</div>
</header>

<div class="form-section">
<form action="index.html" method="post">
<label for="username">Korisničko ime</label>
<input id="username" name="username" type="text" required>
<br>

<label for="password">Lozinka</label>
<input id="password" name="password" type="password" required>
<br>

<label for="firstName">Ime</label>
<input id="firstName" name="firstName" type="text">
<br>

<label for="lastName">Prezime</label>
<input id="lastName" name="lastName" type="text">
<br>

<button type="submit" class="button">Submit query</button>
</form>
</div>

<footer>
<h4>Grad Križevci</h4>
</footer>

</body>
<style>
body,html{
background: linear-gradient(to right, rgba(147,206,222,1) 0%, rgba(117,189,209,1) 41%, rgba(73,165,191,1) 100%);
}
</style>
</html>
155 changes: 114 additions & 41 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,114 @@
* {
margin: 0;
}

header {
background-color: #333;
}

h1 {
display: inline-block;
color: #fff;
font-size: 50px;
padding: 10px 20px;
}

nav {
float: right;
padding: 10px 20px;
}

a {
padding: 0 20px;
color: #fff;
text-decoration: none;
}

a:hover {
background-color: #5f5f5f;
}

img {
width: 100%;
}

footer {
padding-top: 30px;
color: white;
text-align: center;
height: 100px;
background-color: #333;
}
* {
margin: 0;
padding:0;
border:0;
font-family:'Ubuntu',sans-serif;
text-decoration: none;
list-style:none;
}

.header {
background: #333;
height:100px;
width:100%;
}

h1 {
display: inline-block;
color: #fff;
font-size: 50px;
margin-left:10px;
}

nav {
float: right;
height:100px;
}

a {
color: rgb(255, 255, 255);
margin-right:10px;
text-align:center;
position:relative;
top:35%;
font-size:12pt;
}

a:hover {
background-color: #5f5f5f;
}

img {
width: 100%;
height:auto;
}

footer {
position:absolute;
width:100%;
bottom:0;
padding-top: 30px;
color: white;
text-align: center;
height: 100px;
background-color: #333;
}

.nav_links{
height:100px;
}

.button{
margin-top:20px;
width:100%;
background:#eee;
border:2px solid gray;
border-radius:8px;
color:#111;
height:40px;
}

.form-section{
position:absolute;
top:25%;
transform:translateY(-25%);
left:50%;
transform:translateX(-50%);
width:400px;
height:400px;
}

label{

display:block;
}

input{
border-radius:8px;
height:30px;
width:100%;
}

body{
background-image:url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80");
background-repeat:no-repeat;
height:100%;
background-size:cover;
}

.naslov{
font-size:24pt;
position:relative;
top:25%;

}

.content{
width:100%;
height: calc(100% - 200px);
}

.navbar{
height:100px;
width:400px;
}