Compare commits

..

No commits in common. "63c679d8597c24091d0b220219814cc45217f342" and "43a3fc1a695c4aba11581223065b6e0e3d194c51" have entirely different histories.

5 changed files with 41 additions and 45 deletions

View File

@ -130,18 +130,15 @@ export async function signAndSend(activity: Activity, inbox: string) {
}
async function sendToFollowers(activity: Create, db: Database) {
db.all("SELECT inbox FROM followers", (err, results) => {
// TODO: only send to unique inboxes
db.each("SELECT inbox FROM followers", (err, result) => {
if (err) {
console.log("Error getting followers: ", err);
return;
}
const inboxes = results.map(it => "https://" + new URL(it.inbox).host + "/inbox");
// convert to a Set to deduplicate inboxes
(new Set(inboxes))
.forEach(inbox => {
console.log(`Federating ${activity.object.id} to ${inbox}`);
signAndSend(activity, inbox);
});
const inbox = "https://" + new URL(result.inbox).host + "/inbox";
console.log(`Federating ${activity.object.id} to ${inbox}`);
signAndSend(activity, inbox);
});
}

View File

@ -11,9 +11,7 @@ metadata.layout = "default.html.ejs"
<% for (const post of posts) { %>
<article itemscope itemtype="https://schema.org/BlogPosting">
<h2 class="article-title" itemprop="headline">
<a href="<%= post.metadata.permalink %>" itemprop="url mainEntityOfPage">
<%= post.metadata.title %>
</a>
<%- fancyLink(post.metadata.title, post.metadata.permalink, `itemprop="url mainEntityOfPage"`) %>
</h2>
<%- include("includes/article-meta.html.ejs", { metadata: post.metadata }) %>
<div class="article-content" itemprop="description">

View File

@ -42,7 +42,6 @@ body {
article {
margin-bottom: 75px;
color: var(--content-text-color);
border-bottom: 1px solid var(--accent-color);
@media (min-width: 768px) {
a::before { content: "["; }
@ -82,6 +81,14 @@ article {
color: var(--secondary-ui-text-color);
}
&::after {
content: "";
width: calc(100% - 2 * 30px); // account for .container padding, don't overflow
height: 1px;
background-color: var(--accent-color);
position: absolute;
}
.article-title {
margin-top: 20px;
margin-bottom: 0;
@ -140,31 +147,26 @@ article {
}
#comments-container {
border-bottom: 1px solid var(--accent-color);
padding-bottom: 55px;
.comments-list {
margin-top: 0px;
padding-left: 0px;
}
.comment-user-avatar {
width: 50px;
border-radius: 5px;
float: left;
margin-right: 10px;
border-radius: 5px;
}
@media (min-width: 768px) {
.comments-list {
margin-top: 0px;
padding-left: 0px;
}
.comment-info {
margin-top: 0px;
margin-bottom: 5px;
}
.comment-info {
margin-top: 0px;
margin-bottom: 5px;
}
.comment-children {
margin-left: 60px;
margin-top: 20px;
}
.comment-children {
margin-left: 50px;
margin-top: 20px;
}
}
@ -397,16 +399,21 @@ figure {
// Footer
.site-footer {
margin-top: 75px;
margin-bottom: 20px;
padding-top: 20px;
padding-bottom: 20px;
background-color: var(--ui-background-color);
font-size: 16px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
flex-wrap: wrap;
> div {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
flex-wrap: wrap;
padding-top: 10px;
// border-top: 3px solid var(--accent-color);
}
.site-title {
margin: 0;
@ -456,10 +463,6 @@ figure {
.pagination {
text-align: center;
p {
margin: 0;
}
.pagination-link {
color: var(--accent-color);

View File

@ -1,7 +1,5 @@
<p class="article-meta">
<div itemprop="author" itemscope="" itemtype="https://schema.org/Person">
<meta itemprop="name" content="Shadowfacts">
</div>
<meta itemprop="author" value="Shadowfacts">
on
<span>
<% const formatted = formatDate(metadata.date, "MMM Do, YYYY") %>

View File

@ -69,7 +69,7 @@
</div>
<footer class="site-footer container">
<!-- <div> -->
<div>
<div>
<h2 class="site-title">Shadowfacts</h2>
<p class="ui-controls">
@ -91,7 +91,7 @@
<li><%- fancyLink("Mastodon", "https://social.shadowfacts.net/users/shadowfacts", "rel=me") %></li>
</ul>
</nav>
<!-- </div> -->
</div>
<script>
(() => {