WEDNESDAY 23 March 2022
Today I was caught in a Detour / Tour of the wonderful old system that is writing Darwin Awards index files —> gennav, gennav-lib.pl, gennav-template.pl — organized by top vote score —> a bit naughty, HTML mixed everywhere. It took me all day JUST to clean up the index page. Organized the CSS too. Ready now to proceed with story pages becoming mobile-friendly.
I landed in this project, because the story pages’ nav-bar is nested, nested TABLES. And unresponsive to RWD. I had to burrow into the backend and clean up the HTML therein. Went down a pleasant but onerous rabbit hole, came out the other end!
TUESDAY 22 March 2022
Video the Slush Pile website before and after.
4 tables per page! Formatting was different then.
Rolling up my sleeves, gonna RWD the flat files slush pile with emacs.
Achieve a simple RWD with Professor’s 17 point beauty makeover.
Estimate 24 hours to address 200 pages. (:
Then, streamlined to address slush archive 2016-2020
Plan move to a Stack.[content management system]stack.
Add and modify CSS, and put markers around sections for future changes.
etags ./pend*l ../202101/pend*l ../202001/pend*l
Visit tags.
Make a change:
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/nav_main.css" type="text/css" media=screen>
<link rel="stylesheet" href="/css/template_story.css" type="text/css" media=screen>
[ ABOVE, INCORRECT CSS REFERENCE ../css/ CAUSED SUBSEQUENT HEADACHE]
Check 100% Coverage
Method to check all files changed !!
ls ./pend* ../202101/pend* ../202001/pend* | grep h
replace /~/~\n^^
kill lines containing ~ and visually inspect! Looks good!
ls ./pend*l ../202101/pend*l ../202001/pend*l | wc
184 184 6816
ls ./pend*l~ ../202101/pend*l~ ../202001/pend*l~ | wc
179 179 6837
Hmm weird, oh well, too many ~ is better than too few tilde.
Clean and close html buffers
clean ./ ../202101/ ../202001/
Replace the footer
/slush/new> ls ./pen*l ../202001/pen*l ../202101/*l | wc
186 186 6856
/slush/new> ls ./pen*l? ../202001/pen*l? ../202101/*l? | wc
180 180 6876
Checks! Kill all buffers except *shell* and clean ~
clean ./
clean ../202001/
clean ../202101/
Add required header tags: doctype, lang.
<HTML>
<HEAD>
<TITLE>Slush
<!DOCTYPE html>
<html lang="en">
<head>
<title>Slush
[NOTE: I had to backtrack and uppercase TITLE to work with gennav! ]
Oh yeah I forgot UTF8 but first, check 180 changes took place…
/slush/new> ls ./pen*l~ ../202001/pen*l~ ../202101/*l~ | wc
180 180 6876
</TITLE>
<META name="description"
</TITLE><meta charset="UTF-8">
<META name="description"
GREAT! Time for a skirmish around the block. .. …
Vote Block - give up!
Need to limit max-width of the nav bar for RWD. However, a snag is encountered, that my CSS changes are not taking effect in the document. Maddening! Unwillingly replaced all [vote block] with /h/inc/votebar — a time slowing include — ‘cuz a smaller votebar is required for Mobile.
Maddening lack of CSS alterations ‘going thru’ —>
NOTE TO SELF —> SIGN THAT THE CSS LINK IS WRONG.
Oh wait, I have it coded wrong —> ../css/ —> /css/ …
remove CSS style from <body> tag …
combat triple blank lines…
OK. Whew. Cleanup. And a few files are missed — fix the outliers - two found.
186 186 6856
178 178 6806
Add <header> begin semantic <article>
<H2><A href="/" target="_top">. —>
<header class=”slush”><h2> <A href="/" target="_top">
and
Vote to tell me what *you* think!
</P>
</CENTER>
—>
Vote to tell me what *you* think!
</p>
</header>
<article>
NOTE TO SELF: STOP style in bare semantic elements. The <header> element is inheriting unwanted style from nav_main.css — Always give header a class name! !!
Big Project: Left Nav Bar (stories)
The top impediment NOW is the L-NAV bar! A list of category stories. A server-side include. Consumes time. Nested tables for download and layout chug. Constraint is that L-NAV SSI is generated by a wonderful backend engine called ‘gennav’ and that functionality is awesome! So for now: Minimal Alterations.
Put the SSI dynamic nav into a collapsing div?
Then alter gennav to output LI?
Tile those? Expand from an on-call button! LOL.
Let’s see where this wagon takes us…
<TABLE border=0 align=left><TR><TD>
<!--#include file=nav.html -->
</TD></TR></TABLE>
Replacing the <table> declaration with <nav> has strange side-effects.
<nav class="left-col">
<!--#include file=nav.html -->
</nav>
Side-effects upon side effects. Time to pull up and plunge into gennav.
Gennav: big gift, small headache
The simple matter of replacing
<table> wrapper </table> —> <nav> wrapper </nav>
is actually a complicated matter long in the making.
Perl gennav was written when frames and tables were in use. In 2006 I commented out the FRAMESET. Fifteen years later, table-specific HTML is distributed between foo.html, gennav-lib, and /inc/files. At the time it was a righteous hack - get it done, fix it later.
Fix it later —> has come to pass.
gennav.pl gennav-lib.pl
URGH. Punt.