mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 17:10:41 +00:00
Adding date and time to news content
This commit is contained in:
@ -197,13 +197,16 @@
|
||||
}
|
||||
|
||||
function mastodonStatusToHtml(status) {
|
||||
let date = new Date(status.created_at).toLocaleString('en-US')
|
||||
return htmlString = `
|
||||
<div class="row">
|
||||
<div class="col s11">
|
||||
<div class="card white-text" style="background-color:#5D50E7; border-radius:10px;">
|
||||
<div class="card-content">
|
||||
<span class="card-title">New Actitvity on Mastodon</span>
|
||||
${status.content}
|
||||
<p><i>Published on ${date}</i></p>
|
||||
<br>
|
||||
<p>${status.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -213,10 +216,10 @@
|
||||
`.trim();
|
||||
}
|
||||
function bisBlogsEntryToHtml(entry) {
|
||||
let date = new Date(entry.published).toLocaleString('en-US')
|
||||
let bisBlogHTMLElement = document.createElement('div');
|
||||
bisBlogHTMLElement.classList.add('row');
|
||||
bisBlogHTMLElement.innerHTML = `
|
||||
<div class="row">
|
||||
<div class="col s1">
|
||||
<img src="https://blogs.uni-bielefeld.de/blog/uniintern/resource/themabilder/unilogo-square.svg" alt="Bielefeld University Blogs" class="responsive-img hide-on-small-only" style="width:70%; margin-top:40px;">
|
||||
</div>
|
||||
@ -224,11 +227,12 @@
|
||||
<div class="card" style="background-color: #A5BDCC; border-radius:10px;">
|
||||
<div class="card-content">
|
||||
<span class="card-title">${entry.title['#text']}</span>
|
||||
${entry.content['#text']}
|
||||
<p><i>Published on ${date}</i></p>
|
||||
<br>
|
||||
<p>${entry.content['#text']}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`.trim();
|
||||
let bisBlogImages = bisBlogHTMLElement.querySelectorAll('img');
|
||||
bisBlogImages.forEach((img) => {
|
||||
|
Reference in New Issue
Block a user