sliders
parent
e2fc022d6c
commit
170a8fd6e8
|
|
@ -63,7 +63,7 @@
|
|||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: start;
|
||||
align-items: center;
|
||||
.preview {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="header">
|
||||
<a class="burger">
|
||||
<ico ico="burger_blue_40dp"></ico>
|
||||
<a class="burger" (click)="openMobileMenu()">
|
||||
<ico ico="burger_blue_40dp" [size]="36"></ico>
|
||||
|
||||
</a>
|
||||
<a [routerLink]="'glavnaia'" class="logo" >
|
||||
|
|
|
|||
|
|
@ -75,4 +75,8 @@ export class HeaderComponent {
|
|||
// if(!event.children?.data.length)
|
||||
this.showBottom = false;
|
||||
}
|
||||
|
||||
openMobileMenu(){
|
||||
this.router.navigate([{outlets: {slider: 'pages-menu'}}], {skipLocationChange: true}).then();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
<div class="slider-overlay" (click)="close()"></div>
|
||||
<div class="slider-bar">
|
||||
<div class="header">
|
||||
<div class="title">
|
||||
<h2>{{title}}</h2>
|
||||
<button type="button" class="close" (click)="close()"></button>
|
||||
</div>
|
||||
<slider>
|
||||
<div header>
|
||||
<h2>{{title}}</h2>
|
||||
<div class="stepper" *ngIf="frames.length > 1">
|
||||
<div class="items">
|
||||
<div class="item" *ngFor="let frame of frames; let i = index" [class.active]="frame.active">
|
||||
|
|
@ -14,16 +10,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<form-frame [formGroup]="formGroup" [form]="activeFrame" [readonly]="readonly" [params]="formParams"></form-frame>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<form-frame body [formGroup]="formGroup" [form]="activeFrame" [readonly]="readonly" [params]="formParams"></form-frame>
|
||||
<div footer>
|
||||
<div class="left">
|
||||
<div *ngIf="noticeVisible" class="notice">* Поля, обязательные для заполнения</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<button type="button" class="outline" (click)="back()">{{isFirstFrame ? 'Отмена' : 'Назад'}}</button>
|
||||
<button type="button" *ngIf="!btnSaveHidden" (click)="proceed()">{{isLastFrame ? btnSaveLabel : 'Продолжить'}}</button>
|
||||
</div>
|
||||
<button type="button" class="btn lt" (click)="back()">{{isFirstFrame ? 'Отмена' : 'Назад'}}</button>
|
||||
<button type="button" class="btn" *ngIf="!btnSaveHidden" (click)="proceed()">{{isLastFrame ? btnSaveLabel : 'Продолжить'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</slider>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||
import {FormControl, FormGroup} from "@angular/forms";
|
||||
import {FormsService, ListsService} from "@app/_services";
|
||||
import {WindowScrollingService} from "@app/_services/window-scrolling.service";
|
||||
import { PagesService } from '@app/_services/pages.service';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'slider-form.component.html',
|
||||
|
|
@ -29,6 +31,7 @@ export class SliderFormComponent {
|
|||
private route: ActivatedRoute,
|
||||
private formsService: FormsService,
|
||||
private listsService: ListsService,
|
||||
private pagesService: PagesService,
|
||||
private windowScrollingService: WindowScrollingService
|
||||
) {
|
||||
}
|
||||
|
|
@ -129,9 +132,9 @@ export class SliderFormComponent {
|
|||
window.open(res.asset.data.links[res.action || 'download'], "_blank");
|
||||
} else {
|
||||
this.listsService.refresh(this.list);
|
||||
if(this.type=='page')this.pagesService.changedPages();
|
||||
this.close();
|
||||
}
|
||||
if(this.type=='page')this.listsService.changed.next(this.list);
|
||||
}, error => {
|
||||
console.log(error);
|
||||
//for (let prop in error) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {AuthGuard} from "@app/_helpers";
|
|||
import {SliderFormComponent} from "@app/_modules/objects/form/slider/slider-form.component";
|
||||
import {SliderFiltersComponent} from "@app/_modules/objects/filters/slider/slider-filters.component";
|
||||
import {FormFrameComponent} from "@app/_modules/objects/form/frame/form-frame.component";
|
||||
import { VigetModule } from '../viget/viget.module';
|
||||
|
||||
const routes: Routes = [
|
||||
{path: 'form/:target/:type', component: SliderFormComponent, outlet: 'slider', canActivate: [AuthGuard]},
|
||||
|
|
@ -25,7 +26,8 @@ const routes: Routes = [
|
|||
CommonModule,
|
||||
RouterModule.forChild(routes),
|
||||
FormFieldsModule,
|
||||
FilterFieldsModule
|
||||
FilterFieldsModule,
|
||||
VigetModule
|
||||
],
|
||||
declarations: [
|
||||
ObjectFormComponent,
|
||||
|
|
|
|||
|
|
@ -14,10 +14,12 @@ import {RegistriesModule} from "@app/_modules/registries/registries.module";
|
|||
import {PublicationsModule} from "@app/_modules/publications/publications.module";
|
||||
import {TkStructurePageComponent} from "@app/_modules/pages/page/types/tk-structure/tk-structure-page.component";
|
||||
import {HomepageModule} from "@app/_modules/pages/home/homepage.module";
|
||||
import { SliderMenuComponent } from './menu/slider-menu/slider-menu.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{path: '', component: HomepageComponent},
|
||||
{path: '**', component: PageComponent}
|
||||
{path: '**', component: PageComponent},
|
||||
{path: 'pages-menu', component:SliderMenuComponent, outlet: 'slider'},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<div class="title">
|
||||
<ng-content select="[header]"></ng-content>
|
||||
<button type="button" (click)="close()">
|
||||
<ico></ico>
|
||||
<ico color="white"></ico>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
.title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: top;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,16 @@
|
|||
|
||||
|
||||
:root {
|
||||
|
||||
--smart: 688px;
|
||||
--medium: 1048px;
|
||||
--xs: 4px;
|
||||
--s: 8px;
|
||||
--m: 16px;
|
||||
--l: 24px;
|
||||
--xl: 36px;
|
||||
--xxl: 48px;
|
||||
|
||||
--radius-1: 12px;
|
||||
--radius-2: 20px;
|
||||
--white: #ffffff;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ button, .btn, a.btn {
|
|||
gap: 10px;
|
||||
cursor: pointer;
|
||||
border-radius: 12px;
|
||||
border: 1px solidvar(--prime);
|
||||
border: 1px solid var(--prime);
|
||||
background:var(--prime);
|
||||
color: #FFF;
|
||||
font-family: PT Sans Narrow;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ a.logo{
|
|||
top: 104px;
|
||||
flex-direction: row;
|
||||
gap:24px;
|
||||
align-items: top;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
z-index:1;
|
||||
pages-menu-item{
|
||||
|
|
|
|||
|
|
@ -1,55 +1,46 @@
|
|||
.slider-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
|
||||
|
||||
max-width: 720px;
|
||||
height: 100%;
|
||||
|
||||
background-color: #ffffff;
|
||||
box-shadow: -3px 0 6px 0 rgba(0, 0, 0, 0.16);
|
||||
overflow: hidden;
|
||||
animation: slide-from-right 0.3s;
|
||||
|
||||
|
||||
&.right-side{
|
||||
animation: slide-from-right 0.3s;
|
||||
right: 0;
|
||||
box-shadow: -3px 0 6px 0 rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
&.left-side{
|
||||
animation: slide-from-left 0.3s;
|
||||
left: 0;
|
||||
box-shadow: 3px 0 6px 0 rgba(0, 0, 0, 0.16);
|
||||
}
|
||||
|
||||
|
||||
z-index: 110;
|
||||
|
||||
.header {
|
||||
padding: 14px 24px;
|
||||
border-bottom: 1px solid #C0C0C0;
|
||||
padding: var(--m) var(--l);
|
||||
border-bottom: 1px solid var(--second);
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
|
||||
|
||||
h2 {
|
||||
font-size: 30px;
|
||||
margin: 0;
|
||||
font-family: PT Sans Narrow;
|
||||
font-size: 36px;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
line-height: 44px; /* 122.222% */
|
||||
letter-spacing: 0.36px;
|
||||
color: var(--dark-1);
|
||||
}
|
||||
|
||||
.close {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-left: auto;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
background: transparent url(/assets/images/icons/close_24dp.svg) 50% 50% no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
.stepper {
|
||||
padding: 24px 0 0;
|
||||
padding: var(--l) 0 0;
|
||||
.items {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 24px;
|
||||
gap: var(--l);
|
||||
.item {
|
||||
width: 150px;
|
||||
flex-shrink: 1;
|
||||
|
|
@ -58,7 +49,7 @@
|
|||
.num {
|
||||
position: relative;
|
||||
width: calc(100% - 13px);
|
||||
height: 24px;
|
||||
height: var(--l);
|
||||
padding: 4px 6px;
|
||||
margin: 0 0 4px;
|
||||
border-radius: 2px 0 0 2px;
|
||||
|
|
@ -77,7 +68,7 @@
|
|||
}
|
||||
.name {
|
||||
font-size: 14px;
|
||||
color: var(--second);
|
||||
color: #6c6c6c;
|
||||
}
|
||||
&.active {
|
||||
.num {
|
||||
|
|
@ -111,31 +102,56 @@
|
|||
|
||||
.body {
|
||||
height: 100%;
|
||||
padding: 32px 24px;
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding: var(--xxl) 0;
|
||||
>div>pages-menu{
|
||||
padding: 0 var(--s) var(--xl) var(--xl);
|
||||
}
|
||||
form-frame{
|
||||
margin: 0 var(--l);
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
.btn-menu{
|
||||
display: block;
|
||||
padding: 15px var(--xl);
|
||||
border-top: 1px solid var(--second);
|
||||
div{
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
button{
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
font-weight: 300;
|
||||
font-size: 15px;
|
||||
&:hover{
|
||||
color: var(--active);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[footer] {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 16px 24px;
|
||||
border-top: 1px solid #C0C0C0;
|
||||
padding: var(--m) var(--l);
|
||||
border-top: 1px solid var(--second);
|
||||
|
||||
|
||||
.left {
|
||||
.reset {
|
||||
color: var(--second);
|
||||
color: #6C6C6C;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.notice {
|
||||
font-family: PT Sans;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 24px; /* 150% */
|
||||
font-weight: 300;
|
||||
line-height: var(--l); /* 150% */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -143,39 +159,229 @@
|
|||
margin-left: auto;
|
||||
display: flex;
|
||||
button {
|
||||
margin-left: 24px;
|
||||
margin-left: var(--l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slider-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.37);
|
||||
z-index: 100;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.slider-bar {
|
||||
.header, .body, .footer {
|
||||
padding: 16px;
|
||||
.header, .footer {
|
||||
padding: var(--m);
|
||||
}
|
||||
|
||||
.footer {
|
||||
[footer] {
|
||||
.left {
|
||||
font-size: 14px;
|
||||
}
|
||||
.right {
|
||||
button {
|
||||
padding: 8px 16px;
|
||||
margin-left: 16px;
|
||||
padding: var(--s) var(--m);
|
||||
margin-left: var(--m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// .slider-bar {
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
// width: 100%;
|
||||
// max-width: 720px;
|
||||
// height: 100%;
|
||||
// background-color: #ffffff;
|
||||
// box-shadow: -3px 0 6px 0 rgba(0, 0, 0, 0.16);
|
||||
// overflow: hidden;
|
||||
// animation: slide-from-right 0.3s;
|
||||
// z-index: 110;
|
||||
|
||||
// &.right-side{
|
||||
// animation: slide-from-right 0.3s;
|
||||
// right: 0;
|
||||
// box-shadow: -3px 0 6px 0 rgba(0, 0, 0, 0.16);
|
||||
// }
|
||||
// &.left-side{
|
||||
// animation: slide-from-left 0.3s;
|
||||
// left: 0;
|
||||
// box-shadow: 3px 0 6px 0 rgba(0, 0, 0, 0.16);
|
||||
// }
|
||||
|
||||
// .header {
|
||||
// padding: 14px 24px;
|
||||
// border-bottom: 1px solid #C0C0C0;
|
||||
|
||||
// .title {
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// align-items: center;
|
||||
|
||||
// h2 {
|
||||
// margin: 0;
|
||||
// font-family: PT Sans Narrow;
|
||||
// font-size: 36px;
|
||||
// font-style: normal;
|
||||
// font-weight: 700;
|
||||
// line-height: 44px; /* 122.222% */
|
||||
// letter-spacing: 0.36px;
|
||||
// color: var(--dark-1);
|
||||
// }
|
||||
|
||||
// .close {
|
||||
// width: 24px;
|
||||
// height: 24px;
|
||||
// margin-left: auto;
|
||||
// padding: 0;
|
||||
// border: none;
|
||||
// border-radius: 0;
|
||||
// background: transparent url(/assets/images/icons/close_24dp.svg) 50% 50% no-repeat;
|
||||
// }
|
||||
// }
|
||||
|
||||
// .stepper {
|
||||
// padding: 24px 0 0;
|
||||
// .items {
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// gap: 24px;
|
||||
// .item {
|
||||
// width: 150px;
|
||||
// flex-shrink: 1;
|
||||
// font-size: 14px;
|
||||
// overflow: hidden;
|
||||
// .num {
|
||||
// position: relative;
|
||||
// width: calc(100% - 13px);
|
||||
// height: 24px;
|
||||
// padding: 4px 6px;
|
||||
// margin: 0 0 4px;
|
||||
// border-radius: 2px 0 0 2px;
|
||||
// background-color: #E8E9EB;
|
||||
// color: #86898E;
|
||||
// font-weight: bold;
|
||||
// &:after {
|
||||
// position: absolute;
|
||||
// left: 100%;
|
||||
// top: 0;
|
||||
// width: 13px;
|
||||
// height: 100%;
|
||||
// background: transparent url('~src/assets/images/icons/step_upcoming.svg') 100% 50% no-repeat;
|
||||
// content: '';
|
||||
// }
|
||||
// }
|
||||
// .name {
|
||||
// font-size: 14px;
|
||||
// color: var(--second);
|
||||
// }
|
||||
// &.active {
|
||||
// .num {
|
||||
// background-color: #B88E12;
|
||||
// color: #ffffff;
|
||||
// &:after {
|
||||
// background-image: url('~src/assets/images/icons/step_active.svg');
|
||||
// }
|
||||
// }
|
||||
// .name {
|
||||
// color: #B88E12;
|
||||
// font-weight: bold;
|
||||
// }
|
||||
// }
|
||||
// &.finished {
|
||||
// .num {
|
||||
// background-color: rgba(184, 142, 18, 0.2);
|
||||
// color: #B88E12;
|
||||
// &:after {
|
||||
// background-image: url('~src/assets/images/icons/step_finished.svg');
|
||||
// }
|
||||
// }
|
||||
// .name {
|
||||
// color: #B88E12;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// .body {
|
||||
// height: 100%;
|
||||
// padding: 32px 24px;
|
||||
// flex-grow: 1;
|
||||
// overflow: auto;
|
||||
// -webkit-overflow-scrolling: touch;
|
||||
// }
|
||||
|
||||
// .footer {
|
||||
// display: flex;
|
||||
// flex-direction: row;
|
||||
// align-items: center;
|
||||
// padding: 16px 24px;
|
||||
// border-top: 1px solid #C0C0C0;
|
||||
|
||||
// .left {
|
||||
// .reset {
|
||||
// color: var(--second);
|
||||
// cursor: pointer;
|
||||
// }
|
||||
|
||||
// .notice {
|
||||
// font-family: PT Sans;
|
||||
// font-size: 16px;
|
||||
// font-style: normal;
|
||||
// font-weight: 400;
|
||||
// line-height: 24px; /* 150% */
|
||||
// }
|
||||
// }
|
||||
|
||||
// .right {
|
||||
// margin-left: auto;
|
||||
// display: flex;
|
||||
// button {
|
||||
// margin-left: 24px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// .slider-overlay {
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// background-color: rgba(0, 0, 0, 0.37);
|
||||
// z-index: 100;
|
||||
// }
|
||||
|
||||
|
||||
// @media screen and (max-width: 767px) {
|
||||
// .slider-bar {
|
||||
// .header, .body, .footer {
|
||||
// padding: 16px;
|
||||
// }
|
||||
|
||||
// .footer {
|
||||
// .left {
|
||||
// font-size: 14px;
|
||||
// }
|
||||
// .right {
|
||||
// button {
|
||||
// padding: 8px 16px;
|
||||
// margin-left: 16px;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
Loading…
Reference in New Issue