diff options
Diffstat (limited to 'src/content/dependencies/generateNewsEntryReadAnotherLinks.js')
| -rw-r--r-- | src/content/dependencies/generateNewsEntryReadAnotherLinks.js | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/content/dependencies/generateNewsEntryReadAnotherLinks.js b/src/content/dependencies/generateNewsEntryReadAnotherLinks.js index d978b0e4..50c23513 100644 --- a/src/content/dependencies/generateNewsEntryReadAnotherLinks.js +++ b/src/content/dependencies/generateNewsEntryReadAnotherLinks.js @@ -1,12 +1,4 @@ export default { - contentDependencies: [ - 'generateAbsoluteDatetimestamp', - 'generateRelativeDatetimestamp', - 'linkNewsEntry', - ], - - extraDependencies: ['html', 'language'], - relations(relation, currentEntry, previousEntry, nextEntry) { const relations = {}; @@ -57,10 +49,7 @@ export default { if (relations.previousEntryDatetimestamp) { parts.push('withDate'); options.date = - relations.previousEntryDatetimestamp.slots({ - style: 'full', - tooltip: true, - }); + relations.previousEntryDatetimestamp.slot('style', 'full'); } entryLines.push(language.$(...parts, options)); @@ -75,21 +64,22 @@ export default { if (relations.nextEntryDatetimestamp) { parts.push('withDate'); options.date = - relations.nextEntryDatetimestamp.slots({ - style: 'full', - tooltip: true, - }); + relations.nextEntryDatetimestamp.slot('style', 'full'); } entryLines.push(language.$(...parts, options)); } + console.log(language.$order(prefix, 'previous.withDate', 0)); + return ( html.tag('p', {class: 'read-another-links'}, {[html.onlyIfContent]: true}, {[html.joinChildren]: html.tag('br')}, entryLines.length > 1 && + language.$order(prefix, 'previous.withDate', 0) === 'DATE' && + language.$order(prefix, 'next.withDate', 0) === 'DATE' && {class: 'offset-tooltips'}, entryLines)); |