mirror of
https://github.com/wassname/template.git
synced 2026-06-27 19:17:15 +08:00
Adding diff link
This commit is contained in:
@@ -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 + ".";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Vendored
+4
-1
@@ -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 + ".";
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user