forked from HenningJ99/henningj99.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
197 lines (176 loc) · 8.37 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<title>AIfA Telescope Gallery</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link href="css/styles.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;900&family=Ubuntu&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/eff61f70a8.js" crossorigin="anonymous"></script>
<script src="js/script.js"></script>
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
}
};
</script>
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
</script>
<script>
function includeCards() {
var z, i, elmnt, file, xhttp;
/*loop through a collection of all HTML elements:*/
z = document.getElementsByTagName("*");
for (i = 0; i < z.length; i++) {
elmnt = z[i];
/*search for elements with a certain atrribute:*/
file = elmnt.getAttribute("w3-include-html");
if (file) {
/*make an HTTP request using the attribute value as the file name:*/
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
/*remove the attribute, and call this function once more:*/
elmnt.removeAttribute("w3-include-html");
includeCards();
}
}
xhttp.open("GET", file, true);
xhttp.send();
/*exit the function:*/
return;
}
}
};
</script>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<div class="container-fluid">
<div class="px-lg-5">
<div class="row pt-5 pb-2">
<div class="col-lg-12 mx-auto">
<div class="text-white p-5 shadow-sm rounded banner">
<div class="row">
<div class="col-lg-6 col-sm-12">
<h1 class="display-4">
AIfA Telescope Gallery
</h1>
<p class="lead">Selected results from the AIfA rooftop telescope</p>
<p class="small"> All content is released under <a href="https://creativecommons.org/licenses/by-sa/4.0/"> CC BY-SA 4.0 </a></p>
</div>
<div class="col-lg-6 col-sm-12">
<img class="img-fluid" id="logo-top" src="images/aifa_logo_white.svg" width="300px">
</div>
</div>
</div>
</div>
</div>
<nav class="navbar navbar-dark rounded mb-2" style="background-color: #6ca6c1;">
<div class="container-fluid">
<div class = "row mx-auto">
<div class="col-sm-6 my-sm-0 mb-2">
<select class="selectpicker form-select" aria-label="Default select example">
<option selected>Search by</option>
<option value="1">Object name</option>
<option value="2">Author</option>
<option value="3">Category</option>
<option value="4">Date</option>
</select>
</div>
<div class="col-6 mx-auto mx-sm-0">
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" id="search">
</form>
</div>
</div>
</div>
</nav>
<div class="row" id="gallery">
<!-- INCLUDE YOUR CARDS BELOW, newest on the top -->
<div w3-include-html="cards/2024-09-18_transit_HATP51b/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/Gain_2024-09-06/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/2024-08-27_transit_HATP23b/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/M27_2024-08-27/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/2024-04-21_transit_WASP104b/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/Moon_2024-03-14/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/M37_2024-03-08/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/Owl_Andres/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/Transit_Bruno_Havesh/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/M13_Henning/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/M51_Henning/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/M82_Henning_Kathrin/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/Abell39_Alex/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/Jupiter_20140309_Malte/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/M16_2013_Alex/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<div w3-include-html="cards/SN2011E_Alex/card.html" class="single-card col-xl-3 col-lg-4 col-md-6 mb-4"></div>
<script>
includeCards();
</script>
</div>
</div>
</div>
<script>
var input_divs = document.querySelectorAll('[w3-include-html]')
// this checks if all divs are successfully implemented and then adds the event listener
function checkFlag() {
if(document.getElementsByClassName("collapsible").length < input_divs.length) {
window.setTimeout(checkFlag, 100); /* this checks the flag every 100 milliseconds*/
} else {
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
};
}
}
checkFlag();
// this overrides `contains` to make it case insenstive
jQuery.expr[':'].contains = function(a, i, m) {
return jQuery(a).text().toUpperCase()
.indexOf(m[3].toUpperCase()) >= 0;
};
var selectedItem = 0;
$('.selectpicker').change(function () {
selectedItem = $('.selectpicker').val();
document.getElementById("demo").innerHTML = selectedItem;
});
$('#search').on("input", function(){
$('.single-card').removeClass('d-none');
var filter = $(this).val(); // get the value of the input, which we filter on
if (filter) {
if (selectedItem == 1) {
$('#gallery').find('.single-card .single-card-rounded .single-card-body h5:not(:contains("'+filter+'"))').
parent().parent().parent().parent().addClass('d-none');}
else if (selectedItem == 2) {
$('#gallery').find('.single-card .single-card-rounded .single-card-body .credit:not(:contains("'+filter+'"))').
parent().parent().parent().parent().addClass('d-none');}
else if (selectedItem == 3) {
$('#gallery').find('.single-card .single-card-rounded .single-card-body .category:not(:contains("'+filter+'"))').
parent().parent().parent().parent().addClass('d-none');}
else if (selectedItem == 4) {
$('#gallery').find('.single-card .single-card-rounded .single-card-body .date:not(:contains("'+filter+'"))').
parent().parent().parent().parent().addClass('d-none');}
};
})
</script>
</body>
</html>