gbu styling

master
Boris Voropaev 2024-01-26 15:09:27 +03:00
parent f603f7d86e
commit 66ba12b528
12 changed files with 78 additions and 45 deletions

View File

@ -2,5 +2,8 @@
<div *ngIf="header" class="card-header">{{header}}</div>
<div *ngIf="subheader" class="card-subheader">{{subheader}}</div>
<div *ngIf="text" class="card-text">{{text}}</div>
<img [src]="image" class="card-image" *ngIf="isImage">
<div class="card-image">
<img [src]="image" *ngIf="isImage">
</div>
</div>

View File

@ -1,9 +1,9 @@
export const environment = {
production: true,
apiUrl: 'https://nirgroup.testnir.ru',
apiUrl: 'https://gbu.testnir.ru',
clientId: 2,
clientSecret: 'iqt55TXiXIkIiuUfZ8xnW5CQzOsnKllLebes9sN1',
clientSecret: 'N6YSSL2DqyC67SY5gQah2eX6pQXbsZjesQPzOXWK',
project: null,
licence: 'ZL0ZKY9GSZDV',
licence: 'XDIR5Z6WXY39',
defaultLocale: 'ru'
};

View File

@ -33,10 +33,12 @@ export class GridComponent {
this.pagesService.find(currentPage.link,{include: 'children.children'}).subscribe(
resp=> {
let children = resp.data.children.data;
console.log('children',children)
this.news = children.find(
(child:any) => {
if (!child.children) {
console.log('child',child)
if (!child.children.data.length) {
console.log('notChild',child)
return false
} else {
return child.children.data.reduce(
@ -47,7 +49,7 @@ export class GridComponent {
}
}
).children.data
this.news.forEach(page => {
this.publicationsService.list({
page:1,
@ -60,7 +62,7 @@ export class GridComponent {
page.publications = resp.data.slice(0,3).map(
publication => ({
name: publication.name,
img: publication.posters.data[0].links.thumb,
img: publication.posters.data[0]?publication.posters.data[0].links.thumb:null,
link: publication.link
})
);

View File

@ -1,9 +1,9 @@
<div class="space" *ngIf="!isRootPage">
<div class="jumbotron-content layout-corral">
<header-user-bar></header-user-bar>
<div class="breadcrumbs" *ngIf="parents?.length>1">
<div class="breadcrumbs" *ngIf="parents">
<div *ngFor="let parent of parents">
<a [routerLink]="parent.link">
<a [routerLink]="parent.link" *ngIf="parent.type.name!='nav-page'">
<span>{{parent.name}}</span>
<ico ico="chevron_right_24" [size]="24"></ico>
</a>

View File

@ -45,34 +45,12 @@ export class JumbotronComponent {
if(this.currentPage){
name = this.currentPage?.h1 || this.currentPage?.name;
let parents = this.currentPage?.parents?.data
if (parents&&parents[1]) name = parents[1].h1|| parents[1].name
if (parents&&parents[2]) name = parents[2].h1|| parents[2].name
}
return name
}
get bgStyle(){
let height = 70;
let pictURL:string;
if (this.pagePicture){
height = 150;
pictURL = this.pagePicture;
}
return {
'background-image' : `url(${pictURL})`||'none',
'height': (this.mainPage?700:pictURL?400:height) + 'px'
}
}
get h1Style(){
return {
color: this.pagePicture?'var(--white)':'var(--second-act)',
'align-self': this.mainPage?'center':'flex-start',
'text-align': this.mainPage?'center':'left',
'width': this.mainPage?'900px':null,
'border-bottom':this.mainPage?null:'12px solid #2EB2E8'
}
}
get mainPage(){
return this.currentPage?.parents?.data.length === 0;

View File

@ -160,6 +160,7 @@ jumbotron{
}
.main-content{
width: 990px;
background-color: #FFF;
}
}
@ -197,7 +198,8 @@ pages-menu-item{
}
.pages{
width: 100%;
margin: 32px;
width: calc( 100% - 64px );
}
.jumbotron-edit-field{
@ -205,6 +207,7 @@ pages-menu-item{
}
.main-news{
margin: 32px;
.main-news-item{
display: flex;
flex-wrap: wrap;

View File

@ -1,8 +1,7 @@
page-sections{
display: flex;
flex-direction: column;
background-color: #FFF;
padding: 32px;
.section{
display: flex;
@ -587,7 +586,7 @@ publications-list{
publications-list-item {
display: block;
background-color: #FFF;
padding: 32px 32px 0 32px;
.publication-content{
width: 100%;
display: flex;
@ -658,7 +657,6 @@ publications-list{
publication-page {
background-color: #FFF;
display: block;
padding: 32px;
.date{
color: var(--second);
margin-bottom: 16px;

View File

@ -10,7 +10,6 @@ registry-page{
.registry {
background-color: #ffffff;
padding: 32px;
.filters{
display: flex;
gap:24px;

View File

@ -2,7 +2,7 @@
<html id="html">
<head>
<base href="/" />
<title>ЧУ СЦ ВНИИГАЗ-Сертификат</title>
<title>ГБУ Жилищник</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no" />
<link rel="icon" type="image/x-icon" href="/assets/images/favicon.png" />
</head>

View File

@ -69,6 +69,10 @@ header{
.burger{
align-items: center;
height: 32px;
padding: 8px;
height: 100%;
display: none;
align-items: center;
}
.header-login{
@ -112,7 +116,7 @@ header{
slider[side="left"]{
.slider-bar{
background-color: var(--bg-lt);
width: 360px;
width: 240px;
max-width: 100vw;
.header{
box-shadow: none;
@ -157,6 +161,13 @@ slider[side="left"]{
pages-menu{
display: none !important;
}
.header-login{
margin-right: -8px;
}
.burger{
display: flex;
margin-inline: -8px 8px;
}
}
}
@ -168,7 +179,8 @@ slider[side="left"]{
.burger{
display: none;
}
}
}
}

View File

@ -706,7 +706,7 @@ cards-section{
cards-section-item{
display: flex;
width: 100%;
height: 274px;
min-height: 274px;
padding: 24px;
border-radius: 16px;
border: 1px solid var(--light);
@ -734,10 +734,18 @@ cards-section{
object-fit: cover;
display: block;
top: 56px;
border-radius: 8px;
border: 1px solid var(--bk22);
order: 1;
margin-bottom: -120px;
background-image: url("/assets/images/card_slider_img_holder.svg");
background-size: contain;
img{
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
border: 1px solid var(--bk22);
}
}
.card-text{
order: 2;
@ -815,6 +823,15 @@ cards-section{
margin-left: 0px;
margin-right: 0px;
align-items: end;
.card-slide{
flex-direction: column;
flex-wrap: nowrap;
.card-image{
margin-bottom: 8px;
align-self: flex-start;
}
}
}
}

View File

@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" width="120" height="170" viewBox="0 0 120 170" fill="none">
<g clip-path="url(#clip0_2136_30152)">
<rect width="120" height="170" fill="white"/>
<rect x="42" y="54" width="36" height="4" fill="#EDEFEB"/>
<rect x="68" y="22" width="36" height="4" fill="#EDEFEB"/>
<rect x="68" y="32" width="36" height="4" fill="#EDEFEB"/>
<rect x="68" y="135" width="36" height="4" fill="#EDEFEB"/>
<rect x="16" y="67" width="88" height="4" fill="#EDEFEB"/>
<rect x="16" y="77" width="88" height="4" fill="#EDEFEB"/>
<rect x="16" y="87" width="88" height="4" fill="#EDEFEB"/>
<rect x="16" y="97" width="88" height="4" fill="#EDEFEB"/>
<rect x="16" y="107" width="60" height="4" fill="#EDEFEB"/>
<circle cx="72" cy="139" r="10" stroke="#EDEFEB" stroke-width="4"/>
</g>
<rect x="0.5" y="0.5" width="119" height="169" rx="7.5" stroke="black" stroke-opacity="0.22"/>
<defs>
<clipPath id="clip0_2136_30152">
<rect width="120" height="170" rx="8" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB