-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.htm
92 lines (79 loc) · 3.76 KB
/
index.htm
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rhetorlist</title>
<meta name="viewport" content="initial-scale=1.0" />
<link href="css/tabulator.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.typekit.net/ubq1yoi.css">
<link rel="stylesheet" href="css/style.css?v=0.87">
<script src="js/moment.js"></script>
<script src="js/luxon.min.js"></script>
<script src="js/tabulator.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-9134554-3"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-9134554-3');
</script>
</head>
<body>
<section class="container">
<h1>Rhetorlist</h1>
<h2>Tracking new books in Rhetoric & Writing, Composition Studies, Technical Communication, and related disciplines.</h2>
<ul class="nav-links">
<li><a href="index.htm" class="current">Home</a></li>
<li><a href="about.htm">About this site</a></li>
<li><a href="submit.htm">Submit a book</a></li>
<li><a href="search.htm">Search Rhetorlist</a></li>
</ul>
<section class="table-container">
<h3 style="font-size: 135%; display: inline">Select a year:</h3>
<select id="yearSelector" style="display:inline;">
<option value="2024.json">2024</option>
<option value="2023.json">2023</option>
<option value="2022.json">2022</option>
<option value="2021.json">2021</option>
<option value="2020.json">2020</option>
<option value="2019.json">2019</option>
<option value="2018.json">2018</option>
</select>
<br />
<br />
<p class="mobile-headsup"><small><em>To filter data by all columns, please view the table in a desktop browser. Mobile browser sizes offer limited filtering.</em></small></p>
<div id="book-list"></div>
</section>
</section>
<footer>
<p>Email [email protected] with questions or comments about Rhetorlist. Use Rhetorlist's <a href="https://rhetorlist.net/feed.json">JSON Feed URL</a> to receive updates in your RSS reader of choice. (Need one? I recommend <a href="https://feedbin.com/">Feedbin</a>.) Want to make your own variation of Rhetorlist? The project source code is <a href="https://github.com/timlockridge/rhetorlist">available at Github.</a></p>
</footer>
<script>
var table = new Tabulator("#book-list", {
initialSort:[{column:"publicationDate", dir:"desc"}],
height:"100%",
layout:"fitColumns",
responsiveLayout:"collapse",
columns:[
{title:"Title", field:"title", minWidth: 300, headerFilter:true, formatter:"link", formatterParams:{urlField:"publisherURL",target:"_blank"}},
{title:"Author", field:"author", minWidth: 200, formatter:"textarea", headerFilter:"input"},
{title:"Publisher", field:"publisher", minWidth: 200, formatter:"textarea",headerFilter:"list", headerFilterFunc:"=", headerFilterParams:{valuesLookup:true, valuesLookupField:"publisher",sort:"asc"}},
{title:"Date", field:"publicationDate", minWidth: 100, sorter:"date",sorterParams:{format:"MM-dd-yyyy"}},
{title:"OA?", field:"openAccess", minWidth: 100, headerFilter:"list", headerFilterFunc:"=", headerFilterParams:{valuesLookup:true,valuesLookupField:"openAccess", sort:"desc"}}
],
});
table.on("tableBuilt", function(){
table.setData("2024.json");
});
// watch year selector and load json when new year is selected
document.getElementById("yearSelector").onchange = changeYear;
function changeYear(){
var value = this.value;
console.log(value);
table.setData(value);
}
</script>
</body>
</html>