forked from acl-org/acl-anthology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
157 lines (149 loc) · 7.03 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
{{ define "javascript" }}
<script>
// Makes the header expand to the width of the (fluid) main container
$(function () {
var resize_navbar = function() {
var width = 0;
$('#main-container .col-12').each(function() {
width += $(this).width();
});
$("#navbar-container").css("max-width", width);
};
$(window).resize(resize_navbar);
resize_navbar();
})
</script>
{{ end }}
{{ define "main" }}
<div class="row justify-content-center">
{{ $.Scratch.Set "paper_count" 0 }}
{{ range $.Site.Data.papers }}
{{ $.Scratch.Add "paper_count" (len .) }}
{{ end }}
<div class="col-12 col-xl-2">
<h2 class="pl-2 pb-2">Welcome to the ACL Anthology!</h2>
<aside class="card acl-greeting font-weight-light mb-3">
<div class="card-body">
The ACL Anthology currently hosts {{ $.Scratch.Get "paper_count" }} papers on the study of computational linguistics and natural language processing.
</div>
<div class="card-body">
<a href="http://groups.google.com/group/acl-anthology?hl=en">Subscribe to the mailing list</a> to receive announcements and updates to the Anthology.
</div>
</aside>
<!-- 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><div class="col-12 col-xl-10 col-xl-width-auto">
<main aria-role="main">
<h6>ACL Events</h6>
{{/* ACL EVENTS */}}
{{/* Hardcoded range of years because the table layout depends on it */}}
{{/* Adjust this range at the beginning of each year */}}
{{ $all_years := seq 2022 -1 1974 }}
{{/* Years that should have a border on their left-hand side */}}
{{ $border_years := slice "2022" "2019" "2009" "1999" "1989" }}
<table class="table table-hover table-sm table-responsive small text-nowrap">
<thead>
<tr class="text-center border-left border-right">
<th class="border-left" scope="col" style="width: 8rem;">Venue</th>
<!-- Each year, adjust this line, changing the date and incrementing colspan -->
<th class="border-left" scope="col" colspan="3">2022 – 2020</th>
<th class="border-left" scope="col" colspan="10">2019 – 2010</th>
<th class="border-left" scope="col" colspan="10">2009 – 2000</th>
<th class="border-left" scope="col" colspan="10">1999 – 1990</th>
<th class="border-left" scope="col" colspan="16">1989 and older</th>
</tr>
</thead>
<tbody class="border-bottom">
{{ range $venue := sort $.Site.Data.venues "slug" "asc" }}
{{ if (and $venue.is_toplevel $venue.is_acl) }}
<tr class="text-center border-left border-right">
{{ $venue_page := $.Site.GetPage (printf "/venues/%s.md" $venue.slug) }}
{{ $acronym := index $venue_page.Params "venue" }}
<th scope="row"><a href="{{ $venue_page.RelPermalink }}">{{ $acronym }}</a></th>
{{ range $all_years }}
{{ $year := string . }}
{{/* this is the actual default case */}}
<td class="{{ cond (in $border_years $year) "border-left" "" }}">
{{- with index $venue "volumes_by_year" $year -}}
<a href="{{ relref $ (printf "/events/%s-%s.md" $venue.slug $year) }}">{{ slicestr $year 2 4 }}</a>
{{- end -}}
</td>
{{ end }}
</tr>
{{ end }}
{{ end }}
{{/* SIGs */}}
<tr class="text-center border-left border-right">
<th scope="row">SIGs</th>
<td class="border-left" colspan="{{ len $all_years }}">
{{ $sig_pages := (where $.Site.RegularPages "Section" "sigs").ByParam "short_acronym" }}
{{ $len := len $sig_pages }}
{{ range $index, $page := $sig_pages}}
<a href="{{ $page.RelPermalink }}">{{ $page.Params.short_acronym }}</a>{{ if ne (add $index 1) $len }} | {{ end }}
{{ end }}
</td>
</tr>
</tbody>
</table>
<h6>Non-ACL Events</h6>
{{/* NON-ACL EVENTS */}}
{{/* Hardcoded range of years because the table layout depends on it */}}
{{/* Adjust this range at the beginning of each year */}}
{{ $all_years := seq 2022 -1 1986 | append (slice 1984 1982 1980 1978 1975 1973 1969 1967 1965) }}
{{/* Years that should have a border on their left-hand side */}}
{{ $border_years := slice "2022" "2019" "2009" "1999" "1989" }}
<table class="table table-hover table-sm table-responsive small text-nowrap">
<thead>
<tr class="text-center border-left border-right">
<th class="border-left" scope="col" style="width: 8rem;">Venue</th>
<!-- Each year, adjust this line, changing the date and incrementing colspan -->
<th class="border-left" scope="col" colspan="3">2022 – 2020</th>
<th class="border-left" scope="col" colspan="10">2019 – 2010</th>
<th class="border-left" scope="col" colspan="10">2009 – 2000</th>
<th class="border-left" scope="col" colspan="10">1999 – 1990</th>
<th class="border-left" scope="col" colspan="13">1989 and older</th>
</tr>
</thead>
<tbody class="border-bottom">
{{ range $venue := sort $.Site.Data.venues "slug" "asc" }}
{{ if (and $venue.is_toplevel (not $venue.is_acl)) }}
<tr class="text-center border-left border-right">
{{ $venue_page := $.Site.GetPage (printf "/venues/%s.md" $venue.slug) }}
{{ $acronym := index $venue_page.Params "venue" }}
<th scope="row"><a href="{{ $venue_page.RelPermalink }}">{{ $acronym }}</a></th>
{{ range $all_years }}
{{ $year := string . }}
<td class="{{ cond (in $border_years $year) "border-left" "" }}">
{{ with index $venue "volumes_by_year" $year }}
<a href="{{ relref $ (printf "/events/%s-%s.md" $venue.slug $year) }}">
{{- slicestr $year 2 4 -}}
</a>
{{ end }}</td>
{{ end }}
</tr>
{{ end }}
{{ end }}
</tbody>
</table>
</main>
</div>
</div>
{{ end }}