-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublications.html
More file actions
67 lines (64 loc) · 2.94 KB
/
Copy pathpublications.html
File metadata and controls
67 lines (64 loc) · 2.94 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Publications — Kevin P. Murphy</title>
<meta name="description" content="Publications of Kevin Patrick Murphy.">
<link rel="stylesheet" href="style.css">
</head>
<body>
<p class="backlink"><a href="index.html">← Kevin P. Murphy</a></p>
<section id="pubs" aria-labelledby="pubs-h">
<div class="pubs-head">
<h1 id="pubs-h">Publications</h1>
<p class="count" id="pubcount"></p>
<p class="legend"><span class="mark peer">★</span> peer-reviewed ·
<span class="mark other">+</span> other. Full, always-current list on
<a href="https://scholar.google.com/citations?user=MxxZkEcAAAAJ&hl=en">Google Scholar</a>.</p>
</div>
<div id="pub-list"></div>
</section>
<footer>
<p>To add a paper, edit <code>publications.js</code> in
<a href="https://github.com/murphyk/murphyk.github.io">the repo</a>.</p>
</footer>
<script src="publications.js"></script>
<script>
(function () {
var pubs = (window.PUBLICATIONS || []).slice().sort(function (a, b) { return b.year - a.year; });
var nPeer = pubs.filter(function (p) { return p.peer; }).length, nOther = pubs.length - nPeer;
document.getElementById('pubcount').textContent =
nPeer + ' peer-reviewed, ' + nOther + ' other (' + pubs.length + ' total).';
var root = document.getElementById('pub-list');
var esc = function (s) { return String(s).replace(/[&<>"]/g, function (c) {
return { '&': '&', '<': '<', '>': '>', '"': '"' }[c]; }); };
var me = /(Kevin\s+(Patrick\s+|P\.?\s+)?Murphy)/g; // bold my own name in the author list
var curYear = null, list = null;
pubs.forEach(function (p) {
if (p.year !== curYear) {
curYear = p.year;
var h = document.createElement('h3'); h.className = 'year'; h.textContent = p.year; root.appendChild(h);
list = document.createElement('ul'); list.className = 'year-list'; root.appendChild(list);
}
var authors = esc(p.authors || '').replace(me, '<b>$1</b>');
var li = document.createElement('li'); li.className = 'pub ' + (p.peer ? 'peer' : 'other');
li.innerHTML =
'<span class="mark ' + (p.peer ? 'peer' : 'other') + '" title="' + (p.peer ? 'peer-reviewed' : 'other') + '">'
+ (p.peer ? '★' : '+') + '</span>'
+ '<span class="pub-body">'
+ '<a class="title" href="' + esc(p.url) + '">' + esc(p.title) + '</a>'
+ (authors ? '<span class="authors">' + authors + '</span>' : '')
+ (p.venue ? '<span class="venue">' + esc(p.venue) + '</span>' : '')
+ (p.links && p.links.length
? '<span class="links">' + p.links.map(function (l) {
return '<a class="artefact" href="' + esc(l.url) + '">' + esc(l.label) + '</a>';
}).join('') + '</span>'
: '')
+ '</span>';
list.appendChild(li);
});
})();
</script>
</body>
</html>