Skip to content

Commit b6bd653

Browse files
committed
fix: 用 index 代替 404 页面
1 parent f1c4ede commit b6bd653

File tree

1 file changed

+36
-52
lines changed

1 file changed

+36
-52
lines changed

404.html

+36-52
Original file line numberDiff line numberDiff line change
@@ -46,61 +46,45 @@
4646
document.head.appendChild(tag);
4747
</script>
4848

49+
<!-- Legacy Google Analytics -->
50+
<script>
51+
// Note this is a customised version of the GA tracking snippet
52+
// See the comments below for more info
53+
(function (i, s, o, g, r, a, m) {
54+
if (i.trustedTypes) {
55+
// Specify path as a TrustedScriptURL when Trusted Types are available
56+
g = i.trustedTypes.createPolicy('aio#analytics', {
57+
createScriptURL: function (s) { return s; }
58+
}).createScriptURL(g);
59+
}
60+
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
61+
(i[r].q = i[r].q || []).push(arguments)
62+
}, i[r].l = 1 * new Date(); a = s.createElement(o),
63+
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g;
64+
~i.name.indexOf('NG_DEFER_BOOTSTRAP') || // only load library if not running e2e tests
65+
m.parentNode.insertBefore(a, m)
66+
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
67+
</script>
68+
<!-- End Legacy Google Analytics -->
4969
<link rel="stylesheet" href="styles.c9ea175d409df91f.css"></head>
5070

5171
<body>
52-
<!--
53-
This content replaces the `<body>` content of `index.html` to generate our custom `404.html` page.
54-
The content must visually and structurally resemble the resulting HTML of the main app for not
55-
found pages (e.g. https://angular.io/not/exist.ing).
56-
-->
57-
58-
<style>
59-
.mat-toolbar-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}
60-
.mat-toolbar-row{height:64px}
61-
@media (max-width:600px){.mat-toolbar-row{height:56px}}
62-
.nav-link.home{margin-left:24px}
63-
</style>
64-
65-
<aio-shell class="mode-stable page-file-not-found folder-file-not-found view- aio-notification-hide">
66-
67-
<mat-toolbar class="app-toolbar no-print mat-toolbar mat-primary">
68-
<mat-toolbar-row class="mat-toolbar-row">
69-
<a class="nav-link home" href="/">
70-
<img alt="Home" height="40" src="assets/images/logos/angular/[email protected]" title="Home" width="150">
71-
</a>
72-
</mat-toolbar-row>
73-
</mat-toolbar>
74-
75-
<mat-sidenav-container class="sidenav-container mat-drawer-container mat-sidenav-container" role="main">
76-
<mat-sidenav-content class="mat-drawer-content mat-sidenav-content">
77-
<section class="sidenav-content" role="article">
78-
<aio-doc-viewer>
79-
<div class="content">
80-
<div class="nf-container l-flex-wrap flex-center">
81-
<img src="assets/images/support/angular-404.svg" width="300" height="300" alt="not found"/>
82-
<div class="nf-response l-flex-wrap center">
83-
<h1 class="no-toc" id="page-not-found">资源未找到</h1>
84-
<p>抱歉,您要访问的资源未找到。</p>
85-
</div>
86-
</div>
87-
</div>
88-
</aio-doc-viewer>
89-
</section>
90-
</mat-sidenav-content>
91-
</mat-sidenav-container>
92-
93-
<footer class="no-print">
94-
<aio-footer>
95-
<p>
96-
Powered by Google ©2010-2022.
97-
Code licensed under an <a href="license" title="License text">MIT-style License</a>.
98-
Documentation licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
99-
</p>
100-
</aio-footer>
101-
</footer>
10272

103-
</aio-shell>
104-
</body>
73+
<aio-shell></aio-shell>
74+
75+
<noscript>
76+
<div class="background-sky hero"></div>
77+
<section id="intro" style="text-shadow: 1px 1px #1976d2;">
78+
<div class="hero-logo"></div>
79+
<div class="homepage-container">
80+
<div class="hero-headline">现代 Web 开发平台</div>
81+
</div>
82+
</section>
83+
<h2 style="color: red; margin-top: 40px; position: relative; text-align: center; text-shadow: 1px 1px #fafafa; border-top: none;">
84+
<strong><i>本站点需要启用 JavaScript。</i></strong>
85+
</h2>
86+
</noscript>
87+
88+
<script src="runtime.64dd464cfca39935.js" type="module"></script><script src="polyfills.ba72fe2507098bf4.js" type="module"></script><script src="main.7c2f13ca20a1b36b.js" type="module"></script></body>
10589

10690
</html>

0 commit comments

Comments
 (0)