master
Boris Voropaev 2023-09-19 16:43:06 +03:00
parent 28474e24bb
commit 89c2acb0cd
23 changed files with 110 additions and 40 deletions

View File

@ -130,7 +130,7 @@
}
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.authentication {
flex-direction: column;
justify-content: center;

View File

@ -136,7 +136,7 @@
}
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.main {
.left {
margin-right: 0;

View File

@ -47,7 +47,7 @@
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.member {
.left {
.avatar {

View File

@ -55,7 +55,7 @@
}
@media screen and (max-width: 1264px){
@media screen and (max-width: 1330px){
.footer{
padding: 40px 24px;
}

View File

@ -1,4 +1,4 @@
@media screen and (max-width: 1264px){
@media screen and (max-width: 1330px){
.hidemobile{
display: none !important;
@ -95,7 +95,7 @@
@media screen and (min-width: 1264px){
@media screen and (min-width: 1330px){
.showmobile{
display: none;
}
@ -130,12 +130,12 @@
justify-content: normal;
align-items: stretch;
align-content: stretch;
padding: 0 calc( (100% - 1300px) / 2);
padding: 0 calc( (100% - 1400px) / 2);
position: relative;
.logo {
width:114px;
height: 80px;
margin: 12px 24px 12px 40px;
margin: 12px 24px 12px 60px;
background-image: url('~src/assets/images/logo_vniigaz_1163x816.svg');
background-size: contain;
flex-shrink: 0;
@ -168,7 +168,7 @@
align-content: stretch;
flex-grow: 1;
flex-shrink: 1;
margin-right: 40px;
margin-right: 60px;
button{
white-space: nowrap;
}

View File

@ -97,7 +97,7 @@
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.user {
.avatar {
background-color: var(--white);

View File

@ -4,7 +4,7 @@ import {RouterModule} from "@angular/router";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {PagesModule} from "@app/_modules/pages/pages.module";
import { PagesMenuModule } from '../pages/menu/pages-menu.module';
import {HeaderComponent} from "@app/_modules/layout/header/header.component";
import {FooterComponent} from "@app/_modules/layout/footer/footer.component";
import {GridComponent} from "@app/_modules/layout/grid/grid.component";
@ -18,6 +18,7 @@ import {HeaderUserBarComponent} from "@app/_modules/layout/header/user-bar/heade
ReactiveFormsModule,
RouterModule,
PagesModule,
PagesMenuModule
],
declarations: [
GridComponent,

View File

@ -41,7 +41,7 @@
height: 500px;
}
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.row {
flex-direction: column;
.tagline {

View File

@ -12,6 +12,10 @@ export class PagesMenuComponent {
private hiddenPages = ['/o-tsentre/protivodeistvie-korruptsii', '/o-tsentre/zashchita-personalnykh-dannykh', '/o-tsentre/okhrana-truda'];
// ngOnInit(){
// console.log(this.items)
// }
get visibleItems() {

View File

@ -0,0 +1,25 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PagesMenuComponent} from "@app/_modules/pages/menu/pages-menu.component";
import {PagesMenuItemComponent} from "@app/_modules/pages/menu/item/pages-menu-item.component";
import {RouterModule} from "@angular/router";
@NgModule({
imports: [
CommonModule,
RouterModule,
],
declarations: [
PagesMenuComponent,
PagesMenuItemComponent,
],
exports: [
PagesMenuComponent,
]
})
export class PagesMenuModule {}

View File

@ -17,16 +17,22 @@
</div>
</div>
</div>
<div class="limiter">
<!-- <div class="limiter">
<page-breadcrumbs [page]="page"></page-breadcrumbs>
</div>
<div class="limiter pages" [ngSwitch]="page?.type?.name || page?.type">
<content-page *ngSwitchCase="'content'" [page]="page" [editMode]="editMode"></content-page>
<publications-page *ngSwitchCase="'publications'" [page]="page" [editMode]="editMode"></publications-page>
<registry-page *ngSwitchCase="'registry'" [page]="page" [editMode]="editMode"></registry-page>
<publication-page *ngSwitchCase="'publication'" [page]="page" [editMode]="editMode"></publication-page>
<tk-structure-page *ngSwitchCase="'tk-structure'" [page]="page" [editMode]="editMode"></tk-structure-page>
<p *ngSwitchDefault>Page type {{page?.type?.name}} is undefined</p>
</div> -->
<div class="limiter double-column">
<div class="pages" [ngSwitch]="page?.type?.name || page?.type">
<content-page *ngSwitchCase="'content'" [page]="page" [editMode]="editMode"></content-page>
<publications-page *ngSwitchCase="'publications'" [page]="page" [editMode]="editMode"></publications-page>
<registry-page *ngSwitchCase="'registry'" [page]="page" [editMode]="editMode"></registry-page>
<publication-page *ngSwitchCase="'publication'" [page]="page" [editMode]="editMode"></publication-page>
<tk-structure-page *ngSwitchCase="'tk-structure'" [page]="page" [editMode]="editMode"></tk-structure-page>
<p *ngSwitchDefault>Page type {{page?.type?.name}} is undefined</p>
</div>
<div class="sub-menu" *ngIf="menuItems&&menuItems.length">
<pages-menu [items]="menuItems" (onSelected)="itemSelect($event)"></pages-menu>
<!-- <pre>{{menuItems|json}}</pre> -->
</div>
</div>
</div>
<div class="content" *ngIf="!loading && !page">

View File

@ -1,6 +1,9 @@
.content {
background-color: #F6F6F6;
padding-bottom: 120px;
.limiter{
max-width: 1280px;
}
.row {
display: block;
width: 100%;
@ -20,11 +23,12 @@
.block{
position: absolute;
top:136px;
left: calc((100% - 900px) / 2);
left: calc((100% - 1280px) / 2);
}
.limiter{
display: block;
.line{
display: inline-block;
border-bottom: 12px solid var(--blue-0);
@ -70,7 +74,29 @@
}
@media screen and (max-width: 1264px) {
@media screen and (min-width: 1330px){
.double-column{
display: flex;
align-items: flex-start;
gap: 40px;
.pages{
flex-grow: 1;
flex-shrink: 1;
}
.sub-menu{
flex-grow: 0;
flex-shrink: 0;
flex-basis: 360px;
padding: 20px;
border-radius: 8px;
background: #FFF;
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.27);
margin-top: 40px;
}
}
}
@media screen and (max-width: 1330px) {
.nav-info{
display: none;
}

View File

@ -12,6 +12,7 @@ export class PageComponent {
public page: any;
public editMode: boolean;
public loading = false;
public menuItems:any[]
private url: string;
private inited = false;
routeSubscription?: Subscription;
@ -42,6 +43,7 @@ export class PageComponent {
}
ngOnInit() {
// this.fetchMenu();
this.listsService.controls().subscribe(res => {
this.inited ? this.fetch() : this.inited = true;
});
@ -70,10 +72,12 @@ export class PageComponent {
'sections.objectables.groups.fields.value',
'sidebars.groups.fields.value',
'sidebars.type',
'permissions'
'permissions',
'children.children'
];
this.pagesService.find(this.url, {include: include.join(',')}).subscribe(res => {
this.page = res?.data;
this.menuItems = res?.data.children.data;
this.loading = false;
}, error => {
this.loading = false;

View File

@ -117,7 +117,7 @@
}
}
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.title {
span {
font-size: 1rem !important;

View File

@ -14,6 +14,7 @@ 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 { PagesMenuModule } from './menu/pages-menu.module';
const routes: Routes = [
{path: '', component: HomepageComponent},
@ -28,7 +29,8 @@ const routes: Routes = [
PageSectionsModule,
PageSidebarsModule,
RegistriesModule,
PublicationsModule
PublicationsModule,
PagesMenuModule
],
declarations: [
PageComponent,

View File

@ -6,8 +6,6 @@ import {RegistriesModule} from "@app/_modules/registries/registries.module";
import {PublicationsModule} from "@app/_modules/publications/publications.module";
import {PagesListComponent} from "@app/_modules/pages/list/pages-list.component";
import {PagesListItemComponent} from "@app/_modules/pages/list/item/pages-list-item.component";
import {PagesMenuComponent} from "@app/_modules/pages/menu/pages-menu.component";
import {PagesMenuItemComponent} from "@app/_modules/pages/menu/item/pages-menu-item.component";
import {RouterModule} from "@angular/router";
import {PaginationModule} from "@app/_modules/pagination/pagination.module";
import {SearchSectionsComponent} from "@app/_modules/pages/sections/search/search-sections.component";
@ -30,8 +28,6 @@ import {SortablejsModule} from "ngx-sortablejs";
SortablejsModule,
],
declarations: [
PagesMenuComponent,
PagesMenuItemComponent,
PagesListComponent,
PagesListItemComponent,
PagesTreeComponent,
@ -40,7 +36,6 @@ import {SortablejsModule} from "ngx-sortablejs";
SearchSectionsItemComponent,
],
exports: [
PagesMenuComponent,
PagesListComponent,
SearchSectionsComponent,
PagesTreeComponent,

View File

@ -37,7 +37,6 @@ export class AddSectionComponent {
return item;
});
let attach = {modelType: this.modelType, modelId: this.page.id, group: 'sections', ord: this.ord};
console.log(type);
this.formsService.createObject(type, {extraProps: {attach: attach}});
this.hideDD();
}

View File

@ -15,7 +15,7 @@ export class ImageGroupSectionComponent {
}
ngOnInit() {
console.log(this.section);
// console.log(this.section);
}

View File

@ -146,7 +146,7 @@
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.item {
.bar {
.mid {

View File

@ -22,7 +22,7 @@ pagination {
}
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
registry-entry {
padding: 16px 0;
}

View File

@ -58,7 +58,7 @@
}
}
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.profile {
padding: 24px 0;
.user {

View File

@ -160,7 +160,7 @@ html-section ul{
}
@media screen and (min-width: 1264px) {
@media screen and (min-width: 1330px) {
.fullwidth {
width: 100vw;
margin-left: calc((1160px - 100vw) / 2);
@ -197,7 +197,7 @@ html-section ul{
}
@media screen and (max-width: 1264px) {
@media screen and (max-width: 1330px) {
.limiter {
padding: 0 24px;
}

View File

@ -1,5 +1,5 @@
@media screen and (max-width: 1264px){
@media screen and (max-width: 1330px){
@ -92,7 +92,7 @@
@media screen and (min-width: 1264px){
@media screen and (min-width: 1330px){
pages-menu {
display: none;
}
@ -177,4 +177,12 @@
}
}
.sub-menu{
pages-menu {
display: flex;
flex-direction: column;
}
}
}