-
Notifications
You must be signed in to change notification settings - Fork 0
/
research.html
190 lines (162 loc) · 5.47 KB
/
research.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
<!DOCTYPE HTML>
<html lang='en'>
<head>
<title>SWF</title>
<link rel="icon" href="images/favicon.ico">
<!-- <link rel="icon" href="images/favicon.png"> -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- , user-scalable=no -->
<link rel="stylesheet" href="assets/css/main.css" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4L9XEBTBVZ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-4L9XEBTBVZ');
</script>
</head>
<body class="homepage is-preload">
<div id="page-wrapper">
<!-- Header -->
<!-- <header id="header">
<div class="logo container">
<div>
<h2><a href="index.html" id="logo"></a>SWF</h2>
</div>
</div>
</header> -->
<!-- Navbar -->
<nav id="nav"></nav>
<!-- Main -->
<section id="main">
<div class="research-container">
<div class="research-text">
<h2>Research</h2>
<p>The Secure Water Future team’s goal is to understand, enable, and envision water management strategies, empowered through data-enabled decision-making, for agricultural and ecological systems. The transdisciplinary team works with growers, irrigation districts, and ecosystem managers to adopt and adapt climate resilience strategies, train the next generation of transdisciplinary practitioners, and produce an online dashboard for data-driven decision-making.</p>
</div>
<div class="research-image">
</div>
</div>
<!-- <section id="research">
</section> -->
</section>
</div>
</section>
</div>
<!-- Footer -->
<footer id="footer"></footer>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.dropotron.min.js"></script>
<script src="assets/js/jquery.csv.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script>
$(function () {
$("#nav").load("includes/nav.html");
$("#footer").load("includes/footer.html");
});
</script>
<style>
/* Popup container - can be anything you want */
.popup {
position: relative;
display: inline-block;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* The actual popup */
.popup .popuptext {
visibility: hidden;
width: 100%;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
position: absolute;
z-index: 1;
top: 100%;
left: 0%;
}
/* Popup arrow */
/* Toggle this class - hide and show the popup */
.popup .show {
visibility: visible;
-webkit-animation: fadeIn 1s;
animation: fadeIn 1s;
}
/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
from {opacity: 0;}
to {opacity: 1;}
}
@keyframes fadeIn {
from {opacity: 0;}
to {opacity:1 ;}
}
</style>
<script>
$(function () {
$.get("/research.csv").then(function (text, status, xhr) {
var data = $.csv.toObjects(text);
for (var i = 0; i < data.length; i++){
let curr = data[i];
if(curr.Name == "" || curr.Citation == "" || curr.URL == ""){
continue;
}
var start = curr.Citation.indexOf(").");
var end = curr.Citation.indexOf('[');
if(start == -1 || end == -1){
continue;
}
console.log(start);
console.log(end);
var title = curr.Citation.substr(start + 3, end - start - 3);
console.log(curr.Citation.charAt(start + 3));
console.log(curr.Citation.charAt(end));
console.log(title);
$("#research").append(
$.parseHTML(
// '<a id =' + data[i].ID + '>'+
((window.innerWidth < 550) ? '<div style="display:inline-block;width:50%;height:25em;padding:4px;vertical-align:top;">' :
'<div style="display:inline-block;width:25%;height:25em;padding:4px;vertical-align:top;">') +
'<section class="box feature">' +
'<a class="image featured img-overlay popup" onclick="myFunction('+i+')")><img' +
((true) ? ' src="../images/defaultresearch.jpg" alt="" />' :
' src="../images/participants/' + data[i].Name + '.jpg" alt="" />') +
// ' src="images/participants/' + data[i].ID + '.jpg" alt="" />' +
(((data[i].URL).toString() === '') ? '' :
'<div ><p class="u-custom-scrollbar text popuptext" id="myPopup'+i+'">' + data[i].URL + '</p></div>') +
'</a>' +
'<h6>' + title +'</h6>' +
// '<h5>' + data[i].ROLE + '</h5>' +
'<h5>' + data[i].Name + '</h5>' +
'</section>' +
'</div>'
// + '</a>'
)
)
}
$("#research").append(
$.parseHTML(
'</section>'
)
);
});
});
</script>
<script>
function myFunction(index) {
var item = document.getElementById("myPopup"+index);
window.open(item.textContent);
}
</script>
</body>
</html>