openring: set up an initial framework

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-08-12 22:05:54 +05:30
parent af62f14cc0
commit 0352ad45ba
2 changed files with 55 additions and 0 deletions

49
openring/in.html Normal file
View File

@ -0,0 +1,49 @@
<section class="webring">
<h3>Articles from blogs I follow around the net</h3>
<section class="articles">
{{range .Articles}}
<div class="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 | datef "January 2, 2006"}}</small>
</div>
{{end}}
</section>
<p class="attribution">
Generated by
<a href="https://git.sr.ht/~sircmpwn/openring">openring</a>
</p>
</section>
<style>
.webring .articles {
display: flex;
flex-wrap: wrap;
margin: -0.5rem;
}
.webring .title {
margin: 0;
}
.webring .article {
flex: 1 1 0;
display: flex;
flex-direction: column;
margin: 0.5rem;
padding: 0.5rem;
background: #eee;
min-width: 10rem;
}
.webring .summary {
font-size: 0.8rem;
flex: 1 1 0;
}
.webring .attribution {
text-align: right;
font-size: 0.8rem;
color: #555;
}
</style>

6
scripts/openring.sh Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
openring \
-s https://stjepang.github.io/feed.xml \
-s https://fasterthanli.me/index.xml \
< openring/in.html \
> layouts/partials/openring.html