Add webring

This commit is contained in:
Huy-Ngo 2021-01-11 15:13:50 +07:00
parent adfa1dad82
commit 3c4cfb45a3
8 changed files with 155 additions and 1 deletions

View File

@ -68,3 +68,5 @@ exclude:
- .git/
- LICENSE
- newpost.sh
- webring.template
- create-webring.sh

View File

@ -1,3 +1,4 @@
<link rel="stylesheet" href="/assets/css/webring.css">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/images/favicon-16x16.png">

View File

@ -0,0 +1,59 @@
<div class="wrapper">
<section class="webring">
<h2>
Articles from blogs I read
<small class="attribution">
Generated by
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
</small>
</h2>
<section class="footer-col-wrapper">
<div class="footer-col article">
<h4 class="title">
<a href="https://stallman.org/archives/2020-nov-feb.html#10_January_2021_%28Anti-reality_extremists%27_call_for_violence%29" target="_blank" rel="noopener">Anti-reality extremists&#39; call for violence</a>
</h4>
<p class="summary">
Anti-reality extremists were calling for violence in DC on Jan 6 for
weeks before that date.
*Extremists intensify calls for violence ahead of Inauguration Day.*
</p>
<small class="source">
via <a href="https://stallman.org/archives/polnotes.html">Richard Stallman&#39;s Political Notes</a>
</small>
<small class="date">January 10, 2021</small>
</div>
<div class="footer-col article">
<h4 class="title">
<a href="https://news.opensuse.org/2021/01/08/tw-rolls-into-the-new-year/" target="_blank" rel="noopener">Tumbleweed Rolls Into The New Year</a>
</h4>
<p class="summary">The holidays might be over and the new year is here, but users of openSUSE Tumbleweed didnt see any difference in the amount of snapshots released over the holiday season. Tumbleweed snapshots have been rolling out daily before toasting to new beginnings…</p>
<small class="source">
via <a href="https://news.opensuse.org">openSUSE News</a>
</small>
<small class="date">January 8, 2021</small>
</div>
<div class="footer-col article">
<h4 class="title">
<a href="https://drewdevault.com/2021/01/07/History-will-not-remember-us-fondly.html" target="_blank" rel="noopener">History will not remember us fondly</a>
</h4>
<p class="summary">Today, we recall the Middle Ages as an unenlightened time (quite literally, in
fact). We view the Middle Ages with a critical eye towards its brutality, lack
of individual freedoms, and societal and technological regression. But we rarely
turn that same crit…</p>
<small class="source">
via <a href="https://drewdevault.com">Drew DeVault&#39;s blog</a>
</small>
<small class="date">January 7, 2021</small>
</div>
</section>
</section>
</div>

38
_includes/footer.html Normal file
View File

@ -0,0 +1,38 @@
{%- include custom-webring.html -%}
<footer class="site-footer h-card">
<data class="u-url" href="{{ "/" | relative_url }}"></data>
<div class="wrapper">
<div class="footer-col-wrapper">
<div class="footer-col">
<p class="feed-subscribe">
<a href="{{ 'feed.xml' | relative_url }}">
<svg class="svg-icon orange">
<use xlink:href="{{ 'assets/minima-social-icons.svg#rss' | relative_url }}"></use>
</svg><span>Subscribe</span>
</a>
</p>
{%- if site.author %}
<ul class="contact-list">
{% if site.author.name -%}
<li class="p-name">{{ site.author.name | escape }}</li>
{% endif -%}
{% if site.author.email -%}
<li><a class="u-email" href="mailto:{{ site.author.email }}">{{ site.author.email }}</a></li>
{%- endif %}
</ul>
{%- endif %}
</div>
<div class="footer-col">
<p>{{ site.description | escape }}</p>
</div>
</div>
<div class="social-links">
{%- include social.html -%}
</div>
</div>
</footer>

View File

@ -46,7 +46,7 @@ This means you are free to share the posts and modify them, provided that you at
# Acknowledgement
This blog is built with [jekyll] and its [minima] theme.
This blog is built with [jekyll] and its [minima] theme. I used [openring] to generate others' blog posts from RSS feed.
[fosstodon]: https://fosstodon.org/@huy_ngo
[matrix]: https://matrix.to/#/@xarvos:matrix.org
@ -59,3 +59,4 @@ This blog is built with [jekyll] and its [minima] theme.
[YAltaCV]: https://github.com/Huy-Ngo/YAltaCV
[discord-meme-bot]: https://github.com/Huy-Ngo/discord-meme-bot
[wikt-cli]: https://git.sr.ht/~huyngo/wikt-cli
[openring]: https://git.sr.ht/~sircmpwn/openring

21
assets/css/webring.scss Normal file
View File

@ -0,0 +1,21 @@
---
---
.webring {
margin-bottom: 1rem;
.attribution {
float: right;
font-size: .8rem;
line-height: 3;
}
.footer-col.article {
padding: 0.5rem;
margin: 0 0.5rem;
border: 0.01rem solid #333;
@media(max-width: 640px) {
margin: 0.5rem 0;
}
}
}

7
create-webring.sh Executable file
View File

@ -0,0 +1,7 @@
# Create webring
openring \
-s https://drewdevault.com/feed.xml \
-s https://stallman.org/rss/rss.xml \
-s https://news.opensuse.org/feed/ \
< webring.template \
> _includes/custom-webring.html

25
webring.template Normal file
View File

@ -0,0 +1,25 @@
<div class="wrapper">
<section class="webring">
<h2>
Articles from blogs I read
<small class="attribution">
Generated by
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
</small>
</h2>
<section class="footer-col-wrapper">
{{range .Articles}}
<div class="footer-col article">
<h4 class="title">
<a href="{{.Link}}" target="_blank" rel="noopener">{{.Title}}</a>
</h4>
<p class="summary">{{.Summary}}</p>
<small class="source">
via <a href="{{.SourceLink}}">{{.SourceTitle}}</a>
</small>
<small class="date">{{.Date | date}}</small>
</div>
{{end}}
</section>
</section>
</div>