diff --git a/files/Obuv.webp b/files/Obuv.webp
deleted file mode 100644
index 2a0972a..0000000
Binary files a/files/Obuv.webp and /dev/null differ
diff --git a/public/assets/images/footer_bg.webp b/public/assets/images/footer_bg.webp
new file mode 100644
index 0000000..6e88a8e
Binary files /dev/null and b/public/assets/images/footer_bg.webp differ
diff --git a/src/app/app.html b/src/app/app.html
index e8a2757..3b4e3f4 100644
--- a/src/app/app.html
+++ b/src/app/app.html
@@ -16,6 +16,9 @@
} @else {
+ @if (!isHomePage()) {
+
+ }
diff --git a/src/app/app.ts b/src/app/app.ts
index 48d8486..e5fdde7 100644
--- a/src/app/app.ts
+++ b/src/app/app.ts
@@ -1,19 +1,20 @@
import { Component, OnInit, OnDestroy, signal, ApplicationRef } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { RouterOutlet } from '@angular/router';
+import { Router, RouterOutlet, NavigationEnd } from '@angular/router';
import { Title } from '@angular/platform-browser';
import { HeaderComponent } from './components/header/header.component';
import { FooterComponent } from './components/footer/footer.component';
+import { BackButtonComponent } from './components/back-button/back-button.component';
import { ApiService } from './services';
import { Subscription, interval, concat } from 'rxjs';
-import { first } from 'rxjs/operators';
+import { filter, first } from 'rxjs/operators';
import { environment } from '../environments/environment';
import { SwUpdate } from '@angular/service-worker';
@Component({
selector: 'app-root',
- imports: [RouterOutlet, HeaderComponent, FooterComponent, CommonModule],
+ imports: [RouterOutlet, HeaderComponent, FooterComponent, BackButtonComponent, CommonModule],
templateUrl: './app.html',
styleUrl: './app.scss'
})
@@ -21,14 +22,17 @@ export class App implements OnInit, OnDestroy {
protected title = environment.brandName;
serverAvailable = signal(true);
checkingServer = signal(true);
+ isHomePage = signal(true);
private pingSubscription?: Subscription;
private updateSubscription?: Subscription;
+ private routerSubscription?: Subscription;
constructor(
private apiService: ApiService,
private titleService: Title,
private swUpdate: SwUpdate,
- private appRef: ApplicationRef
+ private appRef: ApplicationRef,
+ private router: Router
) {}
ngOnInit(): void {
@@ -36,6 +40,14 @@ export class App implements OnInit, OnDestroy {
this.titleService.setTitle(`${environment.brandFullName} - Маркетплейс товаров и услуг`);
this.checkServerHealth();
this.setupAutoUpdates();
+
+ // Track route changes to show/hide back button
+ this.routerSubscription = this.router.events
+ .pipe(filter(event => event instanceof NavigationEnd))
+ .subscribe((event) => {
+ const url = (event as NavigationEnd).urlAfterRedirects || (event as NavigationEnd).url;
+ this.isHomePage.set(url === '/' || url === '/home' || url === '');
+ });
}
checkServerHealth(): void {
@@ -84,6 +96,7 @@ export class App implements OnInit, OnDestroy {
ngOnDestroy(): void {
this.pingSubscription?.unsubscribe();
this.updateSubscription?.unsubscribe();
+ this.routerSubscription?.unsubscribe();
}
retryConnection(): void {
diff --git a/src/app/components/back-button/back-button.component.ts b/src/app/components/back-button/back-button.component.ts
new file mode 100644
index 0000000..ba2dbb0
--- /dev/null
+++ b/src/app/components/back-button/back-button.component.ts
@@ -0,0 +1,69 @@
+import { Component } from '@angular/core';
+import { Location } from '@angular/common';
+import { environment } from '../../../environments/environment';
+
+@Component({
+ selector: 'app-back-button',
+ standalone: true,
+ template: `
+ @if (!isnovo) {
+
+ }
+ `,
+ styles: [`
+ .dexar-back-btn {
+ position: fixed;
+ top: 76px;
+ left: 20px;
+ z-index: 100;
+ background: none;
+ border: none;
+ cursor: pointer;
+ padding: 4px;
+ transition: transform 0.2s ease;
+
+ svg path {
+ transition: fill 0.2s ease, fill-opacity 0.2s ease;
+ }
+
+ &:hover {
+ transform: scale(1.08);
+
+ svg path {
+ fill: #A1B4B5;
+ fill-opacity: 1;
+ }
+ }
+
+ &:active {
+ transform: scale(0.95);
+ }
+ }
+
+ @media (max-width: 768px) {
+ .dexar-back-btn {
+ top: 68px;
+ left: 12px;
+
+ svg {
+ width: 30px;
+ height: 20px;
+ }
+ }
+ }
+ `]
+})
+export class BackButtonComponent {
+ isnovo = environment.theme === 'novo';
+
+ constructor(private location: Location) {}
+
+ goBack(): void {
+ this.location.back();
+ }
+}
diff --git a/src/app/components/footer/footer.component.html b/src/app/components/footer/footer.component.html
index 82d59ad..955ae27 100644
--- a/src/app/components/footer/footer.component.html
+++ b/src/app/components/footer/footer.component.html
@@ -49,49 +49,60 @@
} @else {
-
-