From b1b774af310ca2b45ae065c7ba2ccd28c8dc3361 Mon Sep 17 00:00:00 2001 From: Boris Voropaev Date: Thu, 30 Nov 2023 14:16:22 +0300 Subject: [PATCH] bugfix --- .gitignore | 1 - angular.json | 50 +++++++++++++++++++ src/environments/environment.ts | 22 ++++++++ .../layout/jumbotron/jumbotron.component.ts | 2 +- src/vniigaz-v2/vniigaz-v2.env.prod.ts | 22 ++++++++ 5 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 src/environments/environment.ts create mode 100644 src/vniigaz-v2/vniigaz-v2.env.prod.ts diff --git a/.gitignore b/.gitignore index e49d8d8..b1bd345 100644 --- a/.gitignore +++ b/.gitignore @@ -49,5 +49,4 @@ testem.log .DS_Store Thumbs.db -src/environments .gitignore diff --git a/angular.json b/angular.json index d0c6320..f90f5fc 100644 --- a/angular.json +++ b/angular.json @@ -126,6 +126,56 @@ "node_modules/swiper/swiper-bundle.css" ], "index": "src/vniigaz-v2/index.html" + }, + "vniigaz-v2-prod": { + "buildOptimizer": false, + "optimization": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/vniigaz-v2/vniigaz-v2.env.prod.ts" + }, + { + "replace": "src/app/_modules/layout/header/header.component.ts", + "with": "src/vniigaz-v2/component/layout/header/header.component.ts" + }, + { + "replace": "src/app/_modules/layout/footer/footer.component.ts", + "with": "src/vniigaz-v2/component/layout/footer/footer.component.ts" + }, + { + "replace": "src/app/_modules/layout/jumbotron/jumbotron.component.ts", + "with": "src/vniigaz-v2/component/layout/jumbotron/jumbotron.component.ts" + } + ], + "inlineStyleLanguage": "scss", + "assets": [ + { + "glob": "**/*", + "input": "node_modules/tinymce", + "output": "/tinymce/" + }, + "src/favicon.ico", + { + "glob": "**/*", + "input": "src/vniigaz-v2/", + "output": "/assets/" + } + ], + "stylePreprocessorOptions": { + "includePaths": [ + "src/vniigaz-v2/css" + ] + }, + "styles": [ + "src/styles.scss", + "node_modules/swiper/swiper-bundle.css" + ], + "index": "src/vniigaz-v2/index.html" } }, "defaultConfiguration": "production" diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..3372d84 --- /dev/null +++ b/src/environments/environment.ts @@ -0,0 +1,22 @@ +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. + +export const environment = { + production: false, + apiUrl: 'http://api.nircms.lc', + clientId: 2, + clientSecret: 'SoQdwJzNSVfFd9Bqa4wAEYxCTxzdvKd5PJZIlGqo', + project: null, + defaultLocale: 'ru' +}; + + +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/src/vniigaz-v2/component/layout/jumbotron/jumbotron.component.ts b/src/vniigaz-v2/component/layout/jumbotron/jumbotron.component.ts index 850ddc6..0d50981 100644 --- a/src/vniigaz-v2/component/layout/jumbotron/jumbotron.component.ts +++ b/src/vniigaz-v2/component/layout/jumbotron/jumbotron.component.ts @@ -75,7 +75,7 @@ export class JumbotronComponent { get h1Style(){ return { color: this.contentPage?.picture?'var(--white)':'var(--second-act)', - 'align-self': this.mainPage?'center':'left', + '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' diff --git a/src/vniigaz-v2/vniigaz-v2.env.prod.ts b/src/vniigaz-v2/vniigaz-v2.env.prod.ts new file mode 100644 index 0000000..3772ded --- /dev/null +++ b/src/vniigaz-v2/vniigaz-v2.env.prod.ts @@ -0,0 +1,22 @@ +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. + +export const environment = { + production: true, + apiUrl: ' https://api-vniigaz-cert-v3.testnir.ru', + clientId: 2, + clientSecret: 'hqhpnNTBrvqiv4o85ZNCewOO8n3Y2i9iaRYGfMnt', + project: null, + defaultLocale: 'ru' +}; + + +/* + * For easier debugging in development mode, you can import the following file + * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. + * + * This import should be commented out in production mode because it will have a negative impact + * on performance if an error is thrown. + */ +// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.