Skip to content

Commit 4911a0c

Browse files
authored
Merge pull request #115 from ditdot-dev/links
Link styles, imported component in quiz example
2 parents 9c4a4d4 + 7a77568 commit 4911a0c

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

examples/quiz/Example.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
6969
// Import necessary components and classes
7070
import FlowForm from '../../src/components/FlowForm.vue'
71-
import QuestionModel, { QuestionType, ChoiceOption} from '../../src/models/QuestionModel'
71+
import QuestionModel, { QuestionType, ChoiceOption, LinkOption } from '../../src/models/QuestionModel'
7272
import LanguageModel from '../../src/models/LanguageModel'
7373
// If using the npm package, use the following line instead of the ones above.
7474
// import FlowForm, { QuestionModel, QuestionType, ChoiceOption, LanguageModel } from '@ditdot-dev/vue-flow-form'

src/assets/css/common.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,11 @@ span.f-answered{
334334
}
335335

336336
/*links*/
337-
338337
a.f-link,
339338
.field-submittype .section-wrap a {
340-
margin-right: 10px;
341339
color: inherit;
342-
border-bottom: 1px solid;
343-
white-space: pre-wrap;
340+
border-bottom: 1px dotted;
341+
word-break: break-word;
344342
}
345343

346344
a.f-link:hover,
@@ -442,11 +440,19 @@ span.f-text {
442440
margin-right: .6rem;
443441
}
444442

443+
/*description*/
445444
p.description {
446445
margin-top: 0;
447446
padding-right: 4rem;
448447
}
449448

449+
p.description span,
450+
p.description a.f-link {
451+
margin-right: 8px;
452+
}
453+
454+
455+
450456
/*f-radios (multiple-choice)*/
451457
ul.f-radios {
452458
margin: 0;

src/components/Question.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,14 @@
5050
</div>
5151
</div>
5252
<p v-if="question.description || question.descriptionLink" class="description">
53-
{{ question.description }}
53+
<span v-if="question.description">{{ question.description }}</span>
5454
<a
5555
v-for="(link, index) in question.descriptionLink"
5656
class="f-link"
5757
v-bind:key="'m' + index"
5858
v-bind:href="link.url"
5959
v-bind:target="link.target"
60-
>
61-
{{ link.text || link.url }}
62-
</a>
60+
>{{ link.text || link.url }}</a>
6361
</p>
6462

6563
</div>

0 commit comments

Comments
 (0)