* site.js (no_break, update_page_content_header): Delete them.
(set_page): New page-load helper function; it supports page title and
subtitle updates, when called from embedded scripts on overlay-pages.
(load_page) [status == 200]: Scan for, and execute embedded scripts.
* index.html [masthead] (h1, h2): Change identifiers from...
(as-page-title, as-page-subtitle): ...these respectively, to...
(page-title, page-subtitle): ...these; add hidden placeholder content.
* about.html contact.html fdl.html mailing.html missing.html
* terms.html [masthead] (dl): Delete hidden element; replace it with
script, to assign effective HTML content to each of...
(page-title, page-subtitle): ...these.
* fdl.html mailing.html (ol, ul): Do not override CSS styles.
* site.css [masthead]: Do not assume that final element is...
(dl): ...this; define style for immediately following paragraph, on
the basis that the final masthead element may be anything.
* ” right (closing) typographic double quote
*
-->
-<dl class="masthead"><!-- hidden for masthead class -->
-<!-- FIXME: is there a better way to do this? We need to propagate
- content to the "as-page-title" and "as-page-subtitle" place-holders,
- within the "page-content" div of "index.html"; our javascript page
- loader will explicitly look for these hidden elements, and copy
- their content into the corresponding visible place-holders.
--->
- <dt id="page-title">Welcome to MinGW.OSDN</dt>
- <dt id="page-subtitle">Home of the MinGW and MSYS Projects</dt>
-</dl><!-- masthead -->
+<script class="masthead">
+/* Script fragment, to assign titles specific to this page; this is
+ * encapsulated within the "masthead", where such titles are displayed,
+ * to ensure that whatever page content may follow will be correctly
+ * positioned, relative to the masthead content.
+ */
+ set_page( "title", "Welcome to MinGW.OSDN" );
+ set_page( "subtitle", "Home of the MinGW and MSYS Projects" );
+</script><!-- masthead -->
<p><strong>MinGW</strong>,
a contraction of “Minimalist GNU for Windows”,
is a minimalist development environment
* ” right (closing) typographic double quote
*
-->
-<dl class="masthead"><!-- hidden for masthead class -->
-<!-- FIXME: is there a better way to do this? We need to propagate
- content to the "as-page-title" and "as-page-subtitle" place-holders,
- within the "page-content" div of "index.html"; our javascript page
- loader will explicitly look for these hidden elements, and copy
- their content into the corresponding visible place-holders.
--->
- <dt id="page-title">Contacting MinGW.OSDN</dt>
- <dt id="page-subtitle">When a Web-Search Fails to Resolve your Issue</dt>
-</dl><!-- masthead -->
+<script class="masthead"><!-- hidden for masthead class -->
+/* Script fragment, to assign titles specific to this page; this is
+ * encapsulated within the "masthead", where such titles are displayed,
+ * to ensure that whatever page content may follow will be correctly
+ * positioned, relative to the masthead content.
+ */
+ set_page("title", "Contacting MinGW.OSDN");
+ set_page("subtitle", "When a Web-Search Fails to Resolve your Issue");
+</script><!-- masthead -->
<p>If you have exhausted all of the web‑site resources,
and you have searched all of the
<a href="index.html?page=mailing.html"
* ” right (closing) typographic double quote
*
-->
-<dl class="masthead"><!-- hidden for masthead class -->
-<!-- FIXME: is there a better way to do this? We need to propagate
- content to the "as-page-title" and "as-page-subtitle" place-holders,
- within the "page-content" div of "index.html"; our javascript page
- loader will explicitly look for these hidden elements, and copy
- their content into the corresponding visible place-holders.
--->
- <dt id="page-title">MinGW.OSDN Licensing</dt>
- <dt id="page-subtitle">The MinGW Free Documentation Licence</dt>
-</dl><!-- masthead -->
+<script class="masthead">
+/* Script fragment, to assign titles specific to this page; this is
+ * encapsulated within the "masthead", where such titles are displayed,
+ * to ensure that whatever page content may follow will be correctly
+ * positioned, relative to the masthead content.
+ */
+ set_page("title", "MinGW.OSDN Licensing");
+ set_page("subtitle", "The MinGW Free Documentation Licence");
+</script><!-- masthead -->
<p>Copyright © 2020, MinGW.OSDN Project
</p>
<p>Redistribution and use in source and ‘compiled’ forms
(SGML, HTML, PDF, PostScript, RTF, etc.) with or without modification,
are permitted provided that the following conditions are met:—
</p>
-<ol style="margin: 0.2em 0 0 0;">
+<ol>
<li style="padding-bottom: 0.2em;">
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer as
-->
<html lang="en">
<head>
- <meta charset="utf-8" />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Welcome to MinGW.OSDN</title>
<!--
* $Id$
<div id="header"></div>
<div class="page-view">
<div class="masthead">
- <h1 id="as-page-title"></h1>
- <h2 id="as-page-subtitle"></h2>
+ <!-- The HTML specification disallows empty headings -->
+ <!-- so, insert invisible place-holders, which we may -->
+ <!-- override later, by overlay page scripting -->
+ <h1 id="page-title"><span style="display:none">:</span></h1>
+ <h2 id="page-subtitle"><span style="display:none">:</span></h2>
</div><!-- masthead --><hr />
<div id="page-content"></div>
</div><!-- page-view -->
* ” right (closing) typographic double quote
*
-->
-<dl class="masthead"><!-- hidden for masthead class -->
-<!-- FIXME: is there a better way to do this? We need to propagate
- content to the "as-page-title" and "as-page-subtitle" place-holders,
- within the "page-content" div of "index.html"; our javascript page
- loader will explicitly look for these hidden elements, and copy
- their content into the corresponding visible place-holders.
--->
- <dt id="page-title">MinGW.OSDN Mailing-Lists</dt>
- <dt id="page-subtitle">Mailing-Lists and Mail Archives Operated by MinGW.OSDN</dt>
-</dl><!-- masthead -->
+<script class="masthead">
+/* Script fragment, to assign titles specific to this page; this is
+ * encapsulated within the "masthead", where such titles are displayed,
+ * to ensure that whatever page content may follow will be correctly
+ * positioned, relative to the masthead content.
+ */
+ set_page("title", "MinGW.OSDN Mailing-Lists");
+ set_page("subtitle", "Mailing-Lists and Mail Archives Operated by MinGW.OSDN");
+</script><!-- masthead -->
<p>MinGW.OSDN’s preferred method for communication,
between users and the project team, is by way of mailing‑lists.
Historically, there were several topic‑specific lists, originally
and repeated offenses may even lead to your posts being vetted,
and potentially rejected, by the list moderator.
</p>
-<ul style="padding-right: 1em">
+<ul>
<li>The language of the lists is <em><strong>English</strong></em> ;
if you post in any other language, you are unlikely to elicit a response.
</li>
* ” right (closing) typographic double quote
*
-->
-<dl class="masthead"><!-- hidden for masthead class -->
-<!-- FIXME: is there a better way to do this? We need to propagate
- content to the "as-page-title" and "as-page-subtitle" place-holders,
- within the "page-content" div of "index.html"; our javascript page
- loader will explicitly look for these hidden elements, and copy
- their content into the corresponding visible place-holders.
--->
- <dt id="page-title">MinGW.OSDN Server Error</dt>
- <dt id="page-subtitle">HTTP Status 404 — Requested Page Not Found</dt>
-</dl><!-- masthead -->
+<script class="masthead">
+/* Script fragment, to assign titles specific to this page; this is
+ * encapsulated within the "masthead", where such titles are displayed,
+ * to ensure that whatever page content may follow will be correctly
+ * positioned, relative to the masthead content.
+ */
+ set_page("title", "MinGW.OSDN Server Error");
+ set_page("subtitle", "HTTP Status 404 — Requested Page Not Found");
+</script><!-- masthead -->
<p>The requested URL,
“<span id="e404-missing-page"></span>”,
cannot be resolved.
*/
display: none;
}
-dl.masthead+p
+.masthead+p
{ /* The masthead section is separated from the remaining page
* content, by a horizontal rule; to keep white space balanced,
* above and below this rule, when it is immediately followed
*/
var element = document.getElementById( item );
if( element ) element.innerHTML = value;
+ return element;
}
-function no_break( text )
-{ /* Helper function to replace all occurrences of ASCII hyphen-minus,
- * within "text", by substitution of HTML non-breaking hyphen.
+function set_page( title, text )
+{ /* Helper function, for use in overlay page scripts, to update
+ * the "title" and "subtitle" fields within the page header; note
+ * that "text" may, and should, use ASCII hyphen-minus where any
+ * hyphen is to be represented; these will be replaced by HTML
+ * non-breaking hyphen entities, on header field assignment.
*/
- return text.replace( /-/g, "‑" );
-}
-
-function update_page_content_header( tag )
-{ /* Update the "page-title" and "page-subtitle" content-header text,
- * by substitution into the "as-page-title" and "as-page-subtitle"
- * place-holder elements, respectively.
- */
- var element = document.getElementById( "page-".concat( tag ));
- if( element )
- { if( tag == "title" ) document.title = element.innerHTML;
- set_content( "as-page-".concat( tag ), no_break( element.innerHTML ));
- }
+ if( title == "title" ) document.title = text;
+ set_content( "page-".concat( title ), text.replace( /-/g, "‑" ));
}
function load_content( container, src )
{ if( this.readyState == this.DONE )
switch( this.status )
{ case 200:
- set_content( container, this.responseText );
- update_page_content_header( "title" );
- update_page_content_header( "subtitle" );
+ var element = set_content( container, this.responseText );
+ var idx; element = element.getElementsByTagName( "script" );
set_content( "e404-missing-page", document.URL );
+ for( idx = 0; idx < element.length; idx++ )
+ { var onload_action = Function( element[idx].innerHTML );
+ onload_action();
+ }
if( src.includes("#") )
{ src = src.substring( src.indexOf("#") + 1, src.length );
element = document.getElementById( src );
* ” right (closing) typographic double quote
*
-->
-<dl class="masthead"><!-- hidden for masthead class -->
-<!-- FIXME: is there a better way to do this? We need to propagate
- content to the "as-page-title" and "as-page-subtitle" place-holders,
- within the "page-content" div of "index.html"; our javascript page
- loader will explicitly look for these hidden elements, and copy
- their content into the corresponding visible place-holders.
--->
- <dt id="page-title">MinGW.OSDN Licensing</dt>
- <dt id="page-subtitle">Terms of Use for MinGW.OSDN Products and Resources</dt>
-</dl><!-- masthead -->
+<script class="masthead">
+/* Script fragment, to assign titles specific to this page; this is
+ * encapsulated within the "masthead", where such titles are displayed,
+ * to ensure that whatever page content may follow will be correctly
+ * positioned, relative to the masthead content.
+ */
+ set_page("title", "MinGW.OSDN Licensing");
+ set_page("subtitle", "Terms of Use for MinGW.OSDN Products and Resources");
+</script><!-- masthead -->
<div class="h3-numbered">
<p>Each of the various packages,
which are distributed by MinGW.OSDN,