Allows you to use Mastodon and Bluesky comments on your Lustre blog hexdocs.pm/chilp/
blog gleam lustre indieweb mastodon bluesky comments
1
fork

Configure Feed

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

Make the about link a bit less spotlighted

+58 -44
+58 -44
src/chilp/widget.gleam
··· 216 216 } 217 217 218 218 fn view_normal(model: Model) -> Element(Msg) { 219 + let about_linkie = 220 + html.div([], [ 221 + html.a( 222 + [ 223 + event.on_click(SetTab(3)), 224 + attribute.classes([ 225 + #("float-right link link-secondary-content/40 text-xs", True), 226 + #("hidden", model.open_tab == 3), 227 + ]), 228 + ], 229 + [ 230 + html.text("About"), 231 + ], 232 + ), 233 + ]) 234 + 219 235 let #(linkedto, respond_here) = case 220 236 model.bluesky_anchor, 221 237 model.mastodon_anchor ··· 284 300 ], 285 301 [html.text("Bluesky")], 286 302 ), 287 - html.a( 288 - [ 289 - attribute.role("tab"), 290 - event.on_click(SetTab(3)), 291 - attribute.classes([ 292 - #("tab", True), 293 - #("tab-active", model.open_tab == 3), 294 - ]), 295 - ], 296 - [ 297 - html.text("About"), 298 - ], 299 - ), 300 303 ], 301 304 ), 302 305 html.br([]), ··· 311 314 3 -> view_about_chilp() 312 315 _ -> view_mastodon_respond_form(masto) 313 316 }, 317 + html.span([attribute.class("absolute right-2 top-1")], [about_linkie]), 314 318 ] 315 319 |> element.fragment(), 316 320 ) 317 321 } 318 322 None, Some(masto) -> { 319 323 #( 320 - [ 321 - html.a( 324 + case model.open_tab { 325 + 3 -> view_about_chilp() 326 + _ -> 322 327 [ 323 - attribute.href( 324 - "https://" 325 - <> masto.instance 326 - <> "/" 327 - <> model.mastodon_op_username 328 - <> "/" 329 - <> masto.postid, 328 + html.a( 329 + [ 330 + attribute.href( 331 + "https://" 332 + <> masto.instance 333 + <> "/" 334 + <> model.mastodon_op_username 335 + <> "/" 336 + <> masto.postid, 337 + ), 338 + attribute.class("link text-[#595aff]"), 339 + ], 340 + [html.text("this post")], 330 341 ), 331 - attribute.class("link text-[#595aff]"), 332 - ], 333 - [html.text("this post")], 334 - ), 335 - html.text(" on Mastodon."), 336 - ] 337 - |> element.fragment, 342 + html.text(" on Mastodon."), 343 + about_linkie, 344 + ] 345 + |> element.fragment 346 + }, 338 347 view_mastodon_respond_form(masto), 339 348 ) 340 349 } 341 350 Some(bsky), None -> { 342 351 #( 343 - [ 344 - html.a( 352 + case model.open_tab { 353 + 3 -> view_about_chilp() 354 + _ -> 345 355 [ 346 - attribute.href( 347 - "https://bsky.app/profile/" 348 - <> bsky.did 349 - <> "/post/" 350 - <> bsky.postid, 356 + html.a( 357 + [ 358 + attribute.href( 359 + "https://bsky.app/profile/" 360 + <> bsky.did 361 + <> "/post/" 362 + <> bsky.postid, 363 + ), 364 + attribute.class("link link-[#006aff]"), 365 + ], 366 + [html.text("this post")], 351 367 ), 352 - attribute.class("link link-[#006aff]"), 353 - ], 354 - [html.text("this post")], 355 - ), 356 - html.text(" on Bluesky."), 357 - ] 358 - |> element.fragment, 368 + html.text(" on Bluesky."), 369 + about_linkie, 370 + ] 371 + |> element.fragment 372 + }, 359 373 view_respond_on_bsky( 360 374 "https://bsky.app/profile/" <> bsky.did <> "/post/" <> bsky.postid, 361 375 ), ··· 638 652 ]), 639 653 icon_link("Bluesky", "bsky.app", "text-[#006aff] bg-white"), 640 654 icon_link("Blacksky", "blacksky.community", "text-white bg-black"), 641 - icon_link("Witchsky", "witchsky.app", "text-[#ed5345] bg-white"), 655 + icon_link("Witchsky", "witchsky.app", "bg-[#ed5345] text-white"), 642 656 ]), 643 657 ]) 644 658 }