Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions libs/feature/project-list/src/lib/project-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
@if (shouldShowTopProjectsSection()) {
<section class="top-projects-section page-break-after">
<lib-section-header
text="Top Matching Projects"
[text]="
projectSortOrder() === 'date'
? 'Projects (sorted by Date)'
: isPrintMode()
? 'Projects (sorted by Relevance)'
: 'Top Matching Projects'
"
[printMode]="isPrintMode()"
/>

Expand Down Expand Up @@ -42,9 +48,9 @@
<!-- Other projects section -->
@if (shouldShowOtherProjectsSection()) {
<section class="other-projects-section">
@if (!isPrintMode()) {
<lib-section-header text="Other Projects" [printMode]="isPrintMode()" />

@if (showSkeletons$ | async) { @for (skeleton of
} @if (showSkeletons$ | async) { @for (skeleton of
filteredOtherProjectSkeletons(); track skeleton) {
<ngx-skeleton-loader
class="project-item-skeleton project-item-skeleton--compact"
Expand Down
12 changes: 8 additions & 4 deletions libs/feature/project-list/src/lib/project-list.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { CommonModule } from '@angular/common';
import { Component, DestroyRef, inject, input } from '@angular/core';
import { Component, DestroyRef, inject, input, Signal } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { CustomizationStateService } from '@portfolio/customization-state';
import { SearchEngineService } from '@portfolio/search-engine-angular';
import { Project } from '@portfolio/search-engine-domain';
import { Project, ProjectSortOrder } from '@portfolio/search-engine-domain';
import { SearchTagService } from '@portfolio/search-tags';
import { SectionHeaderComponent } from '@portfolio/section-header';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
Expand Down Expand Up @@ -33,8 +33,12 @@ export class ProjectListComponent {
private readonly searchEngineService = inject(SearchEngineService);
private readonly searchTagService = inject(SearchTagService);
private readonly destroyRef = inject(DestroyRef);
protected readonly isPrintMode = inject(CustomizationStateService)
.isPrintMode;
private readonly customizationStateService = inject(
CustomizationStateService
);
protected readonly isPrintMode = this.customizationStateService.isPrintMode;
protected readonly projectSortOrder: Signal<ProjectSortOrder> =
this.customizationStateService.projectSortOrder;

protected readonly projectsOrder$: Observable<Project[]> =
this.customOrderService.projectsInOrder$;
Expand Down
Loading