updated name of config table from syndication to webring

This commit is contained in:
likhy 2023-04-30 09:58:51 -07:00
parent 427d4ff972
commit 9905a15ace
3 changed files with 65 additions and 15 deletions

View File

@ -28,3 +28,31 @@ interact = "https://yoursite.tld/cgi?postid="
[post.gallery] [post.gallery]
path_to_thumb="./thumbs" path_to_thumb="./thumbs"
path_to_fullsize="./images" path_to_fullsize="./images"
[webring]
enabled=true
file_output="meta.json"
[webring.profile]
username="Your name here"
url="https://yourdomain.tld/microblog/"
avatar="https://yourdomain.tld/microblog/images/avatar.jpg"
short_bio= "Your self-description. Anything longer than 150 characters is truncated."
[webring.following]
following= ["https://likho.neocities.org/microblog/meta.json"]
format="""
<div class="fill">
<div class="postcell">
<img src="{__avatar__}" alt="Avatar" class="avatar">
<span class="wrapper"">
<div class="handle">
<a href="{__url__}">{__handle__}</a>
</div>
<div class="last-updated">Last Update: {__lastupdated__}</div>
<span class="post-count">Posts: {__post_count__}</span>
</span>
<p class="short-bio">{__shortbio__}</p>
</div>
</div>
"""

View File

@ -31,28 +31,28 @@
color: green; color: green;
font-weight: bold; font-weight: bold;
} }
.profile {
vertical-align: middle;
padding-left: 10px;
border:1px solid blue;
}
.avatar { .avatar {
vertical-align: middle; vertical-align: middle;
width: 50px; width: 50px;
height: 50px; height: 50px;
} }
.handle{ .column .profile {
vertical-align: middle;
padding-left: 10px;
padding:1%;
}
.column .profile .handle{
font-size: 1.1em; font-size: 1.1em;
font-weight: bold; font-weight: bold;
} }
.email{ .column .profile .email{
text-align:left;
font-size: 0.8em; font-size: 0.8em;
text-align:left;
text-decoration:none; text-decoration:none;
} }
.bio { .column .profile .bio {
vertical-align: middle;
font-size: 0.9em; font-size: 0.9em;
vertical-align: middle;
margin: 1em margin: 1em
} }
.gallery { .gallery {
@ -73,6 +73,28 @@
border: 1px solid #777; border: 1px solid #777;
filter: invert(100%); filter: invert(100%);
} }
.postcell .avatar {
margin-left:3%;
margin-top:2%;
height: 4em;
width:auto;
vertical-align:top;
}
.postcell .wrapper {
margin-top:2%;
display: inline-block;
}
.postcell .wrapper .last-updated,
.postcell .wrapper .post-count {
font-size: 1em;
color:grey;
}
.postcell .short-bio{
padding-left: 3%;
padding-right: 2%;
font-style: italic;
word-wrap: break-word;
}
/* Clear floats after the columns */ /* Clear floats after the columns */
.row:after { .row:after {
content: ""; content: "";

View File

@ -450,12 +450,12 @@ if __name__ == "__main__":
tpl, tagline, tc, cfg["page"], \ tpl, tagline, tc, cfg["page"], \
subdir="tags/%s" % key[1:] \ subdir="tags/%s" % key[1:] \
) )
if "syndication" in cfg: if "webring" in cfg:
if cfg["syndication"]["enabled"] == True: if cfg["webring"]["enabled"] == True:
export_profile( export_profile(
len(p), p[0].get_epoch_time(), cfg["syndication"] ) len(p), p[0].get_epoch_time(), cfg["webring"] )
if "following" in cfg["syndication"]: if "following" in cfg["webring"]:
fellows = fn1(cfg["syndication"]["following"] ) fellows = fn1(cfg["webring"]["following"] )
updated += writepage( updated += writepage(
tpl, fellows, tc, cfg["page"], subdir="placeholder" ) tpl, fellows, tc, cfg["page"], subdir="placeholder" )
with open("updatedfiles.txt", 'w') as f: with open("updatedfiles.txt", 'w') as f: