mirror of
https://github.com/wassname/template.git
synced 2026-07-16 11:22:25 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c75787615e | ||
|
|
c2ef8e38c3 | ||
|
|
bfcff784b1 | ||
|
|
000fa088db |
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "distill-template",
|
"name": "distill-template",
|
||||||
"version": "2.2.16",
|
"version": "2.2.17",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "distill-template",
|
"name": "distill-template",
|
||||||
"version": "2.2.16",
|
"version": "2.2.17",
|
||||||
"description": "Template for creating Distill articles.",
|
"description": "Template for creating Distill articles.",
|
||||||
"main": "dist/template.v2.js",
|
"main": "dist/template.v2.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
+13
-4
@@ -114,13 +114,22 @@ function doi_string(ent, new_line){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function title_string(ent) {
|
||||||
|
return '<span class="title">' + ent.title + '</span> ';
|
||||||
|
}
|
||||||
|
|
||||||
export function bibliography_cite(ent, fancy){
|
export function bibliography_cite(ent, fancy){
|
||||||
if (ent){
|
if (ent){
|
||||||
var cite = '<span class="title">' + ent.title + '</span> ';
|
var cite = title_string(ent);
|
||||||
cite += link_string(ent) + '<br>';
|
cite += link_string(ent) + '<br>';
|
||||||
cite += author_string(ent, '${L}, ${I}', ', ', ' and ');
|
if (ent.author) {
|
||||||
if (ent.year || ent.date){
|
cite += author_string(ent, '${L}, ${I}', ', ', ' and ');
|
||||||
cite += ', ' + (ent.year || ent.date) + '. ';
|
if (ent.year || ent.date) {
|
||||||
|
cite += ', ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ent.year || ent.date) {
|
||||||
|
cite += (ent.year || ent.date) + '. ';
|
||||||
} else {
|
} else {
|
||||||
cite += '. ';
|
cite += '. ';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user