-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
161 lines (159 loc) · 3.71 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/fork-awesome.min.css" integrity="sha256-gsmEoJAws/Kd3CjuOQzLie5Q3yshhvmo7YNtBG7aaEY=" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=0">
<title>Želim FRI Urnik</title>
<meta name="description" content="Iskalica za urnik na Fakulteti za računalništvo in informatiko.">
<style>
body{
font-family: 'Nunito', sans-serif;
display: flex;
padding: 0;
margin: 0;
overflow: hidden;
}
.sidebar {
padding:1vw;
padding-top: 0rem;
background-color: #B4172D;
color: white;
width: 18vw;
height:100vh;
border-right: 5px solid white;
}
.sidebar hr{
border: 1px solid white;
}
.inputgroup{
display: flex;
flex-direction: column;
}
.sidebar input {
font-family: 'Nunito', sans-serif;
border: none;
margin: none;
margin-bottom: 4px;
background-color: #961327;
color: white;
font-weight: bold;
padding: none;
padding-top:.4rem;
padding-bottom:.4rem;
padding-left: .5rem;
padding-right: .5rem;
}
.sidebar input::placeholder{
color: whitesmoke;
}
.sidebar button {
font-family: 'Nunito', sans-serif;
border: none;
background-color: #961327;
color:white;
padding: .5rem;
align-self:center;
cursor: pointer;
margin-bottom: 2px;
transition: 0.1s;
width: 100%;
}
.inputgroup div{
display: flex;
width: 100%;
flex-wrap: wrap;
}
.sidebar button:hover {
background-color: #da1835;
}
iframe {
display:block;
position: absolute;
left: 20vw;
width: 80vw;
height: 100%;
border: none;
}
h1{
line-height: 0.5em;
}
h1 i {
line-height: 0.5em;
}
img {
width: 10vw;
}
@media only screen and (max-width: 1200px) {
body{
flex-direction: column;
overflow-x: scroll;
overflow-y: hidden;
}
.sidebar {
width: 98vw !important;
height: auto !important;
overflow-y: hidden;
padding-bottom: 0;
}
iframe {
overflow-y: hidden;
width: 100vw !important;
height: 100vh;
left: 0;
}
h3 {
font-size: 1em;
}
img {
visibility: collapse;
}
}
</style>
</head>
<body>
<div class="sidebar">
<h1><i class="fa fa-calendar" aria-hidden="true"></i> zelimUrnik.xyz</h1>
<hr>
<h3>Iščeš svoj urnik, a ga ne najdeš?<br>Spodaj vnesi svojo vpisno številko in preusmerjen boš na personaliziran urnik.</h3>
<hr>
<div class="inputgroup">
<input type="text" id="vpisna" name="vpisna" placeholder="Vnesi vpisno...">
<div>
<button onClick="redirect()">Odpelji me na urnik</button>
<button onClick="openNew()">Odpri urnik v novem oknu</button>
</div>
</div>
<hr>
<img src="fri.png"/>
</div>
<div class="body">
<iframe src="https://urnik.fri.uni-lj.si" title="description" id="if"></iframe>
</div>
</body>
<script>
let baseurl;
getUrl();
async function getUrl() {
baseurl = await fetch("https://urnik.fri.uni-lj.si/").then(r => r.url)
}
function redirect() {
const k = document.getElementById("vpisna").value;
if (k.length===0) {
document.getElementById("if").src="https://urnik.fri.uni-lj.si";
return;
}
const newSrc = `${baseurl}/allocations?student=${k}`
document.getElementById("if").src = newSrc;
}
function openNew() {
const k = document.getElementById("vpisna").value;
if (k.length===0) {
return;
}
const newSrc = `${baseurl}/allocations?student=${k}`
var tab = window.open(newSrc, '_blank');
tab.focus();
}
</script>
</html>