turns out, I forgot the template in the template
All checks were successful
/ weblog.lol (push) Successful in 11s
All checks were successful
/ weblog.lol (push) Successful in 11s
This commit is contained in:
parent
292c54fe5e
commit
7bbd151a98
2 changed files with 32 additions and 5 deletions
|
@ -33,8 +33,40 @@
|
||||||
<aside class="post-tags">
|
<aside class="post-tags">
|
||||||
{tags}
|
{tags}
|
||||||
</aside>
|
</aside>
|
||||||
|
<section id="fedi-social-replies" class="replies">
|
||||||
|
|
||||||
|
</section>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
<template id="fedi-social-reply">
|
||||||
|
<article class="fedi-social-reply">
|
||||||
|
<div class="reply-header">
|
||||||
|
<aside class="author">
|
||||||
|
<img class="avatar" src="https://cdn.some.pics/deathau/663da4619fdb6.svg">
|
||||||
|
<a class="name" href="https://monrepos.casa/profile/death.au">Gordon Pedersen</a>
|
||||||
|
</aside>
|
||||||
|
<aside class="post-info">
|
||||||
|
<a class="source" href="https://monrepos.casa/display/0e03068e-1866-3f18-738d-497554542391">
|
||||||
|
<i class="fa-solid fa-clock"></i>
|
||||||
|
<time class="dt-published" datetime="2024-05-11T07:04:19.000Z">11 days ago</time>
|
||||||
|
</a>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
<p class="reply-content">
|
||||||
|
Also, at some point, I want to replace the emoji font (currently <a href="https://fonts.google.com/noto/specimen/Noto+Color+Emoji" target="_blank" rel="noopener noreferrer">Noto Color Emoji</a>) with the same 3D Fluent ones that status.lol uses.<br>Any tips, <a class="u-url mention status-link" href="https://social.lol/users/adam" rel="noopener noreferrer" target="_blank" title="adam">@<span>adam</span></a> ?
|
||||||
|
</p>
|
||||||
|
<aside class="post-info">
|
||||||
|
<a class="source" href="https://monrepos.casa/display/0e03068e-1866-3f18-738d-497554542391" target="_blank">
|
||||||
|
<i class="omg-icon omg-fediverse"></i> via <span class="application">friendica</span>
|
||||||
|
</a>
|
||||||
|
<span class="fedi-social">
|
||||||
|
<a href="https://monrepos.casa/display/0e03068e-1866-3f18-738d-497554542391" target="_blank"><i class="fa fa-comment"></i> <span class="replies-count">3</span></a>
|
||||||
|
<a href="https://monrepos.casa/display/0e03068e-1866-3f18-738d-497554542391" target="_blank"><i class="fa fa-star"></i> <span class="favourites-count">0</span></a>
|
||||||
|
<a href="https://monrepos.casa/display/0e03068e-1866-3f18-738d-497554542391" target="_blank"><i class="fa fa-retweet"></i> <span class="reblogs-count">0</span></a>
|
||||||
|
</span>
|
||||||
|
</aside>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2>Recent posts</h2>
|
<h2>Recent posts</h2>
|
||||||
|
|
|
@ -120,7 +120,6 @@ class FediSocial extends HTMLElement {
|
||||||
customElements.define('fedi-social', FediSocial)
|
customElements.define('fedi-social', FediSocial)
|
||||||
|
|
||||||
function renderReplies(status, replies, replyContainer, template) {
|
function renderReplies(status, replies, replyContainer, template) {
|
||||||
console.log(status)
|
|
||||||
const repliesToThis = replies.filter(d => d.in_reply_to_id == status.id);
|
const repliesToThis = replies.filter(d => d.in_reply_to_id == status.id);
|
||||||
|
|
||||||
repliesToThis.forEach(reply => {
|
repliesToThis.forEach(reply => {
|
||||||
|
@ -152,17 +151,13 @@ function renderReplies(status, replies, replyContainer, template) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadContext(status, replyContainer, template) {
|
async function loadContext(status, replyContainer, template) {
|
||||||
console.log('Loading context');
|
|
||||||
try{
|
try{
|
||||||
const res = await fetch(`https://monrepos.casa/api/v1/statuses/${status.id}/context`, {
|
const res = await fetch(`https://monrepos.casa/api/v1/statuses/${status.id}/context`, {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': 'Basic Ym90OjJuUmZhTGJ1c3cyaFhA'
|
'Authorization': 'Basic Ym90OjJuUmZhTGJ1c3cyaFhA'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(res)
|
|
||||||
const json = await res.json()
|
const json = await res.json()
|
||||||
|
|
||||||
console.log(json)
|
|
||||||
|
|
||||||
if(json && json.descendants && json.descendants.length > 0){
|
if(json && json.descendants && json.descendants.length > 0){
|
||||||
const h1 = document.createElement('h1')
|
const h1 = document.createElement('h1')
|
||||||
|
|
Loading…
Reference in a new issue