From f866b6a6e94639ee2e58c98e3478862289984432 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 11:30:51 +0100 Subject: [PATCH 01/18] fix(post) : fix header title --- .../post-header/post-header.component.html | 2 +- .../post-header/post-header.component.scss | 47 ++----------------- src/assets/scss/_layout.scss | 2 +- 3 files changed, 5 insertions(+), 46 deletions(-) diff --git a/src/app/post/components/post-header/post-header.component.html b/src/app/post/components/post-header/post-header.component.html index 6b48f6d33..348b3436f 100644 --- a/src/app/post/components/post-header/post-header.component.html +++ b/src/app/post/components/post-header/post-header.component.html @@ -1,6 +1,6 @@ <div class="header-container"> <div class="section-container" fxLayout="column" fxLayoutAlign="space-between"> - <h1>Actualités</h1> + <h1>Fil d’actualité<br />du réseau d’inclusion numérique</h1> <div fxLayout="row" fxLayoutGap="5px" fxLayoutAlign="space-between flex-end" class="overflow"> <div fxLayout="row" class="row-mobile"> <div fxLayout="row" fxLayoutAlign="center center" *ngFor="let tag of tags.others"> diff --git a/src/app/post/components/post-header/post-header.component.scss b/src/app/post/components/post-header/post-header.component.scss index 46d4f71b1..3371a0c1f 100644 --- a/src/app/post/components/post-header/post-header.component.scss +++ b/src/app/post/components/post-header/post-header.component.scss @@ -6,6 +6,9 @@ h1 { margin-bottom: 0px; + @media #{$large-phone} { + @include cn-bold-28; + } } .header-container { @@ -81,50 +84,6 @@ h1 { } } -// .btnSection { -// padding: 16px 0 0px 0; -// button { -// background: $white; -// height: 40px; -// width: 210px; -// border: 1px solid $grey-4; -// padding: 3px 16px 3px 16px; -// outline: none; -// border-radius: 4px; -// cursor: pointer; -// white-space: nowrap; -// @include btn-normal; -// .arrow { -// background-color: transparent; -// border-bottom: 1px solid $grey-2; -// border-right: 1px solid $grey-2; -// transform: translateY(-25%) rotate(45deg); -// margin: 0 5px 0 10px; -// height: 7px; -// width: 7px; -// } -// &:focus { -// border-color: $blue-hover; -// } -// } -// .selected { -// border-color: $primary-color !important; -// color: inherit; -// .arrow { -// background-color: transparent; -// border-bottom: 1px solid $primary-color; -// border-right: 1px solid $primary-color; -// transform: translateY(25%) rotate(-135deg); -// margin: 0 5px 0 10px; -// height: 7px; -// width: 7px; -// } -// } -// .containCheckedFilters { -// border-color: $secondary-color; -// } -// } - .tag-button { padding: 8px 10px; @include cn-regular-16; diff --git a/src/assets/scss/_layout.scss b/src/assets/scss/_layout.scss index 3da7ec582..2a4a34f6e 100644 --- a/src/assets/scss/_layout.scss +++ b/src/assets/scss/_layout.scss @@ -3,4 +3,4 @@ $footer-height: 56px; $header-height-phone: 70px; $footer-height-phone: 75px; $progressBar-height: 50px; -$header-post-height: 140px; +$header-post-height: 180px; -- GitLab From 6f9604d5b59b62cfeef3db7278601d7917777963 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 11:43:01 +0100 Subject: [PATCH 02/18] fix(news) : change title list + remove second title --- .../components/post-list/post-list.component.html | 11 ++++++++--- .../components/post-list/post-list.component.scss | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html index 00642e6c0..f26c2cb0a 100644 --- a/src/app/post/components/post-list/post-list.component.html +++ b/src/app/post/components/post-list/post-list.component.html @@ -17,7 +17,7 @@ </div> <div fxLayout="column" *ngIf="isALaUneTag() && !displayTags()"> <div fxLayout="row" class="row-border" fxLayoutAlign="space-between center"> - <h2>à la une</h2> + <h2>dernières actualités</h2> <app-button [type]="'button'" [style]="'buttonWithHash'" @@ -46,8 +46,13 @@ </div> </div> <div fxLayout="column"> - <div fxLayout="row" class="row-border" fxLayoutAlign="space-between center"> - <h2 [ngClass]="{ 'padding-16-Top': isALaUneTag() && !displayTags() }">{{ getDisplayedTag() }}</h2> + <div + fxLayout="row" + class="row-border" + [ngClass]="{ hide: isALaUneTag() && !displayTags() }" + fxLayoutAlign="space-between center" + > + <h2>{{ getDisplayedTag() }}</h2> <app-button *ngIf="displayTags() || !isALaUneTag()" [type]="'button'" diff --git a/src/app/post/components/post-list/post-list.component.scss b/src/app/post/components/post-list/post-list.component.scss index ea2f433a9..64df5bdea 100644 --- a/src/app/post/components/post-list/post-list.component.scss +++ b/src/app/post/components/post-list/post-list.component.scss @@ -112,6 +112,6 @@ h2 { } } -.padding-16-Top { - padding-top: 16px; +.hide { + display: none !important; } -- GitLab From 753bfca081c2b9b457c203861da950c405d2a948 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 11:45:27 +0100 Subject: [PATCH 03/18] fix(news) : fix size btn select --- src/app/post/components/post-header/post-header.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/post/components/post-header/post-header.component.scss b/src/app/post/components/post-header/post-header.component.scss index 3371a0c1f..13a74c77b 100644 --- a/src/app/post/components/post-header/post-header.component.scss +++ b/src/app/post/components/post-header/post-header.component.scss @@ -25,7 +25,7 @@ h1 { button { background: $white; height: 40px; - width: 100%; + width: 210px; border: 1px solid $grey-4; padding: 3px 16px 3px 16px; outline: none; -- GitLab From dc74bb6fb657adb005f4de85d189653ffb958db2 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 11:47:27 +0100 Subject: [PATCH 04/18] fix(news) : fix size + margin container --- .../post/components/post-details/post-details.component.scss | 1 - .../post/components/post-publish/post-publish.component.scss | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/app/post/components/post-details/post-details.component.scss b/src/app/post/components/post-details/post-details.component.scss index 496864352..dede710f1 100644 --- a/src/app/post/components/post-details/post-details.component.scss +++ b/src/app/post/components/post-details/post-details.component.scss @@ -7,7 +7,6 @@ $margin-post: 20px; .postContainer { - max-width: 832px; margin: $margin-post auto; min-height: calc( var(--vh, 1vh) * 100 - #{$header-height} - #{$footer-height} - #{$header-post-height} - #{$margin-post}* 3 diff --git a/src/app/post/components/post-publish/post-publish.component.scss b/src/app/post/components/post-publish/post-publish.component.scss index 8c66547d0..ac7f239fa 100644 --- a/src/app/post/components/post-publish/post-publish.component.scss +++ b/src/app/post/components/post-publish/post-publish.component.scss @@ -5,8 +5,6 @@ $margin-post: 20px; .container { - max-width: 832px; - width: 95%; margin: $margin-post auto; min-height: calc( var(--vh, 1vh) * 100 - #{$header-height} - #{$footer-height} - #{$header-post-height} - #{$margin-post}* 2 -- GitLab From d3b74240f36b490d22d1e5f039de34abfdd4423d Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 12:13:15 +0100 Subject: [PATCH 05/18] fix(news) : hide bignews if no exist --- src/app/post/components/post-list/post-list.component.html | 2 +- src/app/post/components/post-list/post-list.component.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html index f26c2cb0a..f6e9f067d 100644 --- a/src/app/post/components/post-list/post-list.component.html +++ b/src/app/post/components/post-list/post-list.component.html @@ -25,7 +25,7 @@ (action)="togglePublishNews()" ></app-button> </div> - <app-post-card [class]="'bigNew'" [post]="bigNews"></app-post-card> + <app-post-card *ngIf="bigNews" [class]="'bigNew'" [post]="bigNews"></app-post-card> </div> <div fxLayout="column" fxLayoutAlign=" center" class="project-container mobile"> <div class="background-project-container"> diff --git a/src/app/post/components/post-list/post-list.component.ts b/src/app/post/components/post-list/post-list.component.ts index 6bba02204..0794b1704 100644 --- a/src/app/post/components/post-list/post-list.component.ts +++ b/src/app/post/components/post-list/post-list.component.ts @@ -52,7 +52,9 @@ export class PostListComponent implements OnInit { this.projectsNew = projectNews; }); this.postService.getPosts(1, [TagEnum.aLaUne]).subscribe((news) => { - this.bigNews = this.addAuthorToPost(news.posts[0]); + if (news.posts[0]) { + this.bigNews = this.addAuthorToPost(news.posts[0]); + } }); this.route.queryParams.subscribe((queryParams) => { // If main tag is in route, set it -- GitLab From e2e52d4e33f73cc68a2083b92ad91de24ba7e38e Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 12:17:39 +0100 Subject: [PATCH 06/18] fix(news) : change a-la-une to recentes --- src/app/post/components/post-header/post-header.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/post/components/post-header/post-header.component.ts b/src/app/post/components/post-header/post-header.component.ts index 1cbc7f338..21e061d83 100644 --- a/src/app/post/components/post-header/post-header.component.ts +++ b/src/app/post/components/post-header/post-header.component.ts @@ -27,6 +27,9 @@ export class PostHeaderComponent implements OnInit { this.route.data.subscribe((data) => { if (data.tags) { this.tags = data.tags; + this.tags.others.map((tag) => { + tag.slug == TagEnum.aLaUne ? (tag.name = 'Récentes') : tag.name; + }); } }); -- GitLab From 1c022ab01b3125ce43d6f05ad52303266e271afb Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 17:19:57 +0100 Subject: [PATCH 07/18] fix(news) : fix css --- src/app/post/components/post-card/post-card.component.scss | 1 + .../components/post-details/post-details.component.scss | 7 +++++-- src/app/post/components/post-list/post-list.component.scss | 1 - .../components/post-publish/post-publish.component.scss | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/post/components/post-card/post-card.component.scss b/src/app/post/components/post-card/post-card.component.scss index aaf3133af..1726071cc 100644 --- a/src/app/post/components/post-card/post-card.component.scss +++ b/src/app/post/components/post-card/post-card.component.scss @@ -27,6 +27,7 @@ } } .imageContainer { + margin-bottom: 12px !important; .image { object-fit: cover; height: 88px; diff --git a/src/app/post/components/post-details/post-details.component.scss b/src/app/post/components/post-details/post-details.component.scss index dede710f1..57fad50ec 100644 --- a/src/app/post/components/post-details/post-details.component.scss +++ b/src/app/post/components/post-details/post-details.component.scss @@ -7,7 +7,8 @@ $margin-post: 20px; .postContainer { - margin: $margin-post auto; + max-width: 860px; + margin: $margin-post 0; min-height: calc( var(--vh, 1vh) * 100 - #{$header-height} - #{$footer-height} - #{$header-post-height} - #{$margin-post}* 3 ); @@ -66,6 +67,8 @@ $margin-post: 20px; ::ng-deep a { @include hyperlink; padding: 0; - font-size: 18px; + } + ::ng-deep p { + @include cn-regular-18; } } diff --git a/src/app/post/components/post-list/post-list.component.scss b/src/app/post/components/post-list/post-list.component.scss index 64df5bdea..1416850e4 100644 --- a/src/app/post/components/post-list/post-list.component.scss +++ b/src/app/post/components/post-list/post-list.component.scss @@ -5,7 +5,6 @@ .section-container { background: $grey-6; - margin-top: 40px; min-height: 68vh; width: 100%; .row-border { diff --git a/src/app/post/components/post-publish/post-publish.component.scss b/src/app/post/components/post-publish/post-publish.component.scss index ac7f239fa..214d5ea66 100644 --- a/src/app/post/components/post-publish/post-publish.component.scss +++ b/src/app/post/components/post-publish/post-publish.component.scss @@ -5,7 +5,8 @@ $margin-post: 20px; .container { - margin: $margin-post auto; + max-width: 860px; + margin: $margin-post 0 100px 0; min-height: calc( var(--vh, 1vh) * 100 - #{$header-height} - #{$footer-height} - #{$header-post-height} - #{$margin-post}* 2 ); -- GitLab From 99f05397e1b9134ce2b4faf9ff921522e79ead61 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Thu, 11 Mar 2021 17:22:44 +0100 Subject: [PATCH 08/18] fix(news) : fix text --- src/app/post/components/post-header/post-header.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/post/components/post-header/post-header.component.ts b/src/app/post/components/post-header/post-header.component.ts index 21e061d83..01def24b4 100644 --- a/src/app/post/components/post-header/post-header.component.ts +++ b/src/app/post/components/post-header/post-header.component.ts @@ -28,7 +28,7 @@ export class PostHeaderComponent implements OnInit { if (data.tags) { this.tags = data.tags; this.tags.others.map((tag) => { - tag.slug == TagEnum.aLaUne ? (tag.name = 'Récentes') : tag.name; + tag.slug == TagEnum.aLaUne ? (tag.name = 'Les + récentes') : tag.name; }); } }); -- GitLab From b840132fa75594607bab1c5a12ab3163b6900e15 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 10:48:29 +0100 Subject: [PATCH 09/18] fix(news) : fix text --- src/app/post/components/post-header/post-header.component.ts | 2 +- src/app/post/components/post-list/post-list.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/post/components/post-header/post-header.component.ts b/src/app/post/components/post-header/post-header.component.ts index 01def24b4..a938fe437 100644 --- a/src/app/post/components/post-header/post-header.component.ts +++ b/src/app/post/components/post-header/post-header.component.ts @@ -99,7 +99,7 @@ export class PostHeaderComponent implements OnInit { this.router.navigate([], { relativeTo: this.route, queryParams: { - mainTag: this.mainActiveTag.slug, + mainTag: this.mainActiveTag.slug == this.tagEnum.etudes ? this.mainActiveTag.name : this.mainActiveTag.slug, publicTags: this.checkedPublicTags.map((tag) => tag.slug), locationTags: this.checkedLocationTags.map((tag) => tag.slug), }, diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html index f6e9f067d..812ae2f3c 100644 --- a/src/app/post/components/post-list/post-list.component.html +++ b/src/app/post/components/post-list/post-list.component.html @@ -62,7 +62,7 @@ ></app-button> </div> <div *ngIf="leftColumnPosts.length <= 0" fxLayout="column"> - <p>Aucun résultat ne correspond a votre recherche.</p> + <p>Aucun résultat ne correspond à votre recherche.</p> </div> <div fxLayout="row" fxLayoutGap="33px"> <div fxLayout="column" class="columnPosts"> -- GitLab From 3ecb9d20b812445077e87c38ffb7e4246ad0b19c Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 10:57:33 +0100 Subject: [PATCH 10/18] =?UTF-8?q?fix(news)=20:=20replace=20public=20logo?= =?UTF-8?q?=20+=20size=20appel=20=C3=A0=20projet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/post-header/post-header.component.html | 2 +- .../post/components/post-list/post-list.component.scss | 2 +- src/assets/ico/sprite.svg | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/app/post/components/post-header/post-header.component.html b/src/app/post/components/post-header/post-header.component.html index 348b3436f..b0e300e63 100644 --- a/src/app/post/components/post-header/post-header.component.html +++ b/src/app/post/components/post-header/post-header.component.html @@ -35,7 +35,7 @@ <app-svg-icon class="icon" [type]="'ico'" - [iconClass]="modalTypeOpened === TypeModal.public ? 'white' : 'grey-1'" + [iconClass]="modalTypeOpened === TypeModal.public ? 'white icon-32' : 'grey-1 icon-32'" [icon]="'news-public'" ></app-svg-icon> <div class="arrow"></div> diff --git a/src/app/post/components/post-list/post-list.component.scss b/src/app/post/components/post-list/post-list.component.scss index 1416850e4..47208d448 100644 --- a/src/app/post/components/post-list/post-list.component.scss +++ b/src/app/post/components/post-list/post-list.component.scss @@ -30,7 +30,7 @@ h2 { @media #{$tablet} { width: 100%; } - width: 70%; + width: 80%; h2 { @media #{$large-phone} { @include cn-bold-22; diff --git a/src/assets/ico/sprite.svg b/src/assets/ico/sprite.svg index 08a36d469..a8f21b0b4 100644 --- a/src/assets/ico/sprite.svg +++ b/src/assets/ico/sprite.svg @@ -218,12 +218,10 @@ <rect x="21.7109" y="16.4634" width="1.33333" height="9.11111"/> </symbol> -<symbol id="news-public" viewBox="0 0 29 26" xmlns="http://www.w3.org/2000/svg"> -<path d="M15.8488 19.9496C16.7844 19.3911 17.4109 18.3687 17.4109 17.2C17.4109 15.4327 15.9782 14 14.2109 14C12.4436 14 11.0109 15.4327 11.0109 17.2C11.0109 18.3687 11.6375 19.3911 12.573 19.9496C11.1806 20.5754 10.2109 21.9745 10.2109 23.6V26H18.2109V23.6C18.2109 21.9745 17.2413 20.5754 15.8488 19.9496Z" /> -<path d="M5.84883 19.9496C6.78438 19.3911 7.41094 18.3687 7.41094 17.2C7.41094 15.4327 5.97825 14 4.21094 14C2.44363 14 1.01094 15.4327 1.01094 17.2C1.01094 18.3687 1.6375 19.3911 2.57304 19.9496C1.18059 20.5754 0.210938 21.9745 0.210938 23.6V26H8.21094V23.6C8.21094 21.9745 7.24128 20.5754 5.84883 19.9496Z" /> -<path d="M10.8488 5.94963C11.7844 5.39114 12.4109 4.36874 12.4109 3.2C12.4109 1.43269 10.9782 0 9.21094 0C7.44363 0 6.01094 1.43269 6.01094 3.2C6.01094 4.36874 6.6375 5.39114 7.57304 5.94963C6.18059 6.57538 5.21094 7.97445 5.21094 9.6V12H13.2109V9.6C13.2109 7.97445 12.2413 6.57538 10.8488 5.94963Z" /> -<path d="M25.8488 19.9496C26.7844 19.3911 27.4109 18.3687 27.4109 17.2C27.4109 15.4327 25.9782 14 24.2109 14C22.4436 14 21.0109 15.4327 21.0109 17.2C21.0109 18.3687 21.6375 19.3911 22.573 19.9496C21.1806 20.5754 20.2109 21.9745 20.2109 23.6V26H28.2109V23.6C28.2109 21.9745 27.2413 20.5754 25.8488 19.9496Z" /> -<path d="M20.8488 5.94963C21.7844 5.39114 22.4109 4.36874 22.4109 3.2C22.4109 1.43269 20.9782 0 19.2109 0C17.4436 0 16.0109 1.43269 16.0109 3.2C16.0109 4.36874 16.6375 5.39114 17.573 5.94963C16.1806 6.57538 15.2109 7.97445 15.2109 9.6V12H23.2109V9.6C23.2109 7.97445 22.2413 6.57538 20.8488 5.94963Z"/> +<symbol id="news-public" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> +<path d="M23.5985 23.9446C24.6326 23.3273 25.3251 22.1973 25.3251 20.9055C25.3251 18.9522 23.7416 17.3687 21.7882 17.3687C19.8349 17.3687 18.2514 18.9522 18.2514 20.9055C18.2514 22.1973 18.9439 23.3273 19.9779 23.9446C18.4389 24.6362 17.3672 26.1825 17.3672 27.9792V29.5265H26.2093V27.9792C26.2093 26.1825 25.1376 24.6362 23.5985 23.9446Z" stroke="none"/> +<path d="M11.4423 23.9446C12.4763 23.3273 13.1688 22.1973 13.1688 20.9055C13.1688 18.9522 11.5853 17.3687 9.63199 17.3687C7.67865 17.3687 6.09515 18.9522 6.09515 20.9055C6.09515 22.1973 6.78766 23.3273 7.82169 23.9446C6.28266 24.6362 5.21094 26.1825 5.21094 27.9792V29.5265H14.053V27.9792C14.053 26.1825 12.9813 24.6362 11.4423 23.9446Z" stroke="none"/> +<path d="M16.9696 9.5759C18.0037 8.95863 18.6962 7.82861 18.6962 6.53684C18.6962 4.5835 17.1127 3 15.1593 3C13.206 3 11.6225 4.5835 11.6225 6.53684C11.6225 7.82861 12.315 8.95863 13.349 9.5759C11.81 10.2675 10.7383 11.8139 10.7383 13.6105V15.1579H19.5804V13.6105C19.5804 11.8139 18.5087 10.2675 16.9696 9.5759Z" stroke="none"/> </symbol> -- GitLab From 56fd9b89821041d05a710b4b48224a78359f0e7b Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 11:22:47 +0100 Subject: [PATCH 11/18] fix(news) : add body to email --- .../post/components/post-publish/post-publish.component.html | 4 +++- .../post/components/post-publish/post-publish.component.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/post/components/post-publish/post-publish.component.html b/src/app/post/components/post-publish/post-publish.component.html index 1578c1ea9..7c28907ac 100644 --- a/src/app/post/components/post-publish/post-publish.component.html +++ b/src/app/post/components/post-publish/post-publish.component.html @@ -27,7 +27,9 @@ <br /> </div> <div> - <a class="btn-primary" href="mailto:inclusionnumerique@grandlyon.com?subject=Nouvelle actualité à intégrer" + <a + class="btn-primary" + [href]="'mailto:inclusionnumerique@grandlyon.com?subject=Nouvelle actualité à intégrer&body=' + bodyMail" >Envoyer votre actu par mail</a > </div> diff --git a/src/app/post/components/post-publish/post-publish.component.ts b/src/app/post/components/post-publish/post-publish.component.ts index a1df80d6e..12095321e 100644 --- a/src/app/post/components/post-publish/post-publish.component.ts +++ b/src/app/post/components/post-publish/post-publish.component.ts @@ -8,7 +8,8 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; export class PostPublishComponent implements OnInit { @Output() closePublish = new EventEmitter<boolean>(); constructor() {} - + public bodyMail = + "Bonjour, je souhaite ajouter cette publication sur Rés'in :%0D- Titre :%0D- Texte :%0D- Auteur :%0D- Image : à joindre en pièce jointe"; ngOnInit(): void {} public backToPosts(): void { -- GitLab From 07c035a2e03eb28eeeb13493f967015d499b9326 Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 11:23:13 +0100 Subject: [PATCH 12/18] fix(news) : order list commune tags --- .../components/post-header/post-header.component.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/app/post/components/post-header/post-header.component.ts b/src/app/post/components/post-header/post-header.component.ts index a938fe437..11bb4446e 100644 --- a/src/app/post/components/post-header/post-header.component.ts +++ b/src/app/post/components/post-header/post-header.component.ts @@ -30,6 +30,9 @@ export class PostHeaderComponent implements OnInit { this.tags.others.map((tag) => { tag.slug == TagEnum.aLaUne ? (tag.name = 'Les + récentes') : tag.name; }); + this.tags.commune.sort((tagA, tagB) => { + return this.sortArray(tagA, tagB); + }); } }); @@ -46,6 +49,15 @@ export class PostHeaderComponent implements OnInit { }); } + private sortArray(tagA: Tag, tagB: Tag): number { + const nameTagA = tagA.name.toUpperCase(); + const nameTagB = tagB.name.toUpperCase(); + let comparison = 1; + if (nameTagA < nameTagB) { + comparison = -1; + } + return comparison; + } // Open the modal and display the list according to the right filter button public openModal(modalType: TypeModalNews): void { // if modal already opened, reset type -- GitLab From a389a578d3f6b8044a5ad38dc2c5f072b4b8bc6d Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 11:34:02 +0100 Subject: [PATCH 13/18] fix(news) : go back with keep filters --- .../post/components/post-details/post-details.component.ts | 6 ++++-- src/app/post/components/post-list/post-list.component.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/post/components/post-details/post-details.component.ts b/src/app/post/components/post-details/post-details.component.ts index 797763328..317585f70 100644 --- a/src/app/post/components/post-details/post-details.component.ts +++ b/src/app/post/components/post-details/post-details.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; +import { RouterListenerService } from '../../../services/routerListener.service'; import { Post } from '../../models/post.model'; import { PostService } from '../../services/post.service'; @@ -14,7 +15,8 @@ export class PostDetailsComponent implements OnInit { private activatedRoute: ActivatedRoute, private router: Router, private postService: PostService, - private sanitizer: DomSanitizer + private sanitizer: DomSanitizer, + private routerListener: RouterListenerService ) {} post: Post; ngOnInit(): void { @@ -31,6 +33,6 @@ export class PostDetailsComponent implements OnInit { } public backToPosts(): void { - this.router.navigateByUrl('/news'); + this.routerListener.goToPreviousUrl(); } } diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html index 812ae2f3c..4517fc557 100644 --- a/src/app/post/components/post-list/post-list.component.html +++ b/src/app/post/components/post-list/post-list.component.html @@ -58,7 +58,7 @@ [type]="'button'" [style]="'buttonWithHash'" [text]="'Publier votre actu'" - (action)="publishNews()" + (action)="togglePublishNews()" ></app-button> </div> <div *ngIf="leftColumnPosts.length <= 0" fxLayout="column"> -- GitLab From 22fc3b6900bf12f8db02f3846e0be0f4a77d9d5b Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 11:49:04 +0100 Subject: [PATCH 14/18] fix(news-header) : fix text on mobile view --- .../components/post-header/post-header.component.html | 5 ++++- .../components/post-header/post-header.component.scss | 9 +++++++++ src/assets/scss/_layout.scss | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/post/components/post-header/post-header.component.html b/src/app/post/components/post-header/post-header.component.html index b0e300e63..e12406201 100644 --- a/src/app/post/components/post-header/post-header.component.html +++ b/src/app/post/components/post-header/post-header.component.html @@ -1,6 +1,9 @@ <div class="header-container"> <div class="section-container" fxLayout="column" fxLayoutAlign="space-between"> - <h1>Fil d’actualité<br />du réseau d’inclusion numérique</h1> + <h1> + Fil d’actualité + <p class="onlyOnDesktop">du réseau d’inclusion numérique</p> + </h1> <div fxLayout="row" fxLayoutGap="5px" fxLayoutAlign="space-between flex-end" class="overflow"> <div fxLayout="row" class="row-mobile"> <div fxLayout="row" fxLayoutAlign="center center" *ngFor="let tag of tags.others"> diff --git a/src/app/post/components/post-header/post-header.component.scss b/src/app/post/components/post-header/post-header.component.scss index 13a74c77b..2db454d1b 100644 --- a/src/app/post/components/post-header/post-header.component.scss +++ b/src/app/post/components/post-header/post-header.component.scss @@ -6,13 +6,22 @@ h1 { margin-bottom: 0px; + .onlyOnDesktop { + margin: 0; + } @media #{$large-phone} { @include cn-bold-28; + .onlyOnDesktop { + display: none; + } } } .header-container { height: #{$header-post-height}; + @media #{$large-phone} { + height: #{$header-post-height-mobile}; + } background: $white; } diff --git a/src/assets/scss/_layout.scss b/src/assets/scss/_layout.scss index 2a4a34f6e..d8f402ac2 100644 --- a/src/assets/scss/_layout.scss +++ b/src/assets/scss/_layout.scss @@ -4,3 +4,4 @@ $header-height-phone: 70px; $footer-height-phone: 75px; $progressBar-height: 50px; $header-post-height: 180px; +$header-post-height-mobile: 140px; -- GitLab From 963958fca6f47265e84b8811059879cc647973fd Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 11:56:20 +0100 Subject: [PATCH 15/18] fix(news) : fix title mobile --- src/app/post/components/post-card/post-card.component.scss | 3 +++ src/app/post/components/post-header/post-header.component.scss | 1 + 2 files changed, 4 insertions(+) diff --git a/src/app/post/components/post-card/post-card.component.scss b/src/app/post/components/post-card/post-card.component.scss index 1726071cc..8aad13d4b 100644 --- a/src/app/post/components/post-card/post-card.component.scss +++ b/src/app/post/components/post-card/post-card.component.scss @@ -19,6 +19,9 @@ } } .title { + @media #{$large-phone} { + @include cn-bold-22; + } @include cn-bold-30; } .description { diff --git a/src/app/post/components/post-header/post-header.component.scss b/src/app/post/components/post-header/post-header.component.scss index 2db454d1b..7a51cec87 100644 --- a/src/app/post/components/post-header/post-header.component.scss +++ b/src/app/post/components/post-header/post-header.component.scss @@ -5,6 +5,7 @@ @import '../../../../assets/scss/layout'; h1 { + margin-top: 25px; margin-bottom: 0px; .onlyOnDesktop { margin: 0; -- GitLab From 64f0a2e4d91909216c2f1ac5f2bbfcedb5c501e4 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Fri, 12 Mar 2021 14:25:18 +0100 Subject: [PATCH 16/18] fix: add CR to mail template --- src/app/post/components/post-publish/post-publish.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/post/components/post-publish/post-publish.component.ts b/src/app/post/components/post-publish/post-publish.component.ts index 12095321e..061bc6698 100644 --- a/src/app/post/components/post-publish/post-publish.component.ts +++ b/src/app/post/components/post-publish/post-publish.component.ts @@ -9,7 +9,7 @@ export class PostPublishComponent implements OnInit { @Output() closePublish = new EventEmitter<boolean>(); constructor() {} public bodyMail = - "Bonjour, je souhaite ajouter cette publication sur Rés'in :%0D- Titre :%0D- Texte :%0D- Auteur :%0D- Image : à joindre en pièce jointe"; + "Bonjour,%0D Je souhaite ajouter cette publication sur Rés'in :%0D- Titre :%0D- Texte :%0D- Auteur :%0D- Image : à joindre en pièce jointe"; ngOnInit(): void {} public backToPosts(): void { -- GitLab From 83164c171fee8bc6ef632071d4d97e131809216f Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 14:53:44 +0100 Subject: [PATCH 17/18] fix(news) : review fix --- .../post/components/post-header/post-header.component.ts | 7 +++---- src/app/post/components/post-list/post-list.component.html | 3 +-- src/app/post/components/post-list/post-list.component.scss | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/app/post/components/post-header/post-header.component.ts b/src/app/post/components/post-header/post-header.component.ts index 11bb4446e..21ef7a388 100644 --- a/src/app/post/components/post-header/post-header.component.ts +++ b/src/app/post/components/post-header/post-header.component.ts @@ -27,7 +27,7 @@ export class PostHeaderComponent implements OnInit { this.route.data.subscribe((data) => { if (data.tags) { this.tags = data.tags; - this.tags.others.map((tag) => { + this.tags.others.forEach((tag) => { tag.slug == TagEnum.aLaUne ? (tag.name = 'Les + récentes') : tag.name; }); this.tags.commune.sort((tagA, tagB) => { @@ -52,11 +52,10 @@ export class PostHeaderComponent implements OnInit { private sortArray(tagA: Tag, tagB: Tag): number { const nameTagA = tagA.name.toUpperCase(); const nameTagB = tagB.name.toUpperCase(); - let comparison = 1; if (nameTagA < nameTagB) { - comparison = -1; + return -1; } - return comparison; + return 1; } // Open the modal and display the list according to the right filter button public openModal(modalType: TypeModalNews): void { diff --git a/src/app/post/components/post-list/post-list.component.html b/src/app/post/components/post-list/post-list.component.html index 4517fc557..2d6c15596 100644 --- a/src/app/post/components/post-list/post-list.component.html +++ b/src/app/post/components/post-list/post-list.component.html @@ -47,14 +47,13 @@ </div> <div fxLayout="column"> <div + *ngIf="!isALaUneTag() || displayTags()" fxLayout="row" class="row-border" - [ngClass]="{ hide: isALaUneTag() && !displayTags() }" fxLayoutAlign="space-between center" > <h2>{{ getDisplayedTag() }}</h2> <app-button - *ngIf="displayTags() || !isALaUneTag()" [type]="'button'" [style]="'buttonWithHash'" [text]="'Publier votre actu'" diff --git a/src/app/post/components/post-list/post-list.component.scss b/src/app/post/components/post-list/post-list.component.scss index 47208d448..38cf7dc00 100644 --- a/src/app/post/components/post-list/post-list.component.scss +++ b/src/app/post/components/post-list/post-list.component.scss @@ -110,7 +110,3 @@ h2 { margin-bottom: 0; } } - -.hide { - display: none !important; -} -- GitLab From 7a973ec804939b614d97ea0937c5e275c52584fb Mon Sep 17 00:00:00 2001 From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com> Date: Fri, 12 Mar 2021 14:58:30 +0100 Subject: [PATCH 18/18] fix(news) : fix review --- src/app/post/components/post-header/post-header.component.html | 2 +- src/app/post/components/post-list/post-list.component.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/post/components/post-header/post-header.component.html b/src/app/post/components/post-header/post-header.component.html index e12406201..ae793b227 100644 --- a/src/app/post/components/post-header/post-header.component.html +++ b/src/app/post/components/post-header/post-header.component.html @@ -12,7 +12,7 @@ tabindex="0" (click)="activateTag(tag)" (keydown.enter)="activateTag(tag)" - [ngClass]="{ active: tag.slug === mainActiveTag.slug }" + [ngClass]="{ active: tag.slug === mainActiveTag.slug || tag.name === mainActiveTag.slug }" >{{ tag.name }}</span > </div> diff --git a/src/app/post/components/post-list/post-list.component.ts b/src/app/post/components/post-list/post-list.component.ts index 0794b1704..7703df215 100644 --- a/src/app/post/components/post-list/post-list.component.ts +++ b/src/app/post/components/post-list/post-list.component.ts @@ -57,6 +57,7 @@ export class PostListComponent implements OnInit { } }); this.route.queryParams.subscribe((queryParams) => { + this.isPublishMode = false; // If main tag is in route, set it if (queryParams.mainTag) { this.selectedMainTagSlug = queryParams.mainTag; -- GitLab