Add social page with archived mastodon posts, move source to /site

This commit is contained in:
天クマ 2026-07-04 16:57:55 -03:00
commit 648869bf76
40 changed files with 58 additions and 2 deletions

View file

@ -1,5 +1,5 @@
{ {
"lastFetched": "2026-07-04T19:22:19.688Z", "lastFetched": "2026-07-04T19:57:16.577Z",
"posts": [ "posts": [
{ {
"date": "2026-07-03T01:51:37.604Z", "date": "2026-07-03T01:51:37.604Z",

View file

@ -17,6 +17,8 @@ import readingTime from 'eleventy-plugin-reading-time';
// import i18n from "./_data/i18n.js"; // import i18n from "./_data/i18n.js";
export default function (eleventyConfig) { export default function (eleventyConfig) {
eleventyConfig.setInputDirectory("site");
eleventyConfig.setQuietMode(true); eleventyConfig.setQuietMode(true);
eleventyConfig.addPlugin(syntaxHighlight); eleventyConfig.addPlugin(syntaxHighlight);
eleventyConfig.addPlugin(safeLinks); eleventyConfig.addPlugin(safeLinks);
@ -39,10 +41,12 @@ export default function (eleventyConfig) {
// eleventyConfig.addPlugin(githubRepos, { userAccount: 'adrianvic' }); // eleventyConfig.addPlugin(githubRepos, { userAccount: 'adrianvic' });
eleventyConfig.addPlugin(readingTime); eleventyConfig.addPlugin(readingTime);
eleventyConfig.addWatchTarget("./site");
eleventyConfig.addCollection("post", function (collectionApi) { eleventyConfig.addCollection("post", function (collectionApi) {
return collectionApi return collectionApi
.getFilteredByGlob("./posts/*") .getFilteredByGlob("./site/posts/*")
.sort((a, b) => b.date - a.date); .sort((a, b) => b.date - a.date);
}); });

View file

@ -24,6 +24,7 @@
<a href="{{ ('/' ~ langKey ~ '/') | url }}">{{ i18n[langKey].home }}</a> <a href="{{ ('/' ~ langKey ~ '/') | url }}">{{ i18n[langKey].home }}</a>
<a href="{{ ('/' ~ langKey ~ '/blog/') | url }}">blog</a> <a href="{{ ('/' ~ langKey ~ '/blog/') | url }}">blog</a>
<a href="{{ ('/' ~ langKey ~ '/misc/') | url }}">misc</a> <a href="{{ ('/' ~ langKey ~ '/misc/') | url }}">misc</a>
<a href="{{ ('/' ~ langKey ~ '/social/') | url }}">social</a>
{% endif %} {% endif %}
{% if langKey == undefined %} {% if langKey == undefined %}
<a href="{{ ('/') | url }}">home</a> <a href="{{ ('/') | url }}">home</a>

31
site/social.njk Normal file
View file

@ -0,0 +1,31 @@
---
pagination:
data: i18n
size: 1
alias: langKey
permalink: "/{{ langKey }}/social/index.html"
layout: base.njk
title: Adrian Victor:Social
---
<aside>
<div id="socialAside">
<div>
<h1 class="nomargin negativeMargin"><a class="textColored noDecoration" href="https://mstdn.social/@tenkuma">@tenkuma</a></h1>
<hr class="nomargin">
<img src="{{ '/static/images/profile.jpg' | url }}">
<hr class="nomargin">
</div>
</div>
{% include 'widgets/internetometer-aside.html' %}
</aside>
<main>
<ul>
{% for post in mastodon.posts %}
<hr class="nomargin">
<div class="mastodonPost">
{{ post.content | safe }}
<p><a class="postLink" href="{{ post.source_url }}">{{ post.date }}</a></p>
</div>
{% endfor %}
</ul>
</main>

BIN
static/images/profile.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -158,6 +158,10 @@ button {
padding: 0.6em; padding: 0.6em;
} }
img {
max-width: 100%;
}
hs { hs {
border-bottom: thin solid white; border-bottom: thin solid white;
} }
@ -242,6 +246,10 @@ footer a {
margin: 0; margin: 0;
} }
.noDecoration, .noDecoration:hover {
text-decoration: none;
}
.noPadding { .noPadding {
padding: 0!important; padding: 0!important;
} }
@ -695,6 +703,7 @@ article {
height: 1.4em; height: 1.4em;
margin-top: auto; margin-top: auto;
opacity: 0.6; opacity: 0.6;
margin: auto;
} }
#music:hover { #music:hover {
@ -734,6 +743,7 @@ article {
#mainHelper > aside { #mainHelper > aside {
max-width: 20%; max-width: 20%;
min-width: 20%;
} }
#mainHelper aside { #mainHelper aside {
@ -1060,6 +1070,12 @@ header div:first-child {
margin-top: .2em; margin-top: .2em;
} }
.mastodonPost {
background-color: rgba(0, 0, 0, 0.2);
padding: 1em;
margin-bottom: 1em;
}
/* Animations */ /* Animations */
@keyframes ellipsis-loader { @keyframes ellipsis-loader {
@ -1145,6 +1161,10 @@ header div:first-child {
max-width: unset; max-width: unset;
} }
#socialAside img {
max-width: 50%;
}
#homeSquares { #homeSquares {
flex-direction: row; flex-direction: row;
align-content: center; align-content: center;