-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
209 lines (178 loc) · 10.4 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
198
199
200
201
202
203
204
205
206
207
208
209
{{ define "main" }}
{{ $universities := dict "uni0001" "University of Saskatchewan" "uni0002" "University of Waterloo" "uni0003" "McMaster University" "uni0004" "Environment and Climate Change Canada" "uni0005" "University of Guelph" "uni0006" "Global Institute for Water Security" "uni0007" "Wilfrid Laurier University" "uni0008" "University of Toronto" "uni0009" "University of Alberta" "uni0010" "Wageningen University & Research" "uni0011" "University of Calgary" "uni0012" "Jet Propulsion Lab" "uni0013" "University of Manitoba" "uni0014" "United States Geological Survey" "uni0015" "Universität Innsbruck" "uni0016" "Lawrence Berkeley National Laboratory" "uni0017" "University of Michigan–Ann Arbor" "uni0018" "University of Washington" "uni0019" "Agriculture and Agriculture-Food Canada" "uni0020" "Natural Resources Canada" "uni0021" "University of California, Berkeley" "uni0022" "University of Arizona" "uni0023" "University of Quebec at Montreal" "uni0024" "University of Alaska Fairbanks" "uni0025" "Max Planck Institute for Biogeochemistry" "uni0026" "University of Ottawa" "uni0027" "University of Helsinki" "uni0028" "Goddard Space Flight Center" "uni0029" "University of British Columbia" "uni0030" "Finnish Meteorological Institute" "uni0031" "University of Nebraska–Lincoln" "uni0032" "University of Victoria" "uni0033" "National Center for Atmospheric Research" "uni0034" "University of Exeter" "uni0035" "University of Montreal" "uni0036" "University of California, Los Angeles" "uni0037" "University of Chinese Academy of Sciences" "uni0038" "Stanford University" "uni0039" "Swiss Federal Institute for Forest, Snow and Landscape Research" "uni0040" "ETH Zurich" "uni0041" "Université Laval" "uni0042" "Oak Ridge National Laboratory" "uni0043" "UK Centre for Ecology & Hydrology" "uni0044" "McGill University" "uni0045" "Utrecht University" "uni0046" "University of Melbourne" "uni0047" "Météo-France" "uni0048" "Lund University" "uni0049" "Swedish University of Agricultural Sciences" "uni0050" "Northern Arizona University"}}
<button onclick="goTopFunction()" id="topBtn" title="Go to top"><i class="arrowup"></i></button>
<div class="row">
<div class="col-lg-3">
<div class="row">
<div class="col-12 col-md-6 col-lg-12">
<div class="card my-2 my-md-0 my-lg-2">
<h5 class="card-header card-header-custom" href="#year_list" data-toggle="collapse" aria-expanded="false" aria-controls="year_list">Year</h5>
<ul class="list-group list-group-flush list-group-compact collapse abstract-collapse" id="year_list">
<li class="list-group-item"><div class="badge badge-secondary clear-widget" onclick="clearAll('year')">Clear All</div></li>
{{ range $key_year, $paper_year := sort $.Site.Data.venues.GWF.years "value" "desc" }}
<li class="list-group-item">
<input type="checkbox" id={{ print "check_year_" $paper_year }} checked=True/>
{{ $paper_year }}
</li>
{{ end }}
</ul>
</div>
</div>
<!-- <div class="col-12 col-md-6 col-lg-12">
<div class="card my-2 my-md-0 my-lg-2">
<h5 class="card-header card-header-custom" href="#university_list" data-toggle="collapse" aria-expanded="false" aria-controls="university_list">University</h5>
<ul class="list-group list-group-flush list-group-compact collapse abstract-collapse" id="university_list">
<li class="list-group-item"><div class="badge badge-secondary clear-widget" onclick="clearAll('uni')">Clear All</div></li>
{{ range $abbr_uni, $uni := $universities }}
<li class="list-group-item">
<input type="checkbox" id={{ print "uni_" $abbr_uni }} checked=True/>
{{ $uni }}
</li>
{{ end }}
</ul>
</div>
</div>
<div class="col-12 col-md-6 col-lg-12">
<div class="card my-2 my-md-0 my-lg-2">
<h5 class="card-header card-header-custom" href="#project_list" data-toggle="collapse" aria-expanded="false" aria-controls="project_list">Project</h5>
<ul class="list-group list-group-flush list-group-compact collapse abstract-collapse" id="project_list">
<li class="list-group-item"><div class="badge badge-secondary clear-widget" onclick="clearAll('prj')">Clear All</div></li>
{{ $projects := dict "prj1" "What is Water Worth? Valuing Canada's Water Resources and Aquatic Ecosystem Services Publications" "prj2" "Paradigm Shift in Downscaling Climate Model Projections Publications" "prj3" "Short-Duration Extreme Precipitation in Future Climate Publications" "prj4" "Winter Soil Processes in Transition Publications" "prj5" "Collaborative Modelling Framework for Water Futures Publications" "prj6" "Others" }}
{{ range $abbr_prj, $prj := $projects }}
<li class="list-group-item">
<input type="checkbox" id={{ print "prj_" $abbr_prj }} checked=True/>
{{ $prj }}
</li>
{{ end }}
</ul>
</div>
</div> -->
</div>
</div>
<div class="col-lg-9">
<div class="py-4">
{{ $.Scratch.Set "paper_count" 0 }}
{{ range $.Site.Data.papers }}
{{ $.Scratch.Add "paper_count" (len .) }}
{{ end }}
<h2 class="pl-2 pb-2">Welcome to the GWF Thesis Archive!</h2>
<aside class="card acl-greeting font-weight-light mb-3">
<div class="card-body">
This archive currently hosts {{ $.Scratch.Get "paper_count" }} Thesis from the <a
href="https://gwf.usask.ca/">Global Water Futures</a> research program.<br>
<!-- Check out a co-authorship graph of GWF researchers <a
href="https://gwf-uwaterloo.github.io/gwf-publications-old/index.html">here</a>. -->
</div>
</aside>
<div>
{{ range $key_year, $paper_year := sort $.Site.Data.venues.GWF.years "value" "desc" }}
<a class="align-middle" href={{ print "#year_" $paper_year }}>{{ $paper_year }}</a>  | 
{{ end }}
</div>
<!-- Temporarily disabled...
<aside class="alert alert-info acl-news mb-3" role="alert">
// The news message pulls from content/_index.md
{{ if (gt (time .PublishDate).Year 2018) }}
<div class="acl-news-date">{{ .PublishDate.Format "January 2006" }}</div>
{{ end }}
{{ .Content }}
</aside>
-->
<!-- <div class="row mb-3">
{{/* if (fileExists "/data-export/anthology.bib.gz") */}}
<div class="col-6 col-xl-12 mb-2">
<a class="btn btn-block btn-info" href="{{/* "/anthology.bib.gz" | relURL */}}">Full Anthology as BibTeX ({{/* printf "%.2f MB" (div (os.Stat "/data-export/anthology.bib.gz").Size 1000000.0) */}})</a>
<a class="btn btn-block btn-info" href="{{/* "/anthology+abstracts.bib.gz" | relURL */}}">…with abstracts ({{/* printf "%.2f MB" (div (os.Stat "/data-export/anthology+abstracts.bib.gz").Size 1000000.0) */}})</a>
</div>
{{/* end */}}
<div class="col-6 col-xl-12 mb-2">
<a class="btn btn-block btn-warning" href="{{/* ($.Site.GetPage "/faq/feedback.md").RelPermalink */}}">Give feedback</a>
</div>
</div> -->
</div>
<section id="main">
{{ $venue := index .Site.Data.venues "GWF" }}
{{ range $key_year, $paper_year := sort $.Site.Data.venues.GWF.years "value" "desc" }}
{{ $div_id := print "year_" $paper_year }}
<div id={{ $div_id }}>
<hr />
<h2 id="title">
{{ $paper_year }}
</h2>
{{ $volumes := index $venue "volumes_by_year" $paper_year }}
{{/* Check if any of the volumes associated with this event have abstracts */}}
{{ $with_abstracts := 0 }}
{{ range $volumes }}
{{ $volume := index $.Site.Data.volumes . }}
{{ if $volume.has_abstracts }}
{{ $with_abstracts = add $with_abstracts 1 }}
{{ end }}
{{ end }}
{{ range $volumes }}
{{ $volume := index $.Site.Data.volumes . }}
<div id="{{ . | anchorize }}">
{{ range $volume.papers }}
{{ $page := printf "/papers/%s/%s.md" (index (split . "-") 0) . }}
{{ ($.Site.GetPage $page).Render "list-entry-author" }}
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
</section>
</div>
<script>
// initialzie all the checkboxes in the unchecked state
$( ':input[id^="check_year_"]' ).prop('checked', false);
$("#year_list li:first-child").prop('style', "display:none !important");
$( ':input[id^="uni_"]' ).prop('checked', false);
$("#university_list li:first-child").prop('style', "display:none !important");
$( ':input[id^="prj_"]' ).prop('checked', false);
$("#project_list li:first-child").prop('style', "display:none !important");
</script>
<script>
// this script is for handling the url filters
// get the content of the search query (prj,uni,year)
const searchArr = window.location.search.substring(1).split("&");
for (var i = 0; i < searchArr.length; i++) {
if(searchArr[i].startsWith("prj")){
var prjArr = searchArr[i].split("=")[1].split("+")
}if(searchArr[i].startsWith("uni")){
// fill later
}if(searchArr[i].startsWith("uni")){
// fill later
}
}
if(typeof prjArr !== 'undefined'){
$( '[data-prj]' ).prop('style', "display:none !important");
$( ':input[id^="prj"]' ).prop('checked', false);
for (var i = 0; i < prjArr.length; i++) {
$( '[data-prj=prj'+prjArr[i]+']' ).prop('style', "display:initial !important");
$( ':input[id="prj_prj'+prjArr[i]+'"]' ).prop('checked', true);
}
}
</script>
<script>
// Get the button
let topbutton = document.getElementById("topBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollBtnFunction()};
function scrollBtnFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
topbutton.style.display = "block";
} else {
topbutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function goTopFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
insts = $('a[data-uni]');
for (var i=0;i<insts.length;i++){
unis[insts[i].dataset.uni] = true;
}
</script>
</div>
{{ end }}