Skip to content

Commit 494d733

Browse files
committed
added timeline layout
1 parent 96d7280 commit 494d733

File tree

8 files changed

+111
-14
lines changed

8 files changed

+111
-14
lines changed

src/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { FooterComponent } from './components/footer/footer.component';
88

99
@NgModule({
1010
declarations: [
11-
AppComponent, FooterComponent
11+
AppComponent, FooterComponent
1212
],
1313
imports: [
1414
BrowserModule,

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
<home-timeline></home-timeline>
2+
13
<div class="home">
4+
25
<div class="header">
36
<div class="left">
47
NJ-Coder
@@ -11,6 +14,7 @@
1114
</div>
1215
</div>
1316
</div>
17+
1418
<div class="top-section">
1519
<div class="left hide-sm">
1620
<div class="outer-circle">
@@ -40,4 +44,6 @@
4044
</div>
4145
</div>
4246
</div>
47+
48+
4349
</div>

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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
$shadow-primary: #1e3c72;
2-
$shadow-secondary: #2a5298;
3-
41
.home {
52

63
.header {
@@ -13,7 +10,7 @@ $shadow-secondary: #2a5298;
1310
.left {
1411
padding: 1em 1em 1em 2em;
1512
text-align: left;
16-
background: $shadow-primary;
13+
background: var(--primary);
1714
flex-grow: 1;
1815
color: #fff;
1916
font-weight: bold;
@@ -41,14 +38,14 @@ $shadow-secondary: #2a5298;
4138
}
4239

4340
&:hover:not(.hire-me) {
44-
color: $shadow-secondary;
45-
border-bottom: 1px solid $shadow-secondary;
41+
color: var(--secondary);
42+
border-bottom: 1px solid var(--secondary);
4643
}
4744
}
4845

4946
.hire-me {
5047
color: #ffffff;
51-
background: linear-gradient(to right, $shadow-primary, $shadow-primary);
48+
background: linear-gradient(to right, var(--primary), var(--primary));
5249
padding: 2px 12px;
5350
border-radius: 12px;
5451
}
@@ -59,8 +56,8 @@ $shadow-secondary: #2a5298;
5956
height: 100vh;
6057
width: 100%;
6158
color: #fff;
62-
background: $shadow-secondary;
63-
background: linear-gradient(to right, $shadow-primary, $shadow-primary);
59+
background: var(--secondary);
60+
background: linear-gradient(to right, var(--primary), var(--primary));
6461
display: flex;
6562

6663

@@ -78,7 +75,7 @@ $shadow-secondary: #2a5298;
7875
width: 50vh;
7976
min-width: 50vh;
8077
border-radius: 50%;
81-
background: linear-gradient(to left, $shadow-primary, $shadow-primary);
78+
background: linear-gradient(to left, var(--primary), var(--primary));
8279
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
8380
border: 10px solid #ffffff;
8481
overflow: visible;
@@ -90,7 +87,7 @@ $shadow-secondary: #2a5298;
9087
.inner-circle {
9188
height: 50%;
9289
width: 50%;
93-
border: 15px solid $shadow-primary;
90+
border: 15px solid var(--primary);
9491
border-radius: 50%;
9592
background: url('../../../assets/images/dp.jpeg');
9693
background-size: cover;
@@ -131,14 +128,19 @@ $shadow-secondary: #2a5298;
131128
a {
132129
padding: .5em 1em;
133130
display: block;
134-
color: $shadow-primary;
131+
color: var(--primary);
135132
border-radius: 7px;
136133
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.23);
137134
margin-right: 1em;
138135

139136
&:last-child {
140137
margin: 0;
141138
}
139+
140+
&:hover {
141+
color: #fff;
142+
background: var(--primary);
143+
}
142144
}
143145
}
144146

src/app/pages/home/home.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
33
import { Routes, RouterModule } from '@angular/router';
44

55
import { HomeComponent } from './home.component';
6+
import { TimelineComponent } from './timeline/timeline.component';
67

78
const routes: Routes = [
89
{
@@ -13,7 +14,7 @@ const routes: Routes = [
1314

1415

1516
@NgModule({
16-
declarations: [HomeComponent],
17+
declarations: [HomeComponent, TimelineComponent],
1718
imports: [
1819
RouterModule.forChild(routes),
1920
CommonModule
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<div class="timeline">
2+
<div class="timeline-item-wrapper">
3+
<div class="timeline-item">
4+
<div class="item-head">
5+
header
6+
</div>
7+
<div class="item-content">
8+
content
9+
</div>
10+
</div>
11+
</div>
12+
</div>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.timeline {
2+
width: 80vw;
3+
margin: 2em auto;
4+
position: relative;
5+
6+
&::before {
7+
content: '';
8+
position: absolute;
9+
left: 50%;
10+
width: 1px;
11+
height: 100%;
12+
background: red;
13+
}
14+
15+
.timeline-item-wrapper {
16+
margin-bottom: 1em;
17+
18+
.timeline-item {
19+
box-sizing: border-box;
20+
padding: 1em;
21+
border-radius: 2px;
22+
max-width: calc(50% - 1em);
23+
border: 1px solid var(--app-grey);
24+
position: relative;
25+
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+
}
36+
37+
&.right {
38+
margin-left: auto;
39+
40+
&::after {
41+
right: auto;
42+
left: -10px;
43+
clip-path: polygon(0 50%, 100% 0, 100% 100%);
44+
}
45+
}
46+
47+
.item-head {
48+
border-bottom: 1px solid var(--app-grey);
49+
padding-bottom: 2px;
50+
font-size: 80%;
51+
color: #6a737c;
52+
}
53+
}
54+
}
55+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'home-timeline',
5+
templateUrl: './timeline.component.html',
6+
styleUrls: ['./timeline.component.scss']
7+
})
8+
export class TimelineComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

src/styles.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ body {
1313
display: none !important;
1414
}
1515
}
16+
17+
:root {
18+
--primary: #1e3c72;
19+
--secondary: #2a5298;
20+
--app-grey: #e4e6e8;
21+
}

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