Skip to content

Commit

Permalink
Merge pull request #2034 from asfadmin/yoreley-slider7
Browse files Browse the repository at this point in the history
Yoreley slider7
  • Loading branch information
artisticlight authored Nov 26, 2024
2 parents ad03b8f + 4776476 commit 9d67dca
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@
<ng-container *ngIf="searchType === searchTypes.DISPLACEMENT">
<button
class="spacing nav-icon-buttons" color="basic" mat-button>
<mat-icon class="large-icon">
description
</mat-icon>
<div class="text-under faint-text">{{ language.getName()}}</div>

<app-docs-modal class="icon-description"
matTooltip="{{ 'DATASET_INFO' | translate }}"
description="description"
url="https://asf.alaska.edu/datasets/daac/opera/">
</app-docs-modal>
<div class="text-under faint-text">{{ 'INFO' | translate }}</div>
</button>
</ng-container>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
display: flex;
flex-direction: column;
height: 100%;
}

}
30 changes: 16 additions & 14 deletions src/app/components/header/header-buttons/header-buttons.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { CustomizeEnvComponent } from './customize-env/customize-env.component';
import { OnlynumberDirective } from '@directives/onlynumber.directive';
import { SharedModule } from '@shared';
import { LanguageSelectorModule } from "@components/shared/selectors/language-selector/language-selector.module";
import {DocsModalModule} from '@components/shared/docs-modal';

@NgModule({
declarations: [
Expand All @@ -25,20 +26,21 @@ import { LanguageSelectorModule } from "@components/shared/selectors/language-se
CustomizeEnvComponent,
OnlynumberDirective
],
imports: [
CommonModule,
FormsModule,
MatBadgeModule,
MatMenuModule,
MatInputModule,
MatDialogModule,
MatSharedModule,
MatSelectModule,
DatasetSelectorModule,
MatFormFieldModule,
SharedModule,
LanguageSelectorModule,
],
imports: [
CommonModule,
FormsModule,
MatBadgeModule,
MatMenuModule,
MatInputModule,
MatDialogModule,
MatSharedModule,
MatSelectModule,
DatasetSelectorModule,
MatFormFieldModule,
SharedModule,
LanguageSelectorModule,
DocsModalModule,
],
exports: [ HeaderButtonsComponent ]
})
export class HeaderButtonsModule { }
13 changes: 10 additions & 3 deletions src/app/components/shared/docs-modal/docs-modal.component.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<ng-container *ngIf="text; else elseBlock">
<ng-container *ngIf="text">
<a (click)="showDoc()" class="link-pointer text-link">
{{ text }}
</a>
</ng-container>
<ng-template #elseBlock>
<ng-container *ngIf="description">
<a (click)="showDoc()" class="link-pointer" [matTooltip]="this.tooltip ?? ('DATASET_INFO' | translate)">
<mat-icon class="material-symbols-outlined large-icon">description</mat-icon>
</a>
</ng-container>
<ng-container *ngIf="!description && !text">
<a (click)="showDoc()" class="link-pointer" matTooltip="{{this.tooltip ?? 'OPEN_LINK_TO_DOCUMENTATION' | translate}}">
<mat-icon class="icon-size">{{ icon }}</mat-icon>
</a>
</ng-template>
</ng-container>


10 changes: 10 additions & 0 deletions src/app/components/shared/docs-modal/docs-modal.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,14 @@
color: themed('blue-link');
}
text-decoration: underline;

}

.large-icon {
@include md-icon-size(30px);
min-height: 30px;
margin-right: 0;
@include themify($themes) {
color: themed('dark-primary-text');
}
}
2 changes: 2 additions & 0 deletions src/app/components/shared/docs-modal/docs-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class DocsModalComponent implements OnInit, OnDestroy {
@Input() url: string;
@Input() text: string;
@Input() icon: string = 'read_more';
@Input() description: string;
@Input() tooltip: string;

public docURL: string;
public safeDocURL: any;

Expand Down

0 comments on commit 9d67dca

Please sign in to comment.