I played a bit more with the sector.htm page - adding a title page, tweaks to the layout, and so forth. The page code is also slightly more interesting to peruse - to make it easier to modify I wrote a JavaScript Template mechanism that defines the transform using XSLT-like constructs (if, foreach) embedded in the HTML as attributes (jt_if, jt_foreach) itself, and JSONT-like expression embedding sequences ({$.index}, {$.title}), and operates over a JavaScript data construct. The expression language is JavaScript itself and "$" is set to the current object as the parse descends. Check the page source for details.
It ended up working pretty well, once I sorted out some cross-browser issues (IE doesn't have a convenient mechanism for enumerating explicitly specified attributes, alas). Tested in Firefox 2, IE7, Opera 9 and Safari 3 on Windows XP.
Ω
Subscribe to:
Post Comments (Atom)
4 comments:
This is really cool. I'm using Firefox 2 on Win2K. If you scale the page by 75%, and print landscape, the pages come out correctly. Except Regina which has too many worlds and pushes the footer onto the next page.
tjoneslo - The Traveller Wiki.
If you pick "Landscape" and "Scale to Fit" it should fit perfectly on the page in Firefox and IE7. The CSS embeds page break information but browsers still have to "guess" most of the time.
Some denser sectors (e.g. Core) still have subsectors that spill over. I'll actually print a copy at some point and see if I need to tweak the text sizes, etc., to match the LBBs more closely.
I just noticed that there was a problem with the names of the neighbour subsectors. Using an old mozilla browser, Mora is a neighbour of Five Sisters.
It might better work with a new browser?
Oops, that's a stupid bug in my logic, not browser-specific. I'll fix it this weekend.
Thanks for the report!
Post a Comment