Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 208-evenements-affichage
  • 354-actualites-partage-article-via-rs-image-d-illus-a-la-place-du-logo-res-in
  • 582-modification-fiche-structure-offre-structure-vs-offre-accompagnant-numerique-ordre-des-blocs
  • 630-bo-admin-fonction-2
  • 673-fiche-structure-mise-en-forme-des-rs
  • 712-evenements-page-de-saisie
  • dev
  • feat/nginx-security
  • master
  • renovate/bluehalo-ngx-leaflet-20.x
  • renovate/chokidar-4.x
  • renovate/chromatic-com-storybook-4.x
  • renovate/devdependencies-(non-major)
  • renovate/eslint-plugin-jsdoc-51.x
  • renovate/leaflet.locatecontrol-0.x
  • renovate/major-ag-grid-monorepo
  • renovate/major-angular-cli-monorepo
  • renovate/major-angular-eslint-monorepo
  • renovate/major-angular-monorepo
  • renovate/major-angularmaterial-monorepo
  • renovate/major-storybook-monorepo
  • renovate/major-typescript-eslint-monorepo
  • renovate/ng-packagr-20.x
  • renovate/ngx-matomo-client-8.x
  • renovate/ngx-toastr-19.x
  • renovate/ngx-translate-core-16.x
  • renovate/npm-11.x
  • wip_3.4
  • 1.1.0
  • v0.0.1
  • v0.0.2
  • v0.0.3
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.16.1
  • v1.16.2
  • v1.16.3
  • v1.17.0
  • v1.17.1
  • v1.17.2
  • v1.17.3
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v1.9.1
  • v2.0.0
  • v2.0.0-beta1
  • v2.0.0-beta1.1
  • v2.0.0-beta2
  • v2.0.0-beta2.1
  • v2.0.0-beta2.2
  • v2.0.0-beta4
  • v2.0.0-beta5
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.2.0
  • v2.3.0
  • v2.3.1
  • v2.3.2
  • v2.3.3
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.5.0
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.1.0
  • v3.1.0-openshift
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.3.0
  • v3.3.1
  • v3.4.0
  • v3.4.1
  • v3.4.2
  • v3.4.3
  • v4.0.0
  • v4.0.1
  • v4.0.2
98 results

Target

Select target project
  • web-et-numerique/factory/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client
1 result
Select Git revision
  • 208-evenements-affichage
  • 354-actualites-partage-article-via-rs-image-d-illus-a-la-place-du-logo-res-in
  • 582-modification-fiche-structure-offre-structure-vs-offre-accompagnant-numerique-ordre-des-blocs
  • 630-bo-admin-fonction-2
  • 673-fiche-structure-mise-en-forme-des-rs
  • 712-evenements-page-de-saisie
  • dev
  • feat/nginx-security
  • master
  • renovate/bluehalo-ngx-leaflet-20.x
  • renovate/chokidar-4.x
  • renovate/chromatic-com-storybook-4.x
  • renovate/devdependencies-(non-major)
  • renovate/eslint-plugin-jsdoc-51.x
  • renovate/leaflet.locatecontrol-0.x
  • renovate/major-ag-grid-monorepo
  • renovate/major-angular-cli-monorepo
  • renovate/major-angular-eslint-monorepo
  • renovate/major-angular-monorepo
  • renovate/major-angularmaterial-monorepo
  • renovate/major-storybook-monorepo
  • renovate/major-typescript-eslint-monorepo
  • renovate/ng-packagr-20.x
  • renovate/ngx-matomo-client-8.x
  • renovate/ngx-toastr-19.x
  • renovate/ngx-translate-core-16.x
  • renovate/npm-11.x
  • wip_3.4
  • 1.1.0
  • v0.0.1
  • v0.0.2
  • v0.0.3
  • v1.1.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.12.0
  • v1.12.1
  • v1.13.0
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.16.1
  • v1.16.2
  • v1.16.3
  • v1.17.0
  • v1.17.1
  • v1.17.2
  • v1.17.3
  • v1.2.0
  • v1.3.0
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.8.0
  • v1.9.0
  • v1.9.1
  • v2.0.0
  • v2.0.0-beta1
  • v2.0.0-beta1.1
  • v2.0.0-beta2
  • v2.0.0-beta2.1
  • v2.0.0-beta2.2
  • v2.0.0-beta4
  • v2.0.0-beta5
  • v2.0.1
  • v2.0.2
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v2.2.0
  • v2.3.0
  • v2.3.1
  • v2.3.2
  • v2.3.3
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.5.0
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.1.0
  • v3.1.0-openshift
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.3.0
  • v3.3.1
  • v3.4.0
  • v3.4.1
  • v3.4.2
  • v3.4.3
  • v4.0.0
  • v4.0.1
  • v4.0.2
98 results
Show changes
Commits on Source (2)
Showing
with 78 additions and 31 deletions
...@@ -17,13 +17,7 @@ ...@@ -17,13 +17,7 @@
/> />
</div> </div>
<div fxLayout="column" fxLayoutGap="8px" fxLayoutAlign="center"> <div fxLayout="column" fxLayoutGap="8px" fxLayoutAlign="center">
<div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="post.tags[0]"> <app-post-tag [post]="post"></app-post-tag>
<span>{{ post.tags[0].name }}</span>
</div>
<div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="!post.tags[0]">
<span>info</span>
</div>
<div fxLayout="row" class="title"> <div fxLayout="row" class="title">
{{ post.title }} {{ post.title }}
</div> </div>
......
...@@ -15,13 +15,7 @@ ...@@ -15,13 +15,7 @@
} }
} }
} }
.tag {
@include cn-bold-16;
text-transform: uppercase;
color: $secondary-color;
fill: $secondary-color;
stroke: $secondary-color;
}
.title { .title {
@media #{$large-phone} { @media #{$large-phone} {
@include cn-bold-18; @include cn-bold-18;
......
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { TagEnum } from '../../enum/tag.enum'; import { TagEnum } from '../../enum/tag.enum';
import { Post } from '../../models/post.model'; import { Post } from '../../models/post.model';
...@@ -19,6 +19,6 @@ export class PostCardComponent { ...@@ -19,6 +19,6 @@ export class PostCardComponent {
} }
public isAppelAProjet(): boolean { public isAppelAProjet(): boolean {
return this.post.tags[0].slug === this.tagEnum.appels; return this.post.tags[0] && this.post.tags[0].slug === this.tagEnum.appels;
} }
} }
...@@ -9,12 +9,7 @@ ...@@ -9,12 +9,7 @@
</div> </div>
<div class="gh-canvas"> <div class="gh-canvas">
<div fxLayout="column" fxLayoutAlign="center none"> <div fxLayout="column" fxLayoutAlign="center none">
<div *ngIf="post.tags[0]" fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px"> <app-post-tag [post]="post"></app-post-tag>
<span>{{ post.tags[0].name }}</span>
</div>
<div *ngIf="!post.tags[0]" fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px">
<span>Infos</span>
</div>
<div fxLayout="row" class="title">{{ post.title }}</div> <div fxLayout="row" class="title">{{ post.title }}</div>
<div fxLayout="column" class="informations"> <div fxLayout="column" class="informations">
<div>{{ post.author }}</div> <div>{{ post.author }}</div>
......
...@@ -14,13 +14,6 @@ ...@@ -14,13 +14,6 @@
} }
} }
.tag {
@include cn-bold-16;
text-transform: uppercase;
color: $secondary-color;
fill: $secondary-color;
stroke: $secondary-color;
}
.informations { .informations {
@include cn-regular-16; @include cn-regular-16;
div:nth-child(2n) { div:nth-child(2n) {
......
...@@ -130,6 +130,7 @@ h2 { ...@@ -130,6 +130,7 @@ h2 {
grid-template-columns: repeat(auto-fill, minmax(7%, 1fr)); grid-template-columns: repeat(auto-fill, minmax(7%, 1fr));
grid-column-gap: 1%; grid-column-gap: 1%;
grid-row-gap: 40px; grid-row-gap: 40px;
max-width: 1080px;
.col:nth-child(6n + 1) { .col:nth-child(6n + 1) {
@include big-container; @include big-container;
@media #{$news-max} { @media #{$news-max} {
......
...@@ -68,14 +68,20 @@ export class PostListComponent implements OnInit { ...@@ -68,14 +68,20 @@ export class PostListComponent implements OnInit {
}); });
} }
/**
* Fill articles list with headline handling
* @param news {PostWithMeta}
*/
public fillArticles(news: PostWithMeta): void { public fillArticles(news: PostWithMeta): void {
this.setNews(news); this.setNews(news);
const headLineTag = this.allPosts.filter((post: Post) => post.tags.some((tag) => tag.slug === TagEnum.aLaUne)); const headLineTag = this.allPosts.filter((post: Post) =>
post.tags.some((tag) => tag && tag.slug === TagEnum.aLaUne)
);
const headIndex = this.allPosts.findIndex((post) => post.id === headLineTag[0].id); const headIndex = this.allPosts.findIndex((post) => post.id === headLineTag[0].id);
this.allPosts.splice(headIndex, 1); this.allPosts.splice(headIndex, 1);
this.allPosts = [...headLineTag, ...this.allPosts]; this.allPosts = [...headLineTag, ..._.difference(this.allPosts, headLineTag)];
} }
public getPosts(filters?: Tag[]): void { public getPosts(filters?: Tag[]): void {
......
<div>
<div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="post.tags[0]">
<span>{{ displayTag(post) }}</span>
</div>
<div fxLayout="row" class="tag" fxLayoutAlign=" center" fxLayoutGap="12px" *ngIf="!post.tags[0]">
<span>infos</span>
</div>
</div>
@import '../../../../assets/scss/typography';
@import '../../../../assets/scss/color';
.tag {
@include cn-bold-16;
text-transform: uppercase;
color: $secondary-color;
fill: $secondary-color;
stroke: $secondary-color;
}
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PostTagComponent } from './post-tag.component';
describe('PostTagComponent', () => {
let component: PostTagComponent;
let fixture: ComponentFixture<PostTagComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PostTagComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(PostTagComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, Input } from '@angular/core';
import { TagEnum } from '../../enum/tag.enum';
import { Post } from '../../models/post.model';
@Component({
selector: 'app-post-tag',
templateUrl: './post-tag.component.html',
styleUrls: ['./post-tag.component.scss'],
})
export class PostTagComponent {
@Input() post: Post;
public displayTag(post: Post): string {
if (post.tags.length > 1) {
return post.tags.filter((tag) => tag.slug !== TagEnum.aLaUne)[0].name;
}
return post.tags[0].name;
}
}
...@@ -10,6 +10,7 @@ import { PostCardComponent } from './components/post-card/post-card.component'; ...@@ -10,6 +10,7 @@ import { PostCardComponent } from './components/post-card/post-card.component';
import { PostPublishComponent } from './components/post-publish/post-publish.component'; import { PostPublishComponent } from './components/post-publish/post-publish.component';
import { PostModalFiltersComponent } from './components/post-modal-filters/post-modal-filters.component'; import { PostModalFiltersComponent } from './components/post-modal-filters/post-modal-filters.component';
import { TagResolver } from './resolvers/tags.resolver'; import { TagResolver } from './resolvers/tags.resolver';
import { PostTagComponent } from './components/post-tag/post-tag.component';
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -20,6 +21,7 @@ import { TagResolver } from './resolvers/tags.resolver'; ...@@ -20,6 +21,7 @@ import { TagResolver } from './resolvers/tags.resolver';
PostCardComponent, PostCardComponent,
PostModalFiltersComponent, PostModalFiltersComponent,
PostPublishComponent, PostPublishComponent,
PostTagComponent,
], ],
imports: [CommonModule, PostRoutingModule, SharedModule], imports: [CommonModule, PostRoutingModule, SharedModule],
providers: [TagResolver], providers: [TagResolver],
......