My personal website, in gleam+lustre!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Post listing updates


Signed-off-by: MLC Bloeiman <mar@strawmelonjuice.com>

+26 -3
+26 -3
src/homepage.gleam
··· 1 - /// We want to disable this while previewing, as to not spam ari.lt with requests due to autoreloading. 1 + /// We want to disable this while previewing, as to not spam ari.lt with 2 + /// requests due to autoreloading. 2 3 const arrivertisements_show = False 3 4 4 - // Post data 5 - 5 + /// Post data ------------------------------------------------------------------- 6 + /// 7 + /// Some special tags: 8 + /// - `.unlisted`, allows for live blogs, which do broadcast 9 + /// 'updates' on the RSS feed, but we don't want those partial 10 + /// posts in the post view, we want the 'original' post to link 11 + /// or embed them instead. 12 + /// - `.creative` and `.blog-personal` these two split the blog posts 13 + /// from the creative endeavours. 14 + /// - `.creative-art` and `.creative-writings` split the creative works 15 + /// themselves into seperated subblogs 16 + /// - `.archived`, similar to `.unlisted`, but with a button(?). Yet unimplemented. 6 17 fn posts() { 7 18 [ 8 19 Post( ··· 1635 1646 wrap(Me, "About Me", view_me()), 1636 1647 wrap(Index, "Homepage", view_index(model)), 1637 1648 wrap(Posts, "All Posts", view_posts(model, AllPosts)), 1649 + 1650 + { 1651 + // This feels risky 1652 + list.map(posts(), fn(post) { 1653 + view_post(model, post.id) 1654 + |> wrap(PostById(post.id), "Post: " <> post.title, _) 1655 + }) 1656 + |> element.fragment() 1657 + }, 1658 + 1638 1659 wrap(Links, "Links page", view_links()), 1639 1660 wrap(Portfolio, "Portfolio", view_portfolio()), 1661 + wrap(Sitemap, "Sitemap", view_sitemap()), 1640 1662 // Hmm... 1641 1663 wrap(PersonalStartPage, "Personal start page", view_personal_start_page()), 1642 1664 ] ··· 2021 2043 ] 2022 2044 _ -> 2023 2045 postlist 2046 + |> list.filter(fn(item) { !list.contains(item.tags, ".unlisted") }) 2024 2047 |> list.map(view_post_preview) 2025 2048 } 2026 2049 [