Skip to content

Commit ef877f2

Browse files
author
Di Wang
committed
finish wizard
1 parent bf03f41 commit ef877f2

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Material-design Dashboard
1212
4. ng serve -o (it will automatically open localhost:4200)
1313

1414
## Further Plan
15-
- [ ] Add Wizard Component
15+
- [x] Add Wizard Component
1616
- [ ] Responsive Sidebar
1717
- [ ] Consolidate form elements, like switch
1818

src/app/dashboard/component/wizard/wizard.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
color: #fff;
3636
top: -2px;
3737
left: -1vw;
38-
width: 35%;
38+
width: calc((100% - 260px) / 2);
3939
height: 114%;
4040
display: flex;
4141
justify-content: center;

src/app/dashboard/component/wizard/wizard.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="wizard-panel card">
66
<div class="wizard-header">
77
<h3 class="text-center">Build Your Profile</h3>
8-
<h5 class="text-center" style="margin-top: 5px">This information will let us know more about you.</h5>
8+
<h5 class="text-center" style="margin-top: 5px; padding: 0 20px;">This information will let us know more about you.</h5>
99
</div>
1010
<div class="wizard-navigation">
1111
<ul class="nav nav-pills">

src/app/dashboard/component/wizard/wizard.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ export class WizardComponent implements OnInit, AfterViewInit {
2020
$(window).resize(() => {
2121
const screenWidth = document.body.clientWidth;
2222
if (screenWidth > 990) {
23+
moveTab.style.width = 'calc((100% - 260px) / 2)';
2324
if (this.tabIndex === 1) {
2425
moveTab.style.left = '20vw';
2526
} else if (this.tabIndex === 2) {
26-
moveTab.style.left = '41vw';
27+
moveTab.style.left = '42vw';
2728
}
2829
} else {
30+
moveTab.style.width = '34%';
2931
if (this.tabIndex === 1) {
3032
moveTab.style.left = '30vw';
3133
} else if (this.tabIndex === 2) {
@@ -78,7 +80,7 @@ export class WizardComponent implements OnInit, AfterViewInit {
7880
moveTab.innerHTML = 'Account';
7981
}else if (this.tabIndex === 1) {
8082
this.tabIndex++;
81-
moveTab.style.left = screenWidth > 990 ? '41vw' : '61.5vw';
83+
moveTab.style.left = screenWidth > 990 ? '42vw' : '61.5vw';
8284
nextBtn.style.visibility = 'hidden';
8385
moveTab.innerHTML = 'Address';
8486
}

0 commit comments

Comments
 (0)