-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2318 from vishnubansaltarento/nps-changes-for-build
Nps changes for build
- Loading branch information
Showing
66 changed files
with
1,846 additions
and
368 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...c/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<div class="tips-container" *ngIf="randomlearnAdvisoryObj"> | ||
<div class="circle-box"> | ||
<div class="background-circle"> | ||
|
||
</div> | ||
</div> | ||
<div class="tips-header"> | ||
<h3>Tips for Learners</h3> | ||
<div class="ml-4 pl-2 view-more ws-mat-default-text ng-star-inserted"> | ||
<a class="flex ws-mat-default-text items-center justify-center mat-body-1 cursor-pointer" | ||
(click)="showAllTips()"> | ||
<span class="ws-mat-default-text">{{ 'msg.showAll' | translate }}</span> | ||
<mat-icon class="ws-mat-default-text" color="accent" role="img" | ||
aria-hidden="true">navigate_next</mat-icon> | ||
</a> | ||
</div> | ||
</div> | ||
<div class="tip-content"> | ||
<div class="background"> | ||
<img class="book-icon" src="{{randomlearnAdvisoryObj?.contentImg}}" | ||
alt="{{randomlearnAdvisoryObj?.content}}"> | ||
</div> | ||
<div class="tip-data"> | ||
<p>{{randomlearnAdvisoryObj?.content}}</p> | ||
</div> | ||
<div class="tip-count"> | ||
{{randomlearnAdvisoryObj?.id}}/{{learnAdvisoryData?.length}} | ||
</div> | ||
</div> | ||
</div> |
128 changes: 128 additions & 0 deletions
128
...c/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
.tips-container { | ||
background-color: #F9CB97; | ||
padding: 16px; | ||
padding-bottom: 0px; | ||
border-radius: 8px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
margin-bottom: 1rem; | ||
overflow: hidden; | ||
width: 385px; | ||
box-sizing: border-box; | ||
|
||
|
||
} | ||
|
||
@media screen and (max-width: 1000px) { | ||
.tips-container { | ||
width: 100%; | ||
|
||
} | ||
} | ||
|
||
.tips-header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 8px; | ||
z-index: 10; | ||
} | ||
|
||
.tips-header h3 { | ||
margin: 0; | ||
font-size: 1.2em; | ||
color: #000000; | ||
font-family: Montserrat; | ||
font-size: 16px; | ||
z-index: 10; | ||
} | ||
|
||
.tips-header button { | ||
background: none; | ||
border: none; | ||
color: #01468f; | ||
cursor: pointer; | ||
font-family: Lato; | ||
font-size: 14px; | ||
z-index: 10; | ||
} | ||
|
||
.tip-content { | ||
display: flex; | ||
justify-content: space-between; | ||
z-index: 10; | ||
padding-top: 6px; | ||
margin-bottom: 8px; | ||
} | ||
|
||
.tip-content p { | ||
margin-left: 8px; | ||
color: #000000; | ||
font-family: Lato; | ||
font-size: 14px; | ||
z-index: 10; | ||
padding: 0px 4px; | ||
line-height: 16px; | ||
} | ||
|
||
.tip-count { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
color: #000000; | ||
font-family: Montserrat !important; | ||
font-size: 16px !important; | ||
padding: 10px 3px; | ||
z-index: 10; | ||
font-weight: 600; | ||
line-height: 19.5px; | ||
width: 45px; | ||
} | ||
|
||
.tip-data { | ||
width: calc(100% - 110px); | ||
} | ||
|
||
|
||
.background-circle { | ||
position: absolute; | ||
z-index: 1; | ||
right: -6.5em; | ||
top: 2.8em; | ||
width: 178px; | ||
height: 178px; | ||
border-radius: 100%; | ||
background-color: #fcd2a3; | ||
} | ||
|
||
.circle-box { | ||
position: relative; | ||
width: 100%; | ||
height: 0px; | ||
} | ||
|
||
.book-icon { | ||
width: 32px; | ||
height: 32px; | ||
padding: 5px; | ||
} | ||
|
||
.background { | ||
background-color: white; | ||
width: 56px; | ||
height: 42px; | ||
border-radius: 5px; | ||
text-align: center; | ||
} | ||
.view-more { | ||
display: flex; | ||
align-items: center; | ||
text-align: center; | ||
height: 40px; | ||
justify-content: center; | ||
} | ||
|
||
.view-more:hover { | ||
background-color: #DCDFE5; | ||
} |
25 changes: 25 additions & 0 deletions
25
...ib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TipsForLearnerCardComponent } from './tips-for-learner-card.component'; | ||
|
||
describe('TipsForLearnerCardComponent', () => { | ||
let component: TipsForLearnerCardComponent; | ||
let fixture: ComponentFixture<TipsForLearnerCardComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ TipsForLearnerCardComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TipsForLearnerCardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
...src/lib/_common/tips-for-learner/tips-for-learner-card/tips-for-learner-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Component, Input, OnInit } from '@angular/core' | ||
import { Router } from '@angular/router' | ||
|
||
@Component({ | ||
selector: 'ws-widget-tips-for-learner-card', | ||
templateUrl: './tips-for-learner-card.component.html', | ||
styleUrls: ['./tips-for-learner-card.component.scss'], | ||
}) | ||
export class TipsForLearnerCardComponent implements OnInit { | ||
randomlearnAdvisoryObj: any | ||
learnAdvisoryDataLength: any | ||
@Input() learnAdvisoryData: any | ||
constructor(private router: Router) { } | ||
|
||
ngOnInit() { | ||
this.displayRandomlearnAdvisoryData() | ||
} | ||
|
||
displayRandomlearnAdvisoryData(): void { | ||
if (this.learnAdvisoryData && this.learnAdvisoryData.length) { | ||
const randomIndex = Math.floor(Math.random() * this.learnAdvisoryData.length) | ||
this.randomlearnAdvisoryObj = this.learnAdvisoryData[randomIndex] | ||
} | ||
|
||
} | ||
|
||
showAllTips() { | ||
this.router.navigate(['/learner-advisory']) | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
library/ws-widget/collection/src/lib/_common/tips-for-learner/tips-for-learner.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NgModule } from '@angular/core' | ||
import { CommonModule } from '@angular/common' | ||
import { TipsForLearnerCardComponent } from './tips-for-learner-card/tips-for-learner-card.component' | ||
import { MatIconModule } from '@angular/material' | ||
import { TranslateModule } from '@ngx-translate/core' | ||
|
||
@NgModule({ | ||
declarations: [TipsForLearnerCardComponent], | ||
imports: [ | ||
CommonModule, | ||
MatIconModule, | ||
TranslateModule, | ||
], | ||
exports: [ | ||
TipsForLearnerCardComponent, | ||
], | ||
}) | ||
export class TipsForLearnerModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.