-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (113 loc) · 3.16 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Workshopy</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
body {
padding-top: 80px;
}
.navbar {
background: #fdfdfd;
height: 80px;
}
.navbar-header {
padding: 5px;
}
.logo img {
width: 120px;
height: 63px;
}
.title {
background: #df98af;
padding-bottom: 20px;
}
.filter {
padding: 10px 0;
}
.cell-title {
font-weight: bold;
margin-bottom: 5px;
}
</style>
</head>
<body>
<header class="navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="logo" href="http://www.ajtyvit.sk/">
<img src="assets/logo.jpg">
</a>
</div>
</div>
</header>
<div class="title">
<div class="container ">
<h1>Ponúkané IT workshopy pre dievčatá</h1>
<div class="filter">
<label for="region">Dostupnosť pre okres: </label>
<select id="region" class="form-control">
<option>--- vyberte okres ---</option>
</select>
</div>
</div>
</div>
<div class="container-fluid">
<table id="workshopList" class="table">
<thead>
<tr>
<th>#</th>
<th width="100px"></th>
<th width="35%">Workshop</th>
<th width="35%">Lektor</th>
<th>Časové rozmedzie</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="assets/filter.js"></script>
<script>
$(function () {
$.getJSON('data/workshops.json', function (data) {
Filter.workshops = data;
Filter.getAllRegions().forEach(function (region) {
$('#region')
.append($('<option>')
.attr('value', region)
.text(region)
);
});
$('#region').on('change', function () {
var region = $(this).val();
var filteredWorkshops = Filter.filterByRegion(region);
$('#workshopList').find('tbody').empty();
filteredWorkshops.forEach(function (workshop, index) {
var workshopItem = $('<tr>')
.append($('<td>').text(index + 1))
.append($('<td>').append(
$('<a>').text('Mám záujem')
.attr('href', Filter.getRequestFormURL(workshop))
.attr('target', '_blank')
))
.append($('<td>')
.append($('<div class="cell-title">').text(workshop.name))
.append($('<div>').text(workshop.description))
)
.append($('<td>')
.append($('<div class="cell-title">').text(workshop.lecturer.name))
.append($('<div>').text(workshop.lecturer.role))
)
.append($('<td>').text(workshop.timeFrame));
$('#workshopList').find('tbody').append(workshopItem);
});
});
});
});
</script>
</body>
</html>