Skip to content

Commit d9beef2

Browse files
feat(app): fix language issue
1 parent c993029 commit d9beef2

5 files changed

Lines changed: 334 additions & 7 deletions

File tree

src/app/modules/root/shared/header/header.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
<div mat-menu-item *ngFor="let lang of languages">
3333
<a
3434
class="language-link"
35-
href="{{ lang.name === 'en' ? currentUrl : '/' + lang.name + currentUrl }}"
35+
href="{{ host }}{{
36+
lang.name === 'en' ? currentUrl : '/' + (lang.name + currentUrl)
37+
}}"
3638
(click)="changeLanguage(lang.name)"
3739
>
3840
<mat-icon>flag</mat-icon>

src/app/modules/root/shared/header/header.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { NavigationEnd, Router } from '@angular/router';
44
import { ROUTES_CONFIG, RoutesConfig } from '~app/configs/routes.config';
55
import { AuthService } from '../../../auth/auth.service';
66
import { StorageKey, StorageService } from '~shared/services/storage.service';
7+
import { environment } from '~environments/environment';
78

89
@Component({
910
selector: 'app-header',
@@ -12,6 +13,7 @@ import { StorageKey, StorageService } from '~shared/services/storage.service';
1213
})
1314
export class HeaderComponent implements OnInit {
1415
selectedLanguage: string;
16+
host: string;
1517
currentUrl: string;
1618
languages: any[];
1719
isLoggedIn: boolean;
@@ -23,6 +25,7 @@ export class HeaderComponent implements OnInit {
2325
private authService: AuthService,
2426
private router: Router
2527
) {
28+
this.host = environment.host;
2629
this.selectedLanguage = '';
2730
this.currentUrl = '';
2831
this.languages = [

src/assets/base/404.html

Lines changed: 326 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<base href="/" />
4+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="" />
5+
<base href="https://ismaestro.github.io/angular-example-app/" />
56
<title>Angular Example App</title>
67
<meta
78
name="description"
@@ -29,15 +30,330 @@
2930
<meta property="og:image" content="./assets/images/og.jpg" />
3031
<meta property="og:image:secure_url" content="./assets/images/og.jpg" />
3132
<meta property="og:image:type" content="image/jpg" />
32-
<meta property="og:url" content="https://angularexampleapp.com" />
33+
<meta property="og:url" content="https://ismaestro.github.io/angular-example-app" />
3334
<meta name="viewport" content="width=device-width, initial-scale=1" />
3435
<link rel="apple-touch-icon" sizes="152x152" href="/assets/icons/icon-152x152.png" />
35-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
36-
<link rel="canonical" href="https://angularexampleapp.com/" />
36+
<style type="text/css">
37+
@font-face {
38+
font-family: 'Material Icons';
39+
font-style: normal;
40+
font-weight: 400;
41+
src: url(https://fonts.gstatic.com/s/materialicons/v127/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2)
42+
format('woff2');
43+
}
44+
.material-icons {
45+
font-family: 'Material Icons';
46+
font-weight: normal;
47+
font-style: normal;
48+
font-size: 24px;
49+
line-height: 1;
50+
letter-spacing: normal;
51+
text-transform: none;
52+
display: inline-block;
53+
white-space: nowrap;
54+
word-wrap: normal;
55+
direction: ltr;
56+
-webkit-font-feature-settings: 'liga';
57+
-webkit-font-smoothing: antialiased;
58+
}
59+
</style>
60+
<link rel="canonical" href="https://ismaestro.github.io/angular-example-app/" />
3761
<link rel="shortcut icon" href="./assets/images/favicon.ico" />
3862
<link rel="icon" type="image/x-icon" href="./assets/images/favicon.ico" />
39-
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet" />
40-
<link rel="manifest" href="/manifest.webmanifest" />
63+
<style type="text/css">
64+
@font-face {
65+
font-family: 'Roboto';
66+
font-style: normal;
67+
font-weight: 300;
68+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2)
69+
format('woff2');
70+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
71+
}
72+
@font-face {
73+
font-family: 'Roboto';
74+
font-style: normal;
75+
font-weight: 300;
76+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2)
77+
format('woff2');
78+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
79+
}
80+
@font-face {
81+
font-family: 'Roboto';
82+
font-style: normal;
83+
font-weight: 300;
84+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2)
85+
format('woff2');
86+
unicode-range: U+1F00-1FFF;
87+
}
88+
@font-face {
89+
font-family: 'Roboto';
90+
font-style: normal;
91+
font-weight: 300;
92+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2)
93+
format('woff2');
94+
unicode-range: U+0370-03FF;
95+
}
96+
@font-face {
97+
font-family: 'Roboto';
98+
font-style: normal;
99+
font-weight: 300;
100+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2)
101+
format('woff2');
102+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
103+
U+1EA0-1EF9, U+20AB;
104+
}
105+
@font-face {
106+
font-family: 'Roboto';
107+
font-style: normal;
108+
font-weight: 300;
109+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2)
110+
format('woff2');
111+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
112+
U+2C60-2C7F, U+A720-A7FF;
113+
}
114+
@font-face {
115+
font-family: 'Roboto';
116+
font-style: normal;
117+
font-weight: 300;
118+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2)
119+
format('woff2');
120+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
121+
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
122+
}
123+
@font-face {
124+
font-family: 'Roboto';
125+
font-style: normal;
126+
font-weight: 400;
127+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2)
128+
format('woff2');
129+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
130+
}
131+
@font-face {
132+
font-family: 'Roboto';
133+
font-style: normal;
134+
font-weight: 400;
135+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2)
136+
format('woff2');
137+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
138+
}
139+
@font-face {
140+
font-family: 'Roboto';
141+
font-style: normal;
142+
font-weight: 400;
143+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2)
144+
format('woff2');
145+
unicode-range: U+1F00-1FFF;
146+
}
147+
@font-face {
148+
font-family: 'Roboto';
149+
font-style: normal;
150+
font-weight: 400;
151+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2)
152+
format('woff2');
153+
unicode-range: U+0370-03FF;
154+
}
155+
@font-face {
156+
font-family: 'Roboto';
157+
font-style: normal;
158+
font-weight: 400;
159+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2)
160+
format('woff2');
161+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
162+
U+1EA0-1EF9, U+20AB;
163+
}
164+
@font-face {
165+
font-family: 'Roboto';
166+
font-style: normal;
167+
font-weight: 400;
168+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2)
169+
format('woff2');
170+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
171+
U+2C60-2C7F, U+A720-A7FF;
172+
}
173+
@font-face {
174+
font-family: 'Roboto';
175+
font-style: normal;
176+
font-weight: 400;
177+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2)
178+
format('woff2');
179+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
180+
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
181+
}
182+
@font-face {
183+
font-family: 'Roboto';
184+
font-style: normal;
185+
font-weight: 700;
186+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2)
187+
format('woff2');
188+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
189+
}
190+
@font-face {
191+
font-family: 'Roboto';
192+
font-style: normal;
193+
font-weight: 700;
194+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2)
195+
format('woff2');
196+
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
197+
}
198+
@font-face {
199+
font-family: 'Roboto';
200+
font-style: normal;
201+
font-weight: 700;
202+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2)
203+
format('woff2');
204+
unicode-range: U+1F00-1FFF;
205+
}
206+
@font-face {
207+
font-family: 'Roboto';
208+
font-style: normal;
209+
font-weight: 700;
210+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2)
211+
format('woff2');
212+
unicode-range: U+0370-03FF;
213+
}
214+
@font-face {
215+
font-family: 'Roboto';
216+
font-style: normal;
217+
font-weight: 700;
218+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2)
219+
format('woff2');
220+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
221+
U+1EA0-1EF9, U+20AB;
222+
}
223+
@font-face {
224+
font-family: 'Roboto';
225+
font-style: normal;
226+
font-weight: 700;
227+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2)
228+
format('woff2');
229+
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
230+
U+2C60-2C7F, U+A720-A7FF;
231+
}
232+
@font-face {
233+
font-family: 'Roboto';
234+
font-style: normal;
235+
font-weight: 700;
236+
src: url(https://fonts.gstatic.com/s/roboto/v29/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2)
237+
format('woff2');
238+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
239+
U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
240+
}
241+
</style>
242+
<link
243+
rel="manifest"
244+
href="https://ismaestro.github.io/angular-example-app/manifest.webmanifest"
245+
/>
246+
<style>
247+
html,
248+
body,
249+
div {
250+
margin: 0;
251+
padding: 0;
252+
border: 0;
253+
font: inherit;
254+
vertical-align: baseline;
255+
}
256+
html,
257+
body {
258+
height: 100%;
259+
}
260+
body {
261+
line-height: 1;
262+
}
263+
html {
264+
height: 100%;
265+
}
266+
body {
267+
min-height: 100%;
268+
}
269+
.loading-page {
270+
height: 100%;
271+
width: 100%;
272+
position: absolute;
273+
background: #3f51b5;
274+
}
275+
.spinner {
276+
position: absolute;
277+
left: 48%;
278+
top: 40%;
279+
width: 55px;
280+
height: 65px;
281+
text-align: center;
282+
}
283+
.spinner {
284+
position: absolute;
285+
left: 48%;
286+
top: 40%;
287+
text-align: center;
288+
margin: 20px auto;
289+
width: 40px;
290+
height: 40px;
291+
transform: rotate(45deg);
292+
}
293+
.spinner .sk-cube {
294+
float: left;
295+
width: 50%;
296+
height: 50%;
297+
position: relative;
298+
transform: scale(1.1);
299+
}
300+
.spinner .sk-cube:before {
301+
content: '';
302+
position: absolute;
303+
top: 0;
304+
left: 0;
305+
width: 100%;
306+
height: 100%;
307+
background-color: #fff;
308+
animation: sk-foldCubeAngle 2.4s infinite linear both;
309+
transform-origin: 100% 100%;
310+
}
311+
.spinner .sk-cube2 {
312+
transform: scale(1.1) rotate(90deg);
313+
}
314+
.spinner .sk-cube3 {
315+
transform: scale(1.1) rotate(180deg);
316+
}
317+
.spinner .sk-cube4 {
318+
transform: scale(1.1) rotate(270deg);
319+
}
320+
.spinner .sk-cube2:before {
321+
animation-delay: 0.3s;
322+
}
323+
.spinner .sk-cube3:before {
324+
animation-delay: 0.6s;
325+
}
326+
.spinner .sk-cube4:before {
327+
animation-delay: 0.9s;
328+
}
329+
@keyframes sk-foldCubeAngle {
330+
0%,
331+
10% {
332+
transform: perspective(140px) rotateX(-180deg);
333+
opacity: 0;
334+
}
335+
25%,
336+
75% {
337+
transform: perspective(140px) rotateX(0);
338+
opacity: 1;
339+
}
340+
90%,
341+
to {
342+
transform: perspective(140px) rotateY(180deg);
343+
opacity: 0;
344+
}
345+
}
346+
* {
347+
font-family: Roboto, Helvetica, Arial, sans-serif;
348+
}
349+
</style>
350+
<link
351+
rel="stylesheet"
352+
href="styles.a0dfdc5fbf9f8225.css"
353+
media="print"
354+
onload="this.media='all'"
355+
/>
356+
<noscript><link rel="stylesheet" href="styles.a0dfdc5fbf9f8225.css" /></noscript>
41357
</head>
42358
<body>
43359
<!-- Google Tag Manager (noscript) -->
@@ -60,5 +376,9 @@
60376
</div>
61377
</div>
62378
</app-root>
379+
<script src="runtime.54a035f8a3a764ab.js" type="module"></script>
380+
<script src="polyfills.3225dd479d572191.js" type="module"></script>
381+
<script src="scripts.59b87b0433d537df.js" defer></script>
382+
<script src="main.1a240a40d1af8a41.js" type="module"></script>
63383
</body>
64384
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const environment = {
22
production: true,
3+
baseUrl: 'https://ismaestro.github.io/angular-example-app',
34
graphqlHost: 'https://nestjs-example-app.herokuapp.com/',
45
};

0 commit comments

Comments
 (0)