diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-12-22 04:49:34 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-12-22 04:49:34 +0200 |
commit | a84f6765711e92c668ecb3becd2b1ee12b36abe7 (patch) | |
tree | 6c2aa0935f01f5f8eab6e3bcfb7e3c8aba049eee /src/js/arching-kaos-modules-news.js | |
parent | 91e2aeb7c65bd2cd49982bd7161ecfedd707c0d6 (diff) | |
download | arching-kaos-web-ui-a84f6765711e92c668ecb3becd2b1ee12b36abe7.tar.gz arching-kaos-web-ui-a84f6765711e92c668ecb3becd2b1ee12b36abe7.tar.bz2 arching-kaos-web-ui-a84f6765711e92c668ecb3becd2b1ee12b36abe7.zip |
Peering look up
Diffstat (limited to 'src/js/arching-kaos-modules-news.js')
-rw-r--r-- | src/js/arching-kaos-modules-news.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/js/arching-kaos-modules-news.js b/src/js/arching-kaos-modules-news.js index f9143bc..1834d2c 100644 --- a/src/js/arching-kaos-modules-news.js +++ b/src/js/arching-kaos-modules-news.js @@ -39,6 +39,13 @@ export function akModuleNews(zblockIPFSHash, zblockObject, blockObject, json){ } if (!document.querySelector('#news-preview-'+zblockIPFSHash)){ var newsSectionDivElement = document.querySelector('.preview'); + var button = { + element:'button', + className:'read-more-button', + // innerText:`${blockObject.action.split('/')[0]}-${zblockIPFSHash} 📖`, + innerText:`Read more`, + onclick: `showResult("${blockObject.action.split('/')[0]}-${zblockIPFSHash}")` + } var articleContainerElement = { element:"article", id:`news-preview-${zblockIPFSHash}`, @@ -48,12 +55,13 @@ export function akModuleNews(zblockIPFSHash, zblockObject, blockObject, json){ { element:"a", innerText:'[permalink]', target: '_blank', href:'https://news.arching-kaos.net/?from_zblock='+zblockIPFSHash }, { element:"p", innerText:"Published: " + new Date(blockObject.timestamp*1000) }, { element:"p", innerText:"Contributor: " + getNicknameAssossiatedWithGPG(blockObject.gpg) }, + button, { element:"hr" } ] }; makeElement(articleContainerElement, newsSectionDivElement); if(json.ipfs){ - archingKaosFetchText(getIPFSURL(json.ipfs), getPreviewText, [`#news-preview-${zblockIPFSHash}`]); + archingKaosFetchText(getIPFSURL(json.ipfs), getPreviewText, [`#news-preview-${zblockIPFSHash}`, button]); } makeElement({ element:"hr"}, newsSectionDivElement); } |