OSDN Git Service

Adapt index.html to serve arbitrarily specified content.
authorKeith Marshall <keith@users.osdn.me>
Mon, 2 Nov 2020 21:41:07 +0000 (21:41 +0000)
committerKeith Marshall <keith@users.osdn.me>
Mon, 2 Nov 2020 21:41:07 +0000 (21:41 +0000)
commit003cc5a29d0cfabf8588b700a826b516d639a087
tree38bcb604c72459136d93ff7346c86691c2d45a35
parent72b5d2b26031b97e27ebc423a592c36e4da6338b
Adapt index.html to serve arbitrarily specified content.

* index.html (onload): Delegate content retrieval to...
(load_page): ...this new javascript function, passing URL.
(page-title, page-subtitle): Rename place-holders, using...
(as-page-title, as-page-subtitle): ...these alternative names.

* site.js (load_page): New function; it consolidates...
(new_page, load_page_overlay, load_page_content): ...these, but
excluding "page-title" and "page-subtitle" assignment; do this...
(load_content): ...here, using repeated invocations of...
(update_page_content_header): ...this new function; it propagates any
"page-title" and "page-subtitle" values from the loaded page fragment,
to their corresponding "index.html" place-holders, calling...
(no_break): ...this new function, to substitute non-breaking hyphens
in place of any included ASCII hyphen characters.

* header.html (navbar): Use fully qualified "href" URL links on all
tabs, replacing "onclick" actions.

* about.html fdl.html terms.html (page-title, page-subtitle): Assign
them to hidden <dt> elements, (in <dl style="display: none"> blocks),
whence they may be propagated, via javascript executed on loading of
the page fragment, to their visible "index.html" place-holders.

* terms.html: Additionally, use a fully qualified "href" link, for
reference to "fdl.html".

* missing.html (page-title): Add hidden <dt> entry.

* site.css (dl.masthead): Define new style, to conceal the <dl>
assignments for "page-title", and "page-subtitle"; adjust top margin
spacing for any immediately following paragraph.
about.html
fdl.html
header.html
index.html
missing.html
site.css
site.js
terms.html