[opt] references
This commit is contained in:
parent
48c9119701
commit
d101cfb7b5
|
@ -18,18 +18,13 @@ function layoutDiv() {
|
||||||
if (page.references?.length > 0) {
|
if (page.references?.length > 0) {
|
||||||
function refList() {
|
function refList() {
|
||||||
var el = '';
|
var el = '';
|
||||||
page.references.forEach((item, i) => {
|
for (let ref of page.references) {
|
||||||
el += '<li class="post-title">';
|
el += `
|
||||||
el += '<a href="' + item.url + '"';
|
<li class="post-title">
|
||||||
if (item.url.includes('://')) {
|
${markdown(ref)}
|
||||||
el += ' target="_blank" rel="external nofollow noopener noreferrer">';
|
</li>
|
||||||
} else {
|
`
|
||||||
el += ' rel="noopener noreferrer">';
|
|
||||||
}
|
}
|
||||||
el += item.title || item.url;
|
|
||||||
el += '</a>';
|
|
||||||
el += '</li>';
|
|
||||||
});
|
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
el += `
|
el += `
|
||||||
|
|
Loading…
Reference in New Issue