Skip to content

Commit de0d7c1

Browse files
committed
Buttons fixed
1 parent a086cf4 commit de0d7c1

File tree

7 files changed

+36
-20
lines changed

7 files changed

+36
-20
lines changed

examples/questionnaire/Example.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
<!-- We've overriden the default "completeButton" slot content -->
3939
<template v-slot:completeButton>
40-
<div v-if="!submitted">
40+
<div class="f-submit" v-if="!submitted">
4141
<button
4242
class="o-btn-action"
4343
ref="button"
@@ -48,7 +48,10 @@
4848
>
4949
<span>{{ language.submitText }}</span>
5050
</button>
51-
<span class="f-enter-desc">{{ language.pressEnter }}</span>
51+
<a class="f-enter-desc"
52+
href="#"
53+
v-on:click.prevent="onSendData()">
54+
{{ language.pressEnter }}</a>
5255
</div>
5356

5457
<p class="text-success" v-if="submitted">Submitted succesfully.</p>

examples/questionnaire/branding.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,14 @@ span.f-answered{
123123
opacity: .9;
124124
}
125125

126-
.o-btn-action:focus {
127-
border: 1px double white;
128-
outline: 1px solid black;
129-
}
130-
131126
/*footer*/
132127
.f-footer .footer-inner-wrap{
133128
background-color: rgba(255,255,255,0.75);
134129
}
135130

136131
@media screen and (max-width:479px) {
137132
.f-footer .footer-inner-wrap{
138-
background-color: rgba(0,0,0,0.05);
133+
background-color: rgba(180,180,180,0.15);
139134
}
140135

141136
}

examples/quiz/Example.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
<!-- We've overriden the default "completeButton" slot content -->
3737
<template v-slot:completeButton>
38-
<div v-if="!submitted">
38+
<div class="f-submit" v-if="!submitted">
3939
<button
4040
class="o-btn-action"
4141
ref="button"
@@ -45,7 +45,11 @@
4545
aria-label="Press to submit">
4646
<span>Calculate score</span>
4747
</button>
48-
<span class="f-enter-desc">{{ language.pressEnter }}</span>
48+
<a
49+
class="f-enter-desc"
50+
href="#"
51+
v-on:click.prevent="onQuizSubmit()">
52+
{{ language.pressEnter }}</a>
4953
</div>
5054
<p class="text-success" v-if="submitted && score < 4">"You scored {{ score }} out of {{ total }}. There's a lot of room for improvement."</p>
5155
<p class="text-success" v-else-if="submitted && score < 7">"You scored {{ score }} out of {{ total }}. Not bad at all!"</p>

examples/quiz/branding.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ span.f-answered{
144144
opacity: .9;
145145
}
146146

147-
.o-btn-action:focus {
148-
border: 1px double var(--bg-color);
149-
outline: 1px solid var(--button-color);
150-
}
151-
152147
/*footer*/
153148
.f-footer .footer-inner-wrap{
154149
background-color: var(--footer-color);

src/assets/css/common.css

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,17 @@ svg.logo {
144144
outline: 0;
145145
cursor: pointer;
146146
padding: 0 1.4rem 0;
147-
margin-bottom: 20px;
148147
text-align: center;
149148
display: inline-block;
150149
min-height: 44px;
150+
white-space: pre-wrap;
151+
max-width: 100%;
152+
margin-bottom: 20px;
151153
}
152154

153155
.o-btn-action {
154156
z-index: 1;
155157
line-height: 45px;
156-
height: 44px;
157158
font-weight: 900;
158159
text-transform: lowercase;
159160
}
@@ -166,9 +167,14 @@ svg.logo {
166167
}
167168

168169
.f-enter-desc {
170+
display: inline-block;
169171
margin-left: 0.6rem;
170172
}
171173

174+
.f-enter {
175+
margin-bottom: 20px;
176+
}
177+
172178
/*v-form*/
173179
.v-form {
174180
margin-top: 26vh;
@@ -544,6 +550,10 @@ a.f-disabled {
544550
max-width: 760px;
545551
}
546552

553+
f.submit {
554+
margin-bottom: 20px;
555+
}
556+
547557
/*
548558
media-start
549559
*/

src/components/FlowForm.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@
3939
v-bind:aria-label="language.ariaSubmitText">
4040
<span>{{ language.submitText }}</span>
4141
</button>
42-
<span class="f-enter-desc">{{ language.pressEnter }}</span>
42+
<a
43+
class="f-enter-desc"
44+
href="#"
45+
v-on:click.prevent="submit()"
46+
v-if="!submitted">
47+
{{ language.pressEnter }}</a>
4348
</slot>
4449
</div>
4550
</div>

src/components/Question.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</div>
5151
<p v-if="question.description" class="description">{{ question.description }}</p>
5252
</div>
53-
<div class="animate fade-in-up f-enter" v-if="showOkButton()">
53+
<div class="animate fade-in f-enter" v-if="showOkButton()">
5454
<button
5555
class="o-btn-action"
5656
type="button"
@@ -62,7 +62,11 @@
6262
<span v-if="question.type === QuestionType.SectionBreak">{{ language.continue }}</span>
6363
<span v-else>{{ language.ok }}</span>
6464
</button>
65-
<span class="f-enter-desc">{{ language.pressEnter }}</span>
65+
<a
66+
class="f-enter-desc"
67+
href="#"
68+
v-on:click.prevent="onEnter">
69+
{{ language.pressEnter }}</a>
6670
</div>
6771

6872
<div v-if="showInvalid()" class="f-invalid" role="alert" aria-live="assertive">{{ language.invalidPrompt }}</div>

0 commit comments

Comments
 (0)