Skip to content

Commit 0271c55

Browse files
authored
Merge pull request #147 from SoftStackFactory/132-timeline-styling
132 timeline styling
2 parents 494ca27 + dbea209 commit 0271c55

4 files changed

Lines changed: 57 additions & 128 deletions

File tree

src/assets/imgs/blueline.png

275 Bytes
Loading
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
<!-- Generated template for the TimelineComponent component -->
2+
23
<div class="timeline">
34

4-
<ion-list>
5+
<ion-list class="border-thingy">
56
<ng-template #recursiveList let-list>
6-
<!-- <div class="cd-timeline__img cd-timeline__img--5"></div> -->
77
<ion-list *ngFor="let item of list">
88

9-
<h2 *ngIf="!item.checkmark" (click)="toggleItem(item)">{{item.title}} </h2>
10-
11-
<ion-item *ngIf="item.checkmark">
9+
<ion-item *ngIf="!item.checkmark" (click)="toggleItem(item)" no-padding>
10+
<div *ngIf="item.dot" class="cd-timeline__img cd-timeline__img--5"></div>
11+
<h2>{{item.title}}</h2>
12+
</ion-item>
13+
14+
<ion-item *ngIf="item.checkmark" no-padding>
1215
<ion-label>{{item.title}}</ion-label>
1316
<ion-checkbox color="dark" checked="false"></ion-checkbox>
1417
</ion-item>
1518

1619
<ion-item *ngIf="item.itemExpand && item.children.length > 0 && !item.checkmark">
1720
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
1821
</ion-item>
19-
<!-- <ion-item *ngIf="item.checkmark">
20-
<ion-checkbox color="dark" checked="false"></ion-checkbox>
21-
</ion-item> -->
22+
2223
</ion-list>
2324
</ng-template>
2425
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: list }"></ng-container>
2526
</ion-list>
2627

27-
<!-- <ng-content></ng-content>
28-
29-
<timeline-item>
30-
<ion-icon class="" [name]="endIcon"></ion-icon>
31-
</timeline-item> -->
32-
3328
</div>

src/components/timeline/timeline.scss

Lines changed: 38 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,43 @@ timeline {
1515
position: absolute;
1616
top: 0;
1717
left: 0;
18-
width: 40px;
19-
height: 40px;
18+
width: 25px;
19+
height: 25px;
20+
z-index: 1000;
2021
border-radius: 50%;
21-
-webkit-box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
22-
box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
22+
// -webkit-box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
23+
// box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
2324
}
2425

25-
.cd-timeline__img img {
26-
display: block;
27-
width: 24px;
28-
height: 24px;
29-
position: relative;
30-
left: 50%;
31-
top: 50%;
32-
margin-left: -12px;
33-
margin-top: -12px;
34-
}
3526

3627
.cd-timeline__img.cd-timeline__img--5 {
3728
background: #64c5b1;
3829
}
3930

31+
.item-ios h2:last-child, .item-ios h3:last-child, .item-ios h4:last-child, .item-ios h5:last-child, .item-ios h6:last-child, .item-ios p:last-child {
32+
padding-left: 3%;
33+
}
34+
35+
.item-ios{
36+
background-color: transparent !important;
37+
padding-left: 10px !important;
38+
}
39+
40+
.item-checkbox {
41+
margin-left: 10%;
42+
}
43+
44+
.border-thingy {
45+
padding-left: 5%;
46+
}
4047
.timeline {
41-
margin: 30px 0 0 0;
48+
margin-top: 30px;
4249
padding: 0;
4350
position: relative;
51+
background-image: url('../assets/imgs/blueline.png');
52+
background-repeat: repeat-y;
53+
background-position: 6.2% top;
4454

45-
&:before {
46-
content: '';
47-
position: absolute;
48-
top: 0;
49-
bottom: 0;
50-
width: 10px;
51-
background: #afdcf8;
52-
left: 20%;
53-
margin-left: -10px;
54-
}
5555
timeline-item {
5656
position: relative;
5757
display: inline-block;
@@ -114,27 +114,23 @@ timeline {
114114
}
115115
}
116116

117+
@media screen and (min-width:1024px){
118+
background-position: 5.89% top;
119+
}
117120

118-
.list-ios > .item-block:last-child, .list-ios > .item-wrapper:last-child .item-block{
119-
border-bottom: none;
121+
@media screen and (min-width:1360px){
122+
background-position: 5.7% top;
120123
}
121124

122-
.list-ios > .item-block:first-child {
123-
border-top: none;
125+
.list-ios, .item-block, .item-inner {
126+
border-bottom: none !important;
127+
border-top: none !important;
124128
}
125129

126130
.list-ios {
127-
margin: -1px 0 20px !important;
131+
margin: -1px 0 15px !important;
128132
}
129133

130-
131-
132-
&:before {
133-
left: 3% !important;
134-
}
135-
.list, .list-md{
136-
margin-left:3% !important;
137-
}
138134

139135
.item.item-md .checkbox-md {
140136
margin: -6px 14px 8px -35px !important;
@@ -143,83 +139,16 @@ timeline {
143139
}
144140

145141
.checkbox-ios {
146-
// position: absolute !important;
147142
margin: -6px 14px 8px -35px !important;
148143
padding-left: 4%;
149144
padding-top: 2%;
150145
}
151-
152146

153-
@media screen and (max-width: map-get($grid-breakpoints,'lg')){
154-
.list-ios{
155-
margin-top: -1px;
156-
margin-right: 25px;
157-
margin-bottom: 32px;
158-
margin-left: 25px;
159-
}
160-
timeline-item{
161-
timeline-time{
162-
font-size: 0.7em;
163-
}
164-
}
147+
.item-ios h2:last-child, .item-ios h3:last-child, .item-ios h4:last-child, .item-ios h5:last-child, .item-ios h6:last-child, .item-ios p:last-child {
148+
padding-left: 6% !important;
165149
}
166-
@media screen and (max-width: map-get($grid-breakpoints,'md')){
167-
&:before{
168-
left: 30px;
169-
}
170-
timeline-item{
171-
ion-card{
172-
margin-left: 80px !important;
173-
}
174-
ion-icon{
175-
left: 30px;
176-
}
177-
timeline-time{
178-
font-size: 0.8em;
179-
width: 100%;
180-
left: 80px;
181-
position: relative;
182-
span{
183-
text-align: left;
184-
}
150+
185151

186-
}
187-
}
188-
}
189-
@media screen and (max-width: map-get($grid-breakpoints, 'sm' )){
190-
&:before{
191-
display: none;
192-
}
193-
timeline-item{
194-
&:last-child{
195-
visibility: hidden;
196-
}
197-
ion-icon{
198-
position: relative;
199-
float: right;
200-
left: auto;
201-
margin: -55px 5px 0 0;
202-
&:after{
203-
border-left-color: transparent;
204-
border-top-color: #afdcf8;
205-
top: 46px;
206-
left: 10px;
207-
}
208-
}
209-
timeline-time{
210-
width: 100%;
211-
position: relative;
212-
padding: 0 0 20px 0;
213-
left: 20px;
214-
span{
215-
text-align: left;
216-
}
217-
}
218152

219-
ion-card{
220-
width: calc(100% - 20px) !important;
221-
margin-left: 10px !important;
222-
}
223-
}
224-
}
153+
225154
}

src/components/timeline/timeline.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ export class TimelineComponent {
5858
]
5959
}
6060
],
61-
itemExpand: false
61+
itemExpand: false,
62+
dot: true
6263
},
6364
{
6465
title: 'Starting Up',
@@ -102,25 +103,29 @@ export class TimelineComponent {
102103
]
103104
}
104105
],
105-
itemExpand: false
106+
itemExpand: false,
107+
dot: true
106108
},
107109
{
108110
title: 'Taking care of myself',
109111
checkmark: false,
110112
children: [],
111-
itemExpand: false
113+
itemExpand: false,
114+
dot: true
112115
},
113116
{
114117
title: 'Reinventing myself',
115118
checkmark: false,
116119
children: [],
117-
itemExpand: false
120+
itemExpand: false,
121+
dot: true
118122
},
119123
{
120124
title: 'Putting down roots',
121125
checkmark: false,
122126
children: [],
123-
itemExpand: false
127+
itemExpand: false,
128+
dot: true
124129
}
125130
];
126131

0 commit comments

Comments
 (0)