Adding diff link

This commit is contained in:
Shan Carter
2017-02-08 11:45:20 -08:00
parent 97acdc60d6
commit 8162b8ea2d
4 changed files with 9 additions and 3 deletions
+4
View File
@@ -70,6 +70,10 @@ export default function(dom, data) {
div.innerHTML = oldHtml + div.innerHTML;
if (data.githubCompareUpdatesUrl) {
div.innerHTML = `<h3>Updates</h3><p><a href="${data.githubCompareUpdatesUrl}">View changes</a> since article was first published.</p>` + div.innerHTML;
}
el.querySelector("a.github").setAttribute("href", data.githubUrl);
el.querySelector("a.github-issue").setAttribute("href", data.githubUrl + "/issues/new");
el.querySelector(".citation.short").textContent = data.concatenatedAuthors + ", " + '"' + data.title + '", Distill, ' + data.publishedYear + ".";
-1
View File
@@ -13,7 +13,6 @@ export default function(dom, data) {
data.journal = data.journal || {};
// Dates
// TODO: fix updated date
if (data.publishedDate){//} && data.journal) {
data.volume = data.publishedDate.getFullYear() - 2015;
data.issue = data.publishedDate.getMonth() + 1;
+4 -1
View File
@@ -5100,7 +5100,6 @@ var expandData = function(dom, data) {
data.journal = data.journal || {};
// Dates
// TODO: fix updated date
if (data.publishedDate){//} && data.journal) {
data.volume = data.publishedDate.getFullYear() - 2015;
data.issue = data.publishedDate.getMonth() + 1;
@@ -5913,6 +5912,10 @@ var appendix = function(dom, data) {
div.innerHTML = oldHtml + div.innerHTML;
if (data.githubCompareUpdatesUrl) {
div.innerHTML = "<h3>Updates</h3><p><a href=\"" + (data.githubCompareUpdatesUrl) + "\">View changes</a> since article was first published.</p>" + div.innerHTML;
}
el.querySelector("a.github").setAttribute("href", data.githubUrl);
el.querySelector("a.github-issue").setAttribute("href", data.githubUrl + "/issues/new");
el.querySelector(".citation.short").textContent = data.concatenatedAuthors + ", " + '"' + data.title + '", Distill, ' + data.publishedYear + ".";
+1 -1
View File
File diff suppressed because one or more lines are too long