[angular-16-irish-monitor | DONE | CHANGED]: resultLanding.component.html: Added OA Routes in mobile (small screens) | base.component.ts: Added method "quote()" and init routerHelper.

This commit is contained in:
Konstantina Galouni 2023-12-22 16:20:15 +02:00
parent 617489a565
commit 03b61d1fc6
2 changed files with 32 additions and 4 deletions

View File

@ -455,13 +455,9 @@
</div>
</div>
<div *ngIf="resultLandingInfo && resultLandingInfo.oaRoutes && !viewAll"
class="uk-margin-medium-top uk-padding uk-padding-remove-vertical">
<div class="landing-oaroutes-card uk-text-small uk-flex uk-padding-small">
<!-- <div class="uk-card uk-card-default uk-border uk-box-no-shadow uk-padding-small">-->
<!-- </div>-->
<div>
<div class="uk-flex uk-flex-top" uk-grid>
<div *ngIf="resultLandingInfo.oaRoutes.green" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
@ -568,6 +564,31 @@
<fos [subjects]="resultLandingInfo.fos" (suggestClicked)="suggestMobileClicked($event)"
(viewAllClicked)="viewAllMobile=$event; openFsModal(fosFsModal, 'Fields of Science (FoS)')"></fos>
</div>
<!-- OA Routes -->
<div *ngIf="resultLandingInfo.oaRoutes && !viewAllMobile" class="uk-margin-top uk-grid uk-grid-small uk-grid-divider" uk-grid>
<div class="uk-width-auto uk-text-meta">
OA Routes
</div>
<div class="uk-width-expand uk-flex">
<div>
<div class="uk-flex uk-flex-top" uk-grid>
<div *ngIf="resultLandingInfo.oaRoutes.green" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
<div class="dot green"></div>
<div class="uk-text-capitalize">Green</div>
</div>
<div *ngIf="resultLandingInfo.oaRoutes.oaColor" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-margin-remove-top">
<div class="dot" [ngClass]="resultLandingInfo.oaRoutes.oaColor"></div>
<div class="uk-text-capitalize">{{resultLandingInfo.oaRoutes.oaColor}}</div>
</div>
</div>
<div *ngIf="resultLandingInfo.oaRoutes.isInDiamondJournal" class="uk-flex-nowrap uk-flex uk-flex-middle uk-margin-xsmall-bottom uk-text-truncate">
<div class="dot diamond"></div>
<div>Published in a Diamond OA journal</div>
</div>
</div>
</div>
</div>
</div>
<div class="uk-section uk-margin-top uk-text-large uk-text-empashis uk-text-bold">
<hr>

View File

@ -6,6 +6,8 @@ import {PiwikService} from "../../utils/piwik/piwik.service";
import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../SEO/SEO.service";
import {ActivatedRoute, Data, NavigationEnd, Params, Router} from "@angular/router";
import {StringUtils} from "../../utils/string-utils.class";
import {RouterHelper} from "../../utils/routerHelper.class";
@Directive()
export abstract class BaseComponent implements OnDestroy {
@ -24,6 +26,7 @@ export abstract class BaseComponent implements OnDestroy {
protected seoService: SEOService;
protected _title: Title;
protected _router: Router;
public routerHelper: RouterHelper = new RouterHelper();
protected constructor() {
}
@ -101,4 +104,8 @@ export abstract class BaseComponent implements OnDestroy {
this.subscriptions.push(this._piwikService.trackView(properties, this.title).subscribe());
}
}
public quote(str: string) {
return StringUtils.quote(str);
}
}