Skip to content

Commit cb2dd77

Browse files
committed
updated timeline UI
1 parent 2c1b10d commit cb2dd77

File tree

5 files changed

+100
-31
lines changed

5 files changed

+100
-31
lines changed

src/app/pages/home/home.component.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<home-timeline></home-timeline>
2-
31
<div class="home">
42

53
<div class="header">
@@ -9,7 +7,7 @@
97
<div class="right hide-sm">
108
<div class="link-wrappeer">
119
<a href="#">TECHS</a>
12-
<a href="#">PORTFOLIO</a>
10+
<a href="#timeline">PORTFOLIO</a>
1311
<a href="#" class="hire-me">Hire Me</a>
1412
</div>
1513
</div>
@@ -45,5 +43,6 @@
4543
</div>
4644
</div>
4745

46+
<home-timeline></home-timeline>
4847

4948
</div>

src/app/pages/home/timeline/timeline.component.html

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
<div class="timeline">
1+
<div class="timeline" id="timeline">
22
<div class="timeline-item-wrapper">
3-
<div class="timeline-item">
3+
<div *ngFor="let item of timelineItems" class="timeline-item" [ngClass]="{'project': item.type == 'project',
4+
'education': item.type == 'education'}">
45
<div class="item-head">
5-
header
6+
<span [ngSwitch]="item.type">
7+
<span *ngSwitchCase="'education'">Education</span>
8+
<span *ngSwitchCase="'project'">Project</span>
9+
<span *ngSwitchDefault>Position</span>
10+
</span>
611
</div>
712
<div class="item-content">
8-
content
13+
content
14+
</div>
15+
<div class="side-el">
16+
<div class="arrow"></div>
17+
<div class="circle">
18+
<i class="fab fa-facebook-square"></i>
19+
</div>
920
</div>
1021
</div>
1122
</div>

src/app/pages/home/timeline/timeline.component.scss

Lines changed: 73 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
position: relative;
55

66
&::before {
7-
content: '';
7+
content: "";
88
position: absolute;
9+
top: 1em;
910
left: 50%;
1011
width: 1px;
11-
height: 100%;
12+
height: calc(100% - 4em);
1213
background: var(--app-grey);
1314
}
1415

@@ -18,42 +19,92 @@
1819
.timeline-item {
1920
box-sizing: border-box;
2021
padding: 1em;
22+
margin-bottom: 1em;
2123
border-radius: 2px;
22-
max-width: calc(50% - 1em);
24+
max-width: calc(50% - 2em);
2325
border: 1px solid var(--app-grey);
26+
border-top: 3px solid #FF8A65;
2427
position: relative;
2528

26-
&::after {
27-
content: '';
28-
position: absolute;
29-
right: -10px;
30-
top: 1em;
31-
width: 10px;
32-
height: 10px;
33-
background: blue;
34-
clip-path: polygon(100% 50%, 0 0, 0 100%);
35-
}
3629

37-
&.right {
38-
margin-left: auto;
30+
&.project {
31+
border-top-color: #ba68c8;
3932

40-
&::after {
41-
right: auto;
42-
left: -10px;
43-
clip-path: polygon(0 50%, 100% 0, 100% 100%);
33+
i {
34+
color: #ba68c8;
4435
}
4536
}
4637

47-
&.position {
48-
border-top: 2px solid red;
38+
&.education {
39+
border-top-color: #aed581;
40+
41+
i {
42+
color: #aed581;
43+
}
4944
}
5045

5146
.item-head {
5247
border-bottom: 1px solid var(--app-grey);
53-
padding-bottom: 2px;
48+
padding-bottom: 0.5em;
5449
font-size: 80%;
5550
color: #6a737c;
5651
}
52+
53+
.item-content {
54+
padding-top: 0.5em;
55+
}
56+
57+
.side-el {
58+
position: absolute;
59+
right: -100px;
60+
top: 1em;
61+
height: 10px;
62+
width: 100px;
63+
display: flex;
64+
align-items: center;
65+
66+
.arrow {
67+
width: 10px;
68+
height: 10px;
69+
background: var(--app-grey);
70+
clip-path: polygon(100% 50%, 0 0, 0 100%);
71+
}
72+
73+
.circle {
74+
width: 30px;
75+
height: 30px;
76+
background: #fff;
77+
border: 1px solid var(--app-grey);
78+
border-radius: 50%;
79+
margin-left: 0.5em;
80+
display: flex;
81+
align-items: center;
82+
justify-content: center;
83+
color: #FF8A65;
84+
}
85+
86+
}
87+
88+
&:nth-child(even) {
89+
margin-left: auto;
90+
91+
.side-el {
92+
right: auto;
93+
left: -50px;
94+
95+
.arrow {
96+
order: 1;
97+
right: auto;
98+
left: -10px;
99+
clip-path: polygon(0 50%, 100% 0, 100% 100%);
100+
}
101+
102+
.circle {
103+
margin-left: 0;
104+
margin-right: 0.5em;
105+
}
106+
}
107+
}
57108
}
58109
}
59110
}

src/app/pages/home/timeline/timeline.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ import { Component, OnInit } from '@angular/core';
66
styleUrls: ['./timeline.component.scss']
77
})
88
export class TimelineComponent implements OnInit {
9-
timelineItems = [{
109

10+
timelineItems = [{
11+
type: 'position'
12+
}, {
13+
type: 'project',
14+
subtype: 'opensource'
15+
}, {
16+
type: 'education'
1117
}];
18+
1219
constructor() { }
1320

1421
ngOnInit() {

src/styles.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ body {
1717
:root {
1818
--primary: #1e3c72;
1919
--secondary: #2a5298;
20-
--app-grey: #e4e6e8;
20+
--app-grey: #e0e0e0;
21+
--sm-breakpoint: 900px;
2122
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy