File tree Expand file tree Collapse file tree 7 files changed +82
-1
lines changed Expand file tree Collapse file tree 7 files changed +82
-1
lines changed Original file line number Diff line number Diff line change 29
29
"tsConfig" : " tsconfig.app.json" ,
30
30
"inlineStyleLanguage" : " scss" ,
31
31
"assets" : [
32
+ " src/404.html" ,
32
33
" src/favicon.png" ,
33
34
" src/robots.txt" ,
34
35
" src/assets" ,
Original file line number Diff line number Diff line change 10
10
/news
11
11
/playground
12
12
/contributors
13
+ /settings
14
+ /privacy
15
+ /cookies
16
+ /404
Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ def fetch_news_routes(base_url: str):
62
62
return routes
63
63
64
64
65
+ def fetch_contributor_routes (base_url : str ):
66
+ routes = []
67
+
68
+ for item in load_all_feed_items (base_url , 'contributors' ):
69
+ routes .append (f'/contributors/{ item ["_username" ]} ' )
70
+
71
+ return routes
72
+
73
+
65
74
def fetch_academy_routes (base_url : str ):
66
75
routes = []
67
76
@@ -81,7 +90,7 @@ def fetch_academy_routes(base_url: str):
81
90
82
91
83
92
def generate (base_url : str ):
84
- routes = fetch_academy_routes (base_url ) + fetch_news_routes (base_url )
93
+ routes = fetch_academy_routes (base_url ) + fetch_news_routes (base_url ) + fetch_contributor_routes ( base_url )
85
94
return '\n ' .join (routes )
86
95
87
96
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < title > SYCL.tech - 404</ title >
5
+ < meta http-equiv ="refresh " content ="0; url=/404 ">
6
+ < script type ="text/javascript "> window . location . href = "/404" </ script >
7
+ < link rel ="icon " type ="image/png " href ="favicon.png "/>
8
+ </ head >
9
+ < body > </ body >
10
+ </ html >
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import { PlaygroundComponent } from './pages/playground/playground.component';
35
35
import { CookiesComponent } from './pages/cookies/cookies.component' ;
36
36
import { PrivacyComponent } from './pages/privacy/privacy.component' ;
37
37
import { SettingsComponent } from './pages/settings/settings.component' ;
38
+ import { Error404Component } from './pages/404/error-404.component' ;
38
39
39
40
export const routes : Routes = [
40
41
{
@@ -114,4 +115,13 @@ export const routes: Routes = [
114
115
path : 'contributors/:username' ,
115
116
component : ContributorComponent
116
117
} ,
118
+ {
119
+ path : '404' ,
120
+ component : Error404Component ,
121
+ pathMatch : 'full'
122
+ } ,
123
+ {
124
+ path : '**' ,
125
+ redirectTo : '404'
126
+ }
117
127
] ;
Original file line number Diff line number Diff line change
1
+ < section id ="intro ">
2
+ < div class ="wrapper panel fancy intro ">
3
+ < div >
4
+ < header >
5
+ < h1 > 404 - Page Not Found</ h1 >
6
+ < h2 > This page seems to have gone missing. We're sorry about that! Please check back soon if you think this
7
+ should be here or report it to us.</ h2 >
8
+ </ header >
9
+ </ div >
10
+ < div >
11
+ < span class ="material-symbols-outlined panel-icon "> search_off</ span >
12
+ </ div >
13
+ </ div >
14
+ </ section >
Original file line number Diff line number Diff line change
1
+ /*---------------------------------------------------------------------------------------------
2
+ *
3
+ * Copyright (C) Codeplay Software Ltd.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ *--------------------------------------------------------------------------------------------*/
18
+
19
+ import { ChangeDetectionStrategy , Component } from '@angular/core' ;
20
+ import { CommonModule } from '@angular/common' ;
21
+
22
+ @Component ( {
23
+ selector : 'st-error-404' ,
24
+ standalone : true ,
25
+ imports : [
26
+ CommonModule
27
+ ] ,
28
+ templateUrl : './error-404.component.html' ,
29
+ changeDetection : ChangeDetectionStrategy . OnPush
30
+ } )
31
+ export class Error404Component {
32
+
33
+ }
You can’t perform that action at this time.
0 commit comments