forked from double-speak/doublespeak.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontentindex.html
More file actions
139 lines (132 loc) · 4.85 KB
/
contentindex.html
File metadata and controls
139 lines (132 loc) · 4.85 KB
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
---
layout: default
---
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="{{site.baseurl}}/assets/css/indexstyle.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<title>index</title>
<body>
{% include navbar.html %}
<div class="index">
<h1>index</h1>
<p class="index-p">Here, you can find an index of all the authors, translators, and languages featured so far in <em>DoubleSpeak</em>.</p>
<div class="dropdown">
<button class="dropdown" onclick="myFunction(1)">authors ⌄</button>
<div class="dropdown-content" id="dropdown1">
<ul class="content-u">
{% assign authors = '' | split: ", " %}
{% for issues_hash in site.data.issues %}
{% assign issues = issues_hash[1] %}
{% for poem in issues %}
{% if poem.pagetype == "submission" or poem.pagetype == "musing" or poem.pagetype == "frontmatter" %}
{% assign poem_authors = poem.author | split: '; ' %}
{% for indiv_author in poem_authors %}
{% assign authors = authors | push: indiv_author %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% assign sortedAuthors = authors | sort | uniq %}
{% for aut in sortedAuthors %}
<li class="content-l"><a href="{{site.baseurl}}/author_tags/{{aut | slugify: 'latin' | replace: '-','_' }}">{{ aut }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<br>
<div class="dropdown">
<button class="dropdown" onclick="myFunction(2)">translators ⌄</button>
<div class="dropdown-content" id="dropdown2">
<ul class="content-u">
{% assign translators = '' | split: ", " %}
{% for issues_hash in site.data.issues %}
{% assign issues = issues_hash[1] %}
{% for poem in issues %}
{% if poem.pagetype == "submission" %}
{% assign poem_translators = poem.translator | split: '; ' %}
{% for indiv_translator in poem_translators %}
{% assign translators = translators | push: indiv_translator %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% assign sortedtranslators = translators | sort | uniq %}
{% for trans in sortedtranslators %}
<li class="content-l"><a href="{{site.baseurl}}/translator_tags/{{trans | slugify: 'latin' | replace: '-','_' }}">{{trans}}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
<br>
<div class="dropdown">
<button class="dropdown" onclick="myFunction(3)">languages ⌄</button>
<div class="dropdown-content" id="dropdown3">
<div class="language">
<ul class="language-u">
{% assign languages = '' | split: "; " %}
{% for issues_hash in site.data.issues %}
{% assign issues = issues_hash[1] %}
{% for poem in issues %}
{% if poem.pagetype == 'submission' or poem.pagetype == 'musing' %}
{% assign poem_languages = poem.language | split: '; ' %}
{% for indiv_language in poem_languages %}
{% assign languages = languages | push: indiv_language %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% assign sortedlanguages = languages | sort | uniq %}
{% for lang in sortedlanguages %}
<li class="language-l"><a href="{{site.baseurl}}/language_tags/{{lang | slugify: 'latin' | replace: '-','_'}}">{{lang}}</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
<br>
</div>
<!-- so the dropdowns work! the only thing is that now the buttons close if you click anywhere EXCEPT the button, but it would be nice to have the button close when you click on it again -->
<script>
let closeDropdown = function() {
}
function myFunction(num) {
closeDropdown();
let el = document.getElementById("dropdown" + num);
if (el) {
el.classList.toggle("show");
closeDropdown = function() {
el.classList.remove("show");
}
} else {
closeDropdown = function() {
}
}
}
window.onclick = function(event) {
if (!event.target.matches('.dropdown')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</body>
<style>
.tcontents {
background-image: url('{{site.baseurl}}/assets/images/background_logo_ds.png');
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
<html>