From da0926a8a1e5f7205feb90fc83fc3c82141ca003 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Thu, 1 Oct 2020 11:45:51 +0200 Subject: [PATCH 01/14] fix(cicd): tmp remove of sonar analysis because no runner available --- .gitlab-ci.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d5d01d3b..6611fd649 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,26 +21,27 @@ build_dev: services: - docker:18.09-dind stage: build + tags: + - build-push-to-registry only: - dev script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker build --pull -t "$CI_REGISTRY_IMAGE:dev" --build-arg conf=dev . - docker push "$CI_REGISTRY_IMAGE:dev" - -code_analysis: - stage: sonar-analysis - tags: - - test - only: - - dev - script: - - > - sonar-scanner - -Dsonar.projectName=${SONAR_PROJECT_KEY} - -Dsonar.projectVersion=1.0 - -Dsonar.sourceEncoding=UTF-8 - -Dsonar.projectBaseDir=. - -Dsonar.host.url=${SONAR_URL} - -Dsonar.projectKey=${SONAR_PROJECT_KEY} - -Dsonar.login=${SONAR_TOKEN} +# code_analysis: +# stage: sonar-analysis +# tags: +# - test +# only: +# - dev +# script: +# - > +# sonar-scanner +# -Dsonar.projectName=${SONAR_PROJECT_KEY} +# -Dsonar.projectVersion=1.0 +# -Dsonar.sourceEncoding=UTF-8 +# -Dsonar.projectBaseDir=. +# -Dsonar.host.url=${SONAR_URL} +# -Dsonar.projectKey=${SONAR_PROJECT_KEY} +# -Dsonar.login=${SONAR_TOKEN} -- GitLab From ac2c35e380e70b0e4bf45ebfbb3722d76941ada3 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Thu, 1 Oct 2020 11:52:35 +0200 Subject: [PATCH 02/14] fix(cicd): add image for sonar --- .gitlab-ci.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6611fd649..c45290521 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,19 +29,21 @@ build_dev: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker build --pull -t "$CI_REGISTRY_IMAGE:dev" --build-arg conf=dev . - docker push "$CI_REGISTRY_IMAGE:dev" -# code_analysis: -# stage: sonar-analysis -# tags: -# - test -# only: -# - dev -# script: -# - > -# sonar-scanner -# -Dsonar.projectName=${SONAR_PROJECT_KEY} -# -Dsonar.projectVersion=1.0 -# -Dsonar.sourceEncoding=UTF-8 -# -Dsonar.projectBaseDir=. -# -Dsonar.host.url=${SONAR_URL} -# -Dsonar.projectKey=${SONAR_PROJECT_KEY} -# -Dsonar.login=${SONAR_TOKEN} + +code_analysis: + image: skilldlabs/sonar-scanner:3.4.0 + stage: sonar-analysis + tags: + - test + only: + - dev + script: + - > + sonar-scanner + -Dsonar.projectName=${SONAR_PROJECT_KEY} + -Dsonar.projectVersion=1.0 + -Dsonar.sourceEncoding=UTF-8 + -Dsonar.projectBaseDir=. + -Dsonar.host.url=${SONAR_URL} + -Dsonar.projectKey=${SONAR_PROJECT_KEY} + -Dsonar.login=${SONAR_TOKEN} -- GitLab From 6631104037d4006fe16bf286c9bd16a414a13956 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Thu, 1 Oct 2020 11:53:48 +0200 Subject: [PATCH 03/14] fix(cicd): gitlabci --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c45290521..c0e85ed73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,6 +32,8 @@ build_dev: code_analysis: image: skilldlabs/sonar-scanner:3.4.0 + services: + - docker:18.09-dind stage: sonar-analysis tags: - test -- GitLab From d02dbd9e1615ca26bb96939c04ba0e71126ca959 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Thu, 1 Oct 2020 11:56:37 +0200 Subject: [PATCH 04/14] fix(cicd): gitlabci --- .gitlab-ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0e85ed73..c6e5fd698 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,14 @@ +image: docker:git + +services: + - docker:dind + stages: - sonar-analysis - build build: - image: docker:18.09 - services: - - docker:18.09-dind stage: build - tags: - - build-push-to-registry only: - master script: @@ -17,12 +17,7 @@ build: - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" build_dev: - image: docker:18.09 - services: - - docker:18.09-dind stage: build - tags: - - build-push-to-registry only: - dev script: @@ -35,8 +30,6 @@ code_analysis: services: - docker:18.09-dind stage: sonar-analysis - tags: - - test only: - dev script: -- GitLab From 48ffe89c91adea4e2e604ca60a75532b37a6c319 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Thu, 1 Oct 2020 11:59:25 +0200 Subject: [PATCH 05/14] fix(cicd): gitlabci --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6e5fd698..10d31c98b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,12 @@ stages: - build build: + image: docker:18.09 + services: + - docker:18.09-dind stage: build + tags: + - build-push-to-registry only: - master script: @@ -17,7 +22,12 @@ build: - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" build_dev: + image: docker:18.09 + services: + - docker:18.09-dind stage: build + tags: + - build-push-to-registry only: - dev script: @@ -30,6 +40,8 @@ code_analysis: services: - docker:18.09-dind stage: sonar-analysis + tags: + - test only: - dev script: -- GitLab From 4e67a3533e3a67cd9f850b5074ece56cd6ef511c Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Thu, 1 Oct 2020 12:01:23 +0200 Subject: [PATCH 06/14] fix(cicd): gitlabci --- .gitlab-ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10d31c98b..05d2fe955 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,8 +12,6 @@ build: services: - docker:18.09-dind stage: build - tags: - - build-push-to-registry only: - master script: @@ -26,8 +24,6 @@ build_dev: services: - docker:18.09-dind stage: build - tags: - - build-push-to-registry only: - dev script: @@ -40,8 +36,6 @@ code_analysis: services: - docker:18.09-dind stage: sonar-analysis - tags: - - test only: - dev script: -- GitLab From a1d44f3b3e0da30669816f9094f7f1207979d486 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 2 Oct 2020 11:58:33 +0200 Subject: [PATCH 07/14] feat: update environnement var for register form link. --- package.json | 2 +- src/environments/environment.ts | 4 +++- tsconfig.app.json | 11 +++-------- tsconfig.json | 5 +---- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index e7add9406..5a8956c0f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@angular/localize": "^10.1.3", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", - "@types/node": "^12.11.1", + "@types/node": "^12.12.62", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 7b4f817ad..79b25c900 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,7 +3,9 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + registrationForm: 'https://services.formulaireextranet.grandlyon.com/saisie-fiche-structure', + VERSION: require('../../package.json').version, }; /* diff --git a/tsconfig.app.json b/tsconfig.app.json index 82d91dc4a..6bb6c9dac 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -3,13 +3,8 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", - "types": [] + "types": ["node"] }, - "files": [ - "src/main.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.d.ts" - ] + "files": ["src/main.ts", "src/polyfills.ts"], + "include": ["src/**/*.d.ts"] } diff --git a/tsconfig.json b/tsconfig.json index f69f65417..f1830d0f8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,9 +12,6 @@ "importHelpers": true, "target": "es2015", "module": "es2020", - "lib": [ - "es2018", - "dom" - ] + "lib": ["es2018", "dom"] } } -- GitLab From c483dabe3a18037a724f41f9bb46144f46f129f3 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 2 Oct 2020 11:58:56 +0200 Subject: [PATCH 08/14] docs: update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7964a7fba..a2efaa4b3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular ## Development server -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. +Run `npm start` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. ## Code scaffolding @@ -12,15 +12,15 @@ Run `ng generate component component-name` to generate a new component. You can ## Build -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. +Run `npm run build:dev` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `npm run build:prod` flag for a production build. ## Running unit tests -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). +Run `npm run test` to execute the unit tests via [Karma](https://karma-runner.github.io). ## Running end-to-end tests -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). +Run `npm run e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). ## Further help -- GitLab From 91922b5473bee7f1d461299146c66e52fae5767e Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 2 Oct 2020 11:59:20 +0200 Subject: [PATCH 09/14] feat(ide): update vscode conf --- .vscode/settings.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 139f71bf7..700283a6a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,29 @@ { + "eslint.enable": true, + "javascript.format.enable": false, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "[html]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[scss]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "editor.formatOnSave": true, "i18n-ally.includeSubfolders": true, "i18n-ally.displayLanguage": "fr", "i18n-ally.localesPaths": "client/src/assets/i18n", "i18n-ally.keystyle": "nested", - "i18n-ally.enabledFrameworks": "ngx-translate" + "i18n-ally.enabledFrameworks": "ngx-translate", + "typescript.preferences.importModuleSpecifier": "relative" } -- GitLab From 396c8195c39c66115ee7b442a790ec3e5843d9b9 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 2 Oct 2020 12:00:31 +0200 Subject: [PATCH 10/14] feat(scaffolding): update with shared module --- src/app/app.module.ts | 3 ++- .../components/card/card.component.html | 1 + .../components/card/card.component.scss | 0 .../components/card/card.component.spec.ts | 25 +++++++++++++++++++ .../shared/components/card/card.component.ts | 15 +++++++++++ src/app/shared/components/index.ts | 7 ++++++ src/app/shared/directives/index.ts | 4 +++ src/app/shared/pipes/index.ts | 4 +++ src/app/shared/shared.module.ts | 13 ++++++++++ 9 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 src/app/shared/components/card/card.component.html create mode 100644 src/app/shared/components/card/card.component.scss create mode 100644 src/app/shared/components/card/card.component.spec.ts create mode 100644 src/app/shared/components/card/card.component.ts create mode 100644 src/app/shared/components/index.ts create mode 100644 src/app/shared/directives/index.ts create mode 100644 src/app/shared/pipes/index.ts create mode 100644 src/app/shared/shared.module.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 51288081b..4ad3e8861 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -10,10 +10,11 @@ import { CustomBreakPointsProvider } from './config/custom-breakpoint'; import { StructureListComponent } from './structure-list/structure-list.component'; import { FooterComponent } from './footer/footer.component'; import { HeaderComponent } from './header/header.component'; +import { SharedModule } from './shared/shared.module'; @NgModule({ declarations: [AppComponent, HeaderComponent, FooterComponent, HomeComponent, StructureListComponent], - imports: [BrowserModule, AppRoutingModule, FlexLayoutModule], + imports: [BrowserModule, AppRoutingModule, FlexLayoutModule, SharedModule], providers: [{ provide: LOCALE_ID, useValue: 'fr' }, CustomBreakPointsProvider], bootstrap: [AppComponent], }) diff --git a/src/app/shared/components/card/card.component.html b/src/app/shared/components/card/card.component.html new file mode 100644 index 000000000..f2fda252a --- /dev/null +++ b/src/app/shared/components/card/card.component.html @@ -0,0 +1 @@ +<p>card works!</p> diff --git a/src/app/shared/components/card/card.component.scss b/src/app/shared/components/card/card.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/shared/components/card/card.component.spec.ts b/src/app/shared/components/card/card.component.spec.ts new file mode 100644 index 000000000..3093fd5a3 --- /dev/null +++ b/src/app/shared/components/card/card.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CardComponent } from './card.component'; + +describe('CardComponent', () => { + let component: CardComponent; + let fixture: ComponentFixture<CardComponent>; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ CardComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(CardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/components/card/card.component.ts b/src/app/shared/components/card/card.component.ts new file mode 100644 index 000000000..07a9ab07e --- /dev/null +++ b/src/app/shared/components/card/card.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-card', + templateUrl: './card.component.html', + styleUrls: ['./card.component.scss'] +}) +export class CardComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/app/shared/components/index.ts b/src/app/shared/components/index.ts new file mode 100644 index 000000000..d8ec6de94 --- /dev/null +++ b/src/app/shared/components/index.ts @@ -0,0 +1,7 @@ +import { CardComponent } from './card/card.component'; + +// tslint:disable-next-line: max-line-length +export { CardComponent }; + +// tslint:disable-next-line:variable-name +export const SharedComponents = [CardComponent]; diff --git a/src/app/shared/directives/index.ts b/src/app/shared/directives/index.ts new file mode 100644 index 000000000..9cee80e98 --- /dev/null +++ b/src/app/shared/directives/index.ts @@ -0,0 +1,4 @@ +export {}; + +// tslint:disable-next-line:variable-name +export const SharedDirectives = []; diff --git a/src/app/shared/pipes/index.ts b/src/app/shared/pipes/index.ts new file mode 100644 index 000000000..67f3e70cc --- /dev/null +++ b/src/app/shared/pipes/index.ts @@ -0,0 +1,4 @@ +export {}; + +// tslint:disable-next-line:variable-name +export const SharedPipes = []; diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts new file mode 100644 index 000000000..34daa65e8 --- /dev/null +++ b/src/app/shared/shared.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { SharedComponents } from './components'; +import { SharedPipes } from './pipes'; +import { SharedDirectives } from './directives'; +import { RouterModule } from '@angular/router'; + +@NgModule({ + imports: [CommonModule, RouterModule], + declarations: [...SharedPipes, ...SharedComponents, ...SharedDirectives], + exports: [...SharedPipes, ...SharedComponents, ...SharedDirectives], +}) +export class SharedModule {} -- GitLab From 990769a6872f6446de05376ee75aa9959bce6e5b Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 2 Oct 2020 12:01:05 +0200 Subject: [PATCH 11/14] feat(structure-list): update layout --- src/app/header/header.component.html | 2 +- src/app/header/header.component.scss | 3 ++ src/app/home/home.component.html | 6 ++- .../structure-list.component.html | 32 ++++++++++- .../structure-list.component.scss | 53 +++++++++++++++++++ .../structure-list.component.ts | 10 ++-- src/assets/scss/_color.scss | 3 ++ src/assets/scss/_icons.scss | 6 ++- src/assets/scss/_typography.scss | 6 +++ src/styles.scss | 1 + 10 files changed, 112 insertions(+), 10 deletions(-) diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index 96ee72c30..78509bdd9 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -14,7 +14,7 @@ </div> <div fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="40px" class="grey-background"> <a routerLink="/login" [routerLinkActive]="'active'" i18n>Se connecter</a> - <span class="clickable ico-mglass orange"></span> + <span class="clickable ico-mglass purple"></span> </div> </div> </div> diff --git a/src/app/header/header.component.scss b/src/app/header/header.component.scss index 269d2cc39..f22e53e19 100644 --- a/src/app/header/header.component.scss +++ b/src/app/header/header.component.scss @@ -23,6 +23,9 @@ height: 100%; padding: 0 3vw; background-color: $grey-2; + a { + text-decoration: underline; + } } } diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 76af61ff9..4f2ba48bc 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,3 +1,5 @@ -<div fxLayout="column"> - <p>home works!</p> +<div class="content-container"> + <div class="section-container"> + <p>Home works!</p> + </div> </div> diff --git a/src/app/structure-list/structure-list.component.html b/src/app/structure-list/structure-list.component.html index 445a9df34..15a9b1218 100644 --- a/src/app/structure-list/structure-list.component.html +++ b/src/app/structure-list/structure-list.component.html @@ -1 +1,31 @@ -<p>structure-list works!</p> +<div class="content-container no-pt"> + <div + class="section-container no-max-width orange-background" + fxLayout="row" + fxLayout.lt-sm="column" + fxLayoutAlign="center baseline" + fxLayoutAlign.lt-sm="center center" + fxLayoutGap="20px" + > + <p>Vous faites partie d’une structure de médiation ?</p> + <a [href]="regisrationFormLink" target="_blank">Inscrivez-vous</a> + </div> + <div class="section-container card"> + <div fxLayout="row" fxLayoutGap="40px" fxLayoutAlign="space-between center"> + <div class="input-container" fxLayout="row" fxLayoutGap="16px"> + <span class="ico-mglass purple"></span> + <input class="input-field" type="text" placeholder="Rechercher une adresse, une association..." name="search" /> + </div> + <div fxLayout="row" fxLayoutAlign="center center" fxLayoutGap="10px"> + <span class="clickable ico-pin orange"></span> + <a>Me localiser</a> + </div> + </div> + </div> +</div> + +<div class="content-container no-pt"> + <div class="section-container"> + <p>structure-list works!</p> + </div> +</div> diff --git a/src/app/structure-list/structure-list.component.scss b/src/app/structure-list/structure-list.component.scss index e69de29bb..a88f76884 100644 --- a/src/app/structure-list/structure-list.component.scss +++ b/src/app/structure-list/structure-list.component.scss @@ -0,0 +1,53 @@ +@import '../../assets/scss/color'; +@import '../../assets/scss/typography'; +@import '../../assets/scss/breakpoint'; +@import '../../assets/scss/icons'; + +.orange-background { + background-color: $orange; + height: 130px; + color: $white; + padding-top: 20px; + p { + @include cn-bold-18; + } + a { + color: $white; + text-decoration: underline; + } + @media #{$large-phone} { + height: 15vh; + padding-top: 0px; + } +} + +.card { + background: #ffffff; + border: 1px solid $grey-3; + box-sizing: border-box; + padding: 20px 24px; +} + +.card { + margin-top: -60px; + a { + @include cn-bold-16; + color: $orange; + white-space: nowrap; + text-decoration: underline; + } +} + +.input-container { + background-color: $grey-4; + align-items: center; + width: 100%; + height: 40px; + padding: 10px 14px; + .input-field { + width: 100%; + background-color: inherit; + border: unset; + outline: none; //TODO: accesibility issue + } +} diff --git a/src/app/structure-list/structure-list.component.ts b/src/app/structure-list/structure-list.component.ts index 0e755a84b..00d10eeb5 100644 --- a/src/app/structure-list/structure-list.component.ts +++ b/src/app/structure-list/structure-list.component.ts @@ -1,15 +1,15 @@ import { Component, OnInit } from '@angular/core'; +import { environment } from '../../environments/environment'; @Component({ selector: 'app-structure-list', templateUrl: './structure-list.component.html', - styleUrls: ['./structure-list.component.scss'] + styleUrls: ['./structure-list.component.scss'], }) export class StructureListComponent implements OnInit { + public regisrationFormLink: string = environment.registrationForm; - constructor() { } - - ngOnInit(): void { - } + constructor() {} + ngOnInit(): void {} } diff --git a/src/assets/scss/_color.scss b/src/assets/scss/_color.scss index f33be4886..e1ac547a8 100644 --- a/src/assets/scss/_color.scss +++ b/src/assets/scss/_color.scss @@ -1,9 +1,12 @@ +//TODO: Clean colors when design is properly setup $black: #000000; $white: #ffff; /* GREYS */ $grey: #b4bbbf; $grey-1: #333333; $grey-2: #eeeeee; +$grey-3: #c3c3c3; +$grey-4: #f2ecf2; /* YELLOW */ $yellow: #f2cb04; $yellow-light: #fff8d6; diff --git a/src/assets/scss/_icons.scss b/src/assets/scss/_icons.scss index 48c008dd9..b1dcb9ac7 100644 --- a/src/assets/scss/_icons.scss +++ b/src/assets/scss/_icons.scss @@ -5,9 +5,11 @@ display: inline-block; background: transparent; border-radius: 30px; + border: 2px solid $grey; height: 12px; width: 12px; - border: 2px solid $grey; + min-width: 12px; + max-width: 12px; &:after { content: ''; @@ -41,6 +43,8 @@ .ico-pin { width: 20px; height: 20px; + max-width: 20px; + max-height: 20px; border-radius: 50% 50% 50% 0; background: transparent; transform: rotate(-45deg); diff --git a/src/assets/scss/_typography.scss b/src/assets/scss/_typography.scss index 749a95022..d21536e48 100644 --- a/src/assets/scss/_typography.scss +++ b/src/assets/scss/_typography.scss @@ -94,6 +94,12 @@ h6, font-weight: normal; font-size: $font-size-medium-mobile; } +@mixin cn-bold-18 { + font-family: $title-font; + font-style: normal; + font-weight: bold; + font-size: $font-size-medium-mobile; +} @mixin cn-bold-16 { font-family: $text-font; font-style: normal; diff --git a/src/styles.scss b/src/styles.scss index 60f2a0fef..96329efae 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -61,5 +61,6 @@ a { &.no-max-width { max-width: unset; margin-bottom: 1rem; + width: unset; } } -- GitLab From f2ef4508f3259d09cea90de51cd5dd5318101bb6 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 2 Oct 2020 12:03:07 +0200 Subject: [PATCH 12/14] docs: add contributing to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a2efaa4b3..903bb66d9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ Run `npm run test` to execute the unit tests via [Karma](https://karma-runner.gi Run `npm run e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). +## Contributing + +Use conventional commit format. For more info please read this article on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) + ## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). -- GitLab From 0b5a892df192b76185c7f97e998b28fb56c01958 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 9 Oct 2020 16:51:22 +0200 Subject: [PATCH 13/14] fix(docker): docker nginx run --- Dockerfile | 8 ++++---- docker-compose.yml | 4 ++-- nginx.conf | 13 ------------- nginx/dev.conf | 23 +++++++++++++++++++++++ nginx/nginx.conf | 30 ++++++++++++++++++++++++++++++ 5 files changed, 59 insertions(+), 19 deletions(-) delete mode 100644 nginx.conf create mode 100644 nginx/dev.conf create mode 100644 nginx/nginx.conf diff --git a/Dockerfile b/Dockerfile index 078d6f357..de073df46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,20 +14,20 @@ RUN npm install --silent COPY angular.json . COPY tsconfig.json . COPY tsconfig.app.json . -COPY nginx.conf . +COPY /nginx/nginx.conf . COPY /src ./src ARG conf # Building the Angular app /dist i18n -RUN npm run build:${conf} +RUN npm run build:dev # Stage 1, based on Nginx, to have only the compiled app FROM nginx:1.16.0-alpine # copy artifact build from the 'build environment' -COPY --from=build /app/dist /var/www/htdocs -COPY --from=build /app/nginx.conf /etc/nginx/nginx.conf + +COPY --from=build /app/dist/fr /usr/share/nginx/html RUN touch /var/run/nginx.pid diff --git a/docker-compose.yml b/docker-compose.yml index e96b52b97..7fe6b394e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,8 +4,8 @@ services: web-app: restart: unless-stopped build: . - image: registry.forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client:${TAG} + image: registry.forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client::${TAG} volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf + - ./nginx/dev.conf:/etc/nginx/conf.d/default.conf ports: - 8080:8080 diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 7f1102659..000000000 --- a/nginx.conf +++ /dev/null @@ -1,13 +0,0 @@ -server { - # staging server is listening on the port 8080 - listen 8080; - server_name _; - root /usr/share/nginx/html/; - - # rule serving the fr build - location / { - try_files $uri$args /index.html; - sub_filter '<html lang="fr">'; - } - -} diff --git a/nginx/dev.conf b/nginx/dev.conf new file mode 100644 index 000000000..0ec8e46c4 --- /dev/null +++ b/nginx/dev.conf @@ -0,0 +1,23 @@ +server { + listen 8080 default_server; + + root /usr/share/nginx/html/; + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ /index.html; + sub_filter '<html lang="en">' '<html lang="fr">'; + } + + # Rule serving the en build + location /en { + try_files $uri$args /en/index.html; + } + + # redirecting the /fr url to the new location of the fr build + location ~ ^/fr(.*)$ { + return 301 $scheme://$http_host$1$is_args$args; + } + +} diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 000000000..01a7b65eb --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,30 @@ +worker_processes 1; +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + + keepalive_timeout 65; + + gzip on; + + include /etc/nginx/conf.d/*.conf; + + # Max Body Size + client_max_body_size 10M; + +} -- GitLab From 70637df7d8cd841de8d8837779e73c9cbdff3e90 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 9 Oct 2020 17:05:30 +0200 Subject: [PATCH 14/14] fix(docker): fix docker-compose version --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7fe6b394e..e15eab359 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: '2' services: web-app: -- GitLab