----------------------------------------Styling Lynx Gopher->HTML output with sed and CSSMarch 30th, 2018----------------------------------------Note: this phlog entry does not display correctly on HTTP/HTTPS In yesterday's post, I gave some tidbits on how to use Lynx to turngopher menus into decent HTML, today I'll give some hints on how to make the document appear a little better using sed and CSS. My goals here are to make the document look a little bit like Netscape 2.0 (file type images instead of text description) but also not look like a piece of paper at the same time...First lets use a sed file (sed -f images.sed) to inject some HTML SPANsand classes into the document...
[TXT] source of file here, too wide to display in the blog
Then, lets inject the HTML code to get the browser to load a stylesheet:sed -e '/<HEAD>/a \[TXT] <LINK REL="STYLESHEET" HREF="//">
The stylesheet contains code to set the body color to a pleasing shadeof grey, and the background to black... Also to set the text to a monospace font, as many gopher menus contain ASCII art that will not work with a proportional font...We'll also make the "GOPHER MENU" H1 not so damn huge, and make the links legible when paired with a black foreground...Finally it contains CSS trickery to replace the spans we insertedwith nice little file icons from Apache.