←back to thread

387 points shiomiru | 1 comments | | HN request time: 0.202s | source

A terminal-based web browser in Nim.[1] Has acceptable (YMMV) CSS rendering, some JS support, and inline images (sixel/kitty). It can also use various protocols other than http(s) such as (s)ftp, gopher, gemini, ...

Chawan started out as a w3m clone, and the UI still resembles it. However, the architecture has turned out quite different, with pages loaded in separate processes, and protocol/file type handling separated out into external binaries. An interesting result is that you can even register decoders for custom inline image formats, although practical use cases of this are rather minimal.

There is a gallery showcasing some websites being rendered here: https://chawan.net/gallery/index.html

[1]: https://nim-lang.org

Show context
mariusor ◴[] No.44296153[source]
I've always tried to make my websites look good in Links and now it looks like I have a new candidate.

Having support for some CSS makes it a bit more difficult, as spacing between elements is now an issue, where previously links would ignore margins and padding all together which were used to display cleaner inline list elements (for menus and such).

replies(1): >>44296975 #
shiomiru ◴[] No.44296975[source]
The intention is that it should "just work"... I'm aware sometimes it doesn't, you can consider that a bug :)

But if you really want custom CSS for grid displays, chawan does support the standard "grid" media feature: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/grid

replies(2): >>44298355 #>>44308367 #
1. mariusor ◴[] No.44308367[source]
I have implemented changes based on your advice of using @media: grid, and everything looks better now. You can check it here: https://brutalinks.tech (it's a link aggregator similar to HN).