HTML source code, style-sheets, scripts, and images for deployment on mingw.osdn.io
Revision | 24c7b59d9252f75b9b90a7a9bd4f27bfd34bcc60 (tree) |
---|---|
Time | 2020-10-09 23:12:25 |
Author | ![]() |
Commiter | Keith Marshall |
Add generic page overlay to report missing content.
* missing.html: New file.
* site.js (load_content) [status 404]: Use it.
(load_page_content): Initially, clear previous content.
* header.html (Downloads, Documentation, Contact Us): Add "onclick"
tab references; defer provision of content, raising 404 status.
@@ -39,20 +39,41 @@ | ||
39 | 39 | * OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
40 | 40 | * DAMAGE. |
41 | 41 | * |
42 | + * | |
43 | + * Note: this page assumes browser support for the following numeric | |
44 | + * HTML entity codes: | |
45 | + * | |
46 | + * ‑ non-breaking hyphen | |
47 | + * ’ typographic apostrophe | |
48 | + * | |
42 | 49 | --> |
43 | 50 | <a href="index.html"><div id="logo"></div></a> |
44 | 51 | <div class="text"> |
45 | 52 | <h1>Minimalist GNU for Windows</h1> |
46 | 53 | <ul id="navbar"> |
47 | 54 | <li><a href="index.html">Home</a></li> |
48 | - <li><a href="#">Downloads</a></li> | |
55 | + <li><a onclick="load_page_overlay('download.html', | |
56 | + 'MinGW Downloads', 'MinGW.org File Release System')" | |
57 | + href="#" | |
58 | + >Downloads</a> | |
59 | + </li> | |
49 | 60 | <li><a onclick="load_page_overlay('terms.html', 'MinGW Licensing', |
50 | 61 | 'Terms of Use for MinGW.org Products and Resources')" |
51 | 62 | href="#" |
52 | 63 | >Licensing</a> |
53 | 64 | </li> |
54 | - <li><a href="#">Documentation</a></li> | |
55 | - <li><a href="#">Contact Us</a></li> | |
65 | + <li><a onclick="load_page_overlay('docrefs.html', | |
66 | + 'MinGW Product Documentation', | |
67 | + 'Links to Documentation Resources for MinGW.org Products')" | |
68 | + href="#" | |
69 | + >Documentation</a> | |
70 | + </li> | |
71 | + <li><a onclick="load_page_overlay('contact.html', | |
72 | + 'Contacting MinGW.org', | |
73 | + 'When the Web‑Site doesn’t Provide an Answer')" | |
74 | + href="#" | |
75 | + >Contact Us</a> | |
76 | + </li> | |
56 | 77 | </ul> |
57 | 78 | </div> |
58 | 79 |
@@ -0,0 +1,62 @@ | ||
1 | +<!DOCTYPE HTML><!-- | |
2 | + * | |
3 | + * missing.html | |
4 | + * | |
5 | + * Generic page overlay, to display when any requested page overlay | |
6 | + * is unresolved. | |
7 | + * | |
8 | + * | |
9 | + * $Id$ | |
10 | + * | |
11 | + * Written by Keith Marshall <keith@users.osdn.me> | |
12 | + * Copyright (C) 2020, MinGW.org Project | |
13 | + * | |
14 | + * | |
15 | + * Redistribution and use in source and 'compiled' forms (SGML, HTML, | |
16 | + * PDF, PostScript, RTF, etc) with or without modification, are permitted | |
17 | + * provided that the following conditions are met: | |
18 | + * | |
19 | + * 1. Redistributions of source code must retain the above copyright | |
20 | + * notice, this list of conditions and the following disclaimer as | |
21 | + * the first lines of this file, unmodified. | |
22 | + * | |
23 | + * 2. Redistributions in compiled form (transformed to other DTDs, | |
24 | + * converted to PDF, PostScript, RTF and other formats) must | |
25 | + * reproduce the above copyright notice, this list of conditions | |
26 | + * and the following disclaimer in the documentation and/or other | |
27 | + * materials provided with the distribution. | |
28 | + * | |
29 | + * THIS DOCUMENTATION IS PROVIDED BY THE MINGW.ORG PROJECT "AS IS" AND | |
30 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
31 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
32 | + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE MINGW.ORG PROJECT, OR | |
33 | + * ITS CONTRIBUTORS, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
34 | + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
35 | + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
36 | + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
37 | + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
38 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
39 | + * OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | |
40 | + * DAMAGE. | |
41 | + * | |
42 | + * | |
43 | + * Note: this page assumes browser support for the following numeric | |
44 | + * HTML entity codes: | |
45 | + * | |
46 | + * ‑ non-breaking hyphen | |
47 | + * ’ typographic apostrophe | |
48 | + * | |
49 | +--> | |
50 | +<h2>Page Not Found</h2> | |
51 | +<p>The MinGW.org web‑site is undergoing an overhaul, | |
52 | +whilst in the process of transferring to a new hosting provider. | |
53 | +During this transitional phase, | |
54 | +some pages may be temporarily unavailable. | |
55 | +</p> | |
56 | +<p>If you see this page, | |
57 | +it is likely that the content you are trying to access | |
58 | +has not yet been transferred; | |
59 | +please check back later. | |
60 | +</p> | |
61 | + | |
62 | +<!-- $RCSfile$: end of file --> |
@@ -47,8 +47,14 @@ function load_content( container, src ) | ||
47 | 47 | */ |
48 | 48 | var request_handler = new XMLHttpRequest(); |
49 | 49 | request_handler.onreadystatechange = function() |
50 | - { if( (this.readyState == this.DONE) && (this.status == 200) ) | |
51 | - set_content( container, this.responseText ); | |
50 | + { if( this.readyState == this.DONE ) | |
51 | + switch( this.status ) | |
52 | + { case 200: | |
53 | + set_content( container, this.responseText ); | |
54 | + break; | |
55 | + case 404: | |
56 | + load_content( container, "missing.html" ); | |
57 | + } | |
52 | 58 | } |
53 | 59 | request_handler.open( "GET", src, true ); |
54 | 60 | request_handler.send(); |
@@ -59,6 +65,7 @@ function load_page_content( src, subtitle ) | ||
59 | 65 | * update the displayed page subtitle, (which may be null), and |
60 | 66 | * load the page content from the specified "src" file. |
61 | 67 | */ |
68 | + set_content( "page-content", null ); | |
62 | 69 | set_content( "page-title", document.title ); |
63 | 70 | set_content( "page-subtitle", subtitle ); |
64 | 71 | load_content( "page-content", src ); |