• R/O
  • HTTP
  • SSH
  • HTTPS

website: 提交

HTML source code, style-sheets, scripts, and images for deployment on mingw.osdn.io


Commit MetaInfo

修訂24c7b59d9252f75b9b90a7a9bd4f27bfd34bcc60 (tree)
時間2020-10-09 23:12:25
作者Keith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

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.

Change Summary

差異

--- a/header.html
+++ b/header.html
@@ -39,20 +39,41 @@
3939 * OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
4040 * DAMAGE.
4141 *
42+ *
43+ * Note: this page assumes browser support for the following numeric
44+ * HTML entity codes:
45+ *
46+ * &#8209; non-breaking hyphen
47+ * &#8217; typographic apostrophe
48+ *
4249 -->
4350 <a href="index.html"><div id="logo"></div></a>
4451 <div class="text">
4552 <h1>Minimalist GNU for Windows</h1>
4653 <ul id="navbar">
4754 <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>
4960 <li><a onclick="load_page_overlay('terms.html', 'MinGW Licensing',
5061 'Terms of Use for MinGW.org Products and Resources')"
5162 href="#"
5263 >Licensing</a>
5364 </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&#8209;Site doesn&#8217;t Provide an Answer')"
74+ href="#"
75+ >Contact Us</a>
76+ </li>
5677 </ul>
5778 </div>
5879
--- /dev/null
+++ b/missing.html
@@ -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+ * &#8209; non-breaking hyphen
47+ * &#8217; typographic apostrophe
48+ *
49+-->
50+<h2>Page Not Found</h2>
51+<p>The MinGW.org web&#8209;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 -->
--- a/site.js
+++ b/site.js
@@ -47,8 +47,14 @@ function load_content( container, src )
4747 */
4848 var request_handler = new XMLHttpRequest();
4949 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+ }
5258 }
5359 request_handler.open( "GET", src, true );
5460 request_handler.send();
@@ -59,6 +65,7 @@ function load_page_content( src, subtitle )
5965 * update the displayed page subtitle, (which may be null), and
6066 * load the page content from the specified "src" file.
6167 */
68+ set_content( "page-content", null );
6269 set_content( "page-title", document.title );
6370 set_content( "page-subtitle", subtitle );
6471 load_content( "page-content", src );
Show on old repository browser