Страница 404 и правки
This commit is contained in:
Kataev Denis 2022-09-29 10:09:15 +04:00
parent 836af4e1ae
commit bb455b2c45
7 changed files with 82 additions and 5 deletions

View File

@ -32,6 +32,7 @@ import { QRCodeModule } from 'angularx-qrcode';
import { ShareButtonsModule } from 'ngx-sharebuttons/buttons';
import { ShareIconsModule } from 'ngx-sharebuttons/icons';
import { MessagingService } from './services/messaging.service';
import { NotFoundComponent } from './pages/not-found/not-found.component';
@NgModule({
declarations: [
@ -47,16 +48,18 @@ import { MessagingService } from './services/messaging.service';
OrderInfoComponent,
FooterButtonsComponent,
UserDataComponent,
RefSystemComponent
RefSystemComponent,
NotFoundComponent
],
imports: [
BrowserModule,
AppRoutingModule,
RouterModule.forRoot([
{
path: '**',
path: '',
component: MainComponent
}
},
{ path: '**', component: NotFoundComponent }
]),
InputMaskModule,
ProgressSpinnerModule,

View File

@ -35,7 +35,7 @@ export class RefSystemComponent implements OnInit {
if (navigator.share) {
navigator.share({
title: document.title,
text: "Fashion Logica",
text: "Fashionlogica",
url: this.refUrl
})
.then(() => console.log('Successful share'))

View File

@ -0,0 +1,8 @@
<div class="not-found-page">
<app-navbar></app-navbar>
<div class="not-found-page__container">
<h1>404</h1>
<p>Упс, что-то пошло не так!</p>
<button>Вернуться на главную</button>
</div>
</div>

View File

@ -0,0 +1,28 @@
:host {
.not-found-page {
&__container {
text-align: center;
margin-top: 32px;
h1 {
font-size: 108px;
font-weight: 600;
color: #09467f;
}
p {
margin: 16px 0;
font-size: 14px;
}
button {
background-color: #09467f;
color: #fff;
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 12px;
margin: 0 auto;
border: 0;
}
}
}
}

View File

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NotFoundComponent } from './not-found.component';
describe('NotFoundComponent', () => {
let component: NotFoundComponent;
let fixture: ComponentFixture<NotFoundComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ NotFoundComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(NotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-not-found',
templateUrl: './not-found.component.html',
styleUrls: ['./not-found.component.scss']
})
export class NotFoundComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

View File

@ -2,7 +2,7 @@
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Fashion logica</title>
<title>Fashionlogica</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="./assets/icons/apple-icon-180x180.png">