-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c55fc91
commit b20a76a
Showing
9 changed files
with
166 additions
and
10 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
.../dashboard/components/experience/exp-mobile-timelines/exp-mobile-timelines.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,23 @@ | ||
<div class="timeline mx-auto p-0"> | ||
<div class="outer"> | ||
<div | ||
*ngFor="let experience of experienceData; let i = index" | ||
class="card relative max-w-[400px] px-4 py-6 md:px-6 md:py-8" | ||
[ngClass]="{'pl-8 pr-4': i % 2 === 0, 'pr-8 pl-4': i % 2 !== 0}"> | ||
<div class="info flex flex-col text-gray-500 rounded-md p-3"> | ||
<h3 class="title relative text-primary"> | ||
<span class="font-poppins font-semibold">{{ experience.company.name }}</span> | ||
<span class="text-xs">( {{ experience.timePeriod.startDate | date : 'MMM yyyy' }} )</span> | ||
</h3> | ||
<h3 class="relative text-foreground"> | ||
<span class="font-nunito font-normal">{{experience.job}}</span> | ||
</h3> | ||
<div | ||
class="description bg-transparent mb-4 text-gray-700 list-disc list-inside" | ||
[innerHTML]="getSanitizedDescription(experience.description)"> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</div> |
72 changes: 72 additions & 0 deletions
72
.../dashboard/components/experience/exp-mobile-timelines/exp-mobile-timelines.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,72 @@ | ||
.card::before { | ||
@apply border-primary; | ||
content: ""; | ||
position: absolute; | ||
width: 50%; | ||
animation: flow 3s linear infinite; | ||
} | ||
|
||
.title::before { | ||
content: ""; | ||
position: absolute; | ||
width: 10px; | ||
height: 10px; | ||
background: white; | ||
border-radius: 999px; | ||
border-width: 3px; | ||
@apply border-primary; | ||
} | ||
|
||
/* text right if the card is even */ | ||
.card:nth-child(even) > .info > .title { | ||
text-align: right; | ||
} | ||
|
||
/* setting dot to the left if the card is odd */ | ||
.card:nth-child(odd) > .info > .title::before { | ||
left: -45px; | ||
} | ||
|
||
/* setting dot to the right if the card is odd */ | ||
.card:nth-child(even) > .info > .title::before { | ||
right: -45px; | ||
} | ||
|
||
|
||
|
||
@keyframes flow { | ||
0% { | ||
background-position: 0% 0%; | ||
} | ||
100% { | ||
background-position: 0% 100%; | ||
} | ||
} | ||
|
||
.card::before { | ||
content: ""; | ||
position: absolute; | ||
width: 50%; | ||
animation: flow 3s linear infinite; | ||
} | ||
|
||
.card:nth-child(odd)::before { | ||
left: 0; | ||
top: -4.5px; | ||
bottom: -4.5px; | ||
border-width: 5px 0 5px 5px; | ||
border-radius: 50px 0 0 50px; | ||
} | ||
|
||
.card:nth-child(even)::before { | ||
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
border-width: 5px 5px 5px 0; | ||
border-radius: 0 50px 50px 0; | ||
} | ||
|
||
.card:first-child::before { | ||
border-top: 0; | ||
border-top-left-radius: 0; | ||
} |
23 changes: 23 additions & 0 deletions
23
...shboard/components/experience/exp-mobile-timelines/exp-mobile-timelines.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,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ExpMobileTimelinesComponent } from './exp-mobile-timelines.component'; | ||
|
||
describe('ExpMobileTimelinesComponent', () => { | ||
let component: ExpMobileTimelinesComponent; | ||
let fixture: ComponentFixture<ExpMobileTimelinesComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ExpMobileTimelinesComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ExpMobileTimelinesComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
...es/dashboard/components/experience/exp-mobile-timelines/exp-mobile-timelines.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,26 @@ | ||
import { Component} from '@angular/core'; | ||
|
||
import { EXPERIENCE } from '../../../pages/experience/data/experience'; | ||
import { ITimelineData } from 'src/app/core/models/experience.model'; | ||
import { CommonModule, DatePipe } from '@angular/common'; | ||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; | ||
|
||
@Component({ | ||
selector: 'tmr-exp-mobile-timelines', | ||
standalone: true, | ||
imports: [CommonModule, DatePipe], | ||
templateUrl: './exp-mobile-timelines.component.html', | ||
styleUrl: './exp-mobile-timelines.component.scss' | ||
}) | ||
export class ExpMobileTimelinesComponent{ | ||
experienceData: ITimelineData[] = EXPERIENCE; | ||
selectedIndex: number = 0; | ||
|
||
constructor(private sanitizer: DomSanitizer) {} | ||
|
||
|
||
getSanitizedDescription(description: string): SafeHtml { | ||
return this.sanitizer.bypassSecurityTrustHtml(description); | ||
} | ||
|
||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.