Skip to content

Commit cbcbc09

Browse files
authored
Merge pull request #2 from rakeshAlgo/is-helpful-task
is this helpful task completed
2 parents 62e7a77 + 7006264 commit cbcbc09

File tree

5 files changed

+56
-31
lines changed

5 files changed

+56
-31
lines changed

src/css/doc.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.doc h4,
99
.doc h5,
1010
.doc h6 {
11-
font-weight: var(--weight-medium);
11+
font-weight: var(--weight-semibold);
1212
letter-spacing: -0.025rem;
1313
line-height: 1.2;
1414
margin: 1.5rem 0 -0.25rem;
@@ -27,7 +27,7 @@
2727
}
2828

2929
.doc h2 {
30-
font-size: 1.875rem;
30+
font-size: 2rem;
3131
margin: 2.25rem 0 2.5rem;
3232
max-width: fit-content;
3333
/* NOTE used to restrict width of key line */

src/css/is-this-helpful.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
margin: 15px 0;
2222
}
2323

24-
.is-this-helpful-box .btn-row .helpfull-btn {
24+
.is-this-helpful-box .btn-row .helpful-btn {
2525
font-size: 0.875rem;
2626
line-height: 1.125rem;
2727
color: var(--color-brand-gray4);
2828
}
2929

30-
.is-this-helpful-box .btn-row .helpfull-btn:hover,
31-
.is-this-helpful-box .btn-row .helpfull-btn.active {
30+
.is-this-helpful-box .btn-row .helpful-btn:hover,
31+
.is-this-helpful-box .btn-row .helpful-btn.active {
3232
color: var(--color-brand-blue);
3333
text-decoration: none;
3434
}
@@ -44,7 +44,7 @@
4444
border-radius: 5px;
4545
border: 1px solid var(--color-brand-gray5);
4646
resize: vertical;
47-
font-size: 1rem;
47+
font-size: 0.875rem;
4848
color: var(--color-brand-gray4);
4949
font-family: "Source Sans Pro", sans-serif;
5050
}
@@ -98,6 +98,17 @@
9898
color: var(--color-brand-blue);
9999
}
100100

101+
.toc .any-feedback a {
102+
font-size: 0.875rem;
103+
line-height: 20px;
104+
text-decoration: none;
105+
color: var(--color-brand-blue);
106+
font-weight: var(--weight-normal);
107+
margin-bottom: 15px;
108+
display: inline-block;
109+
width: 100%;
110+
}
111+
101112
.is-this-helpful-box .action-btn-row .info-btn {
102113
font-size: 0.75rem;
103114
line-height: 0.75rem;

src/css/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,9 @@ main p {
117117
align-items: flex-start;
118118
}
119119
}
120+
121+
@media screen and (max-width: 767px) {
122+
.main {
123+
padding-bottom: 2rem;
124+
}
125+
}

src/js/06-page-rating.js

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,53 @@
1-
;(function () {
1+
;
2+
(function () {
23
'use strict'
3-
44
var dialogBox = document.getElementById('dialogBox')
55
var helpYesBtn = document.getElementById('yesBtn')
66
var helpNoBtn = document.getElementById('noBtn')
77
var skipBtnMsg = document.getElementById('skipBtnMsg')
88
var feedBackFormBox = document.getElementById('additionalFeedbackBox')
9-
var leaveAddtinalBox = document.getElementById('leaveAddtinalBox')
10-
var skipLeaveBtn = document.getElementById('skipLeaveBtn')
9+
// var leaveAddtinalBox = document.getElementById('leaveAddtinalBox')
10+
// var skipLeaveBtn = document.getElementById('skipLeaveBtn')
1111
var feedBackMsg = document.querySelector('.feed-back-msg')
1212
var submitBtn = document.querySelector('.submit-btn')
13-
var leaveYesBtn = document.querySelector('.yes-btn')
13+
// var leaveYesBtn = document.querySelector('.yes-btn')
1414
var feedbackInfoBtn = document.querySelector('.info-btn')
1515
var feedbackModal = document.querySelector('.feedback-modal')
1616
var closeModalPopup = document.querySelector('.close-popup')
17+
var anyFeedbackBtn = document.querySelector('.any-feedback-btn')
1718
// for config
1819
var yesBtnData = helpYesBtn.dataset
1920
var noBtnData = helpNoBtn.dataset
2021

2122
helpYesBtn.addEventListener('click', function (e) {
22-
dialogBox.style.display = 'block'
23+
// dialogBox.style.display = 'block'
2324
this.classList.add('active')
2425
helpNoBtn.classList.remove('active')
2526
console.log(yesBtnData, 16)
2627
})
2728
helpNoBtn.addEventListener('click', function (e) {
28-
dialogBox.style.display = 'block'
29+
// dialogBox.style.display = 'block'
2930
this.classList.add('active')
3031
helpYesBtn.classList.remove('active')
3132
console.log(noBtnData, 27)
3233
})
3334

34-
skipBtnMsg.addEventListener('click', function (e) {
35-
feedBackFormBox.style.display = 'none'
36-
leaveAddtinalBox.style.display = 'block'
37-
})
38-
skipLeaveBtn.addEventListener('click', function (e) {
39-
leaveAddtinalBox.style.display = 'none'
35+
anyFeedbackBtn.addEventListener('click', function (e) {
36+
e.preventDefault()
37+
dialogBox.style.display = 'block'
4038
feedBackFormBox.style.display = 'block'
39+
this.classList.add('active')
4140
})
4241

42+
skipBtnMsg.addEventListener('click', function (e) {
43+
dialogBox.style.display = 'none'
44+
feedBackMsg.value = ''
45+
})
46+
// skipLeaveBtn.addEventListener('click', function (e) {
47+
// leaveAddtinalBox.style.display = 'none'
48+
// feedBackFormBox.style.display = 'block'
49+
// })
50+
4351
feedBackMsg.addEventListener('keyup', function (e) {
4452
var textareaValue = this.value
4553

@@ -49,9 +57,6 @@
4957
submitBtn.classList.add('disabled')
5058
}
5159
})
52-
leaveYesBtn.addEventListener('click', function (e) {
53-
leaveAddtinalBox.style.display = 'none'
54-
})
5560
feedbackInfoBtn.addEventListener('click', function (e) {
5661
feedbackModal.classList.add('show')
5762
})

src/partials/toc.hbs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,40 @@
22
<div class="sidebar-box">
33
<div class="toc-menu"></div>
44
<div class="is-this-helpful-box">
5-
<h4> Is this page helpful ?</h4>
5+
<h4> Is this page helpful?</h4>
66
<div class="btn-row">
7-
<a href="#" class="like-btn helpfull-btn" id="yesBtn" data-page-rating="like" >
7+
<a href="#" class="like-btn helpful-btn" id="yesBtn" data-page-rating="like" >
88
<i class="far fa-thumbs-up"></i>
99
Yes
1010

1111
</a>
12-
<a href="#" class="dislike-btn helpfull-btn" id="noBtn" data-page-rating="dislike"> <i class="far fa-thumbs-down"></i> No</a>
12+
<a href="#" class="dislike-btn helpful-btn" id="noBtn" data-page-rating="dislike"> <i class="far fa-thumbs-down"></i> No</a>
13+
</div>
14+
<div class="any-feedback">
15+
<a href="#" class="btn any-feedback-btn">Leave Additional Feedback? </a>
1316
</div>
1417
<div class="dialog-box" id="dialogBox">
1518
<form>
16-
<div class="form-group " id="additionalFeedbackBox">
19+
<div class="form-group " id="additionalFeedbackBox">
1720
<textarea class="input-control feed-back-msg" rows="8" placeholder="Any Additonal Feedback?"></textarea>
18-
21+
1922
<div class="action-btn-row ">
2023
<a href="#" class="skip-btn" id="skipBtnMsg">Skip</a>
2124
<button class="submit-btn btn blue-btn disabled" > Submit </button>
2225
<a href="#" class="info-btn"><i class="fas fa-info-circle"></i></a>
2326
</div>
24-
27+
2528

2629
</div>
2730

28-
<div class="leave-addtional-box" id="leaveAddtinalBox">
31+
{{!-- <div class="leave-addtional-box" id="leaveAddtinalBox">
2932
<div class="text-msg"> <p>Leave Additional Feedback?</p> </div>
3033
<div class="action-btn-row leave-feedback-btn-row">
3134
<a href="#" class="skip-btn" id="skipLeaveBtn">Skip</a>
3235
<button class="yes-btn btn blue-btn"> Yes </button>
33-
36+
3437
</div>
35-
</div>
38+
</div> --}}
3639
</form>
3740

3841
</div>

0 commit comments

Comments
 (0)