Skip to content

Commit aaafd9b

Browse files
committed
Merge branch 'master' of https://github.com/creativecommons/chooser into master
2 parents 11b58a4 + 21cde4b commit aaafd9b

File tree

12 files changed

+64
-90
lines changed

12 files changed

+64
-90
lines changed

src/components/AttributionDetailsStep.vue

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<template>
22
<div class="step-actions">
3-
<p class="attribution-details-instructions">
3+
<p class="body-normal">
44
{{ $t('stepper.AD.instructions') }}
55
</p>
66
<form class="attribution-details-form">
7-
<b-field :label="this.$t('stepper.AD.form.work-title.label')">
7+
<b-field :label="$t('stepper.AD.form.work-title.label')">
88
<b-input
99
v-model="workTitle"
10-
:placeholder="this.$t('stepper.AD.form.work-title.placeholder')"
10+
:placeholder="$t('stepper.AD.form.work-title.placeholder')"
1111
/>
1212
</b-field>
13-
<b-field :label="this.$t('stepper.AD.form.creator-name.label')">
13+
<b-field :label="$t('stepper.AD.form.creator-name.label')">
1414
<b-input
1515
v-model="creatorName"
16-
:placeholder="this.$t('stepper.AD.form.creator-name.placeholder')"
16+
:placeholder="$t('stepper.AD.form.creator-name.placeholder')"
1717
/>
1818
</b-field>
19-
<b-field :label="this.$t('stepper.AD.form.work-url.label')">
19+
<b-field :label="$t('stepper.AD.form.work-url.label')">
2020
<b-input
2121
v-model="workUrl"
22-
:placeholder="this.$t('stepper.AD.form.work-url.placeholder')"
22+
:placeholder="$t('stepper.AD.form.work-url.placeholder')"
2323
/>
2424
</b-field>
25-
<b-field :label="this.$t('stepper.AD.form.creator-profile.label')">
25+
<b-field :label="$t('stepper.AD.form.creator-profile.label')">
2626
<b-input
2727
v-model="creatorProfileUrl"
28-
:placeholder="this.$t('stepper.AD.form.creator-profile.placeholder')"
28+
:placeholder="$t('stepper.AD.form.creator-profile.placeholder')"
2929
/>
3030
</b-field>
3131
</form>
@@ -36,14 +36,7 @@ import { mapMutations, mapState } from 'vuex'
3636
3737
export default {
3838
name: 'AttributionDetails',
39-
props: {
40-
status: {
41-
type: String,
42-
validator(value) {
43-
return ['active', 'previous', 'inactive'].includes(value)
44-
}
45-
}
46-
},
39+
inheritAttrs: false,
4740
computed: {
4841
...mapState(['attributionDetails']),
4942
creatorName: {
@@ -100,11 +93,6 @@ export default {
10093
}
10194
}
10295
@media only screen and (max-width: 768px) {
103-
.attribution-details-instructions {
104-
font-size: 0.8125rem;
105-
line-height: 1.1875rem;
106-
font-weight: 600;
107-
}
10896
.attribution-details-form .label {
10997
font-style: normal;
11098
font-size: 0.8125rem;

src/components/ChooserStep.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@
2424
<script>
2525
export default {
2626
name: 'ChooserStep',
27+
inheritAttrs: false,
2728
props: {
2829
name: String,
2930
selected: Boolean,
3031
id: Number,
31-
status: {
32-
type: String,
33-
validator(value) {
34-
return ['active', 'previous', 'inactive'].includes(value)
35-
}
36-
},
3732
enabled: Boolean,
3833
disabledDue: String
3934
},

src/components/CopyrightWaiverStep.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{ $t('stepper.CW.copyright-waive-agreement') }}
55
</v-checkbox>
66
<textarea
7-
:value="this.$t('cc0-waiver.text')"
7+
:value="$t('cc0-waiver.text')"
88
:class="'waiver-textarea'"
99
/>
1010
<v-checkbox v-model="copyrightWaiverConfirmed">
@@ -15,16 +15,11 @@
1515
<script>
1616
export default {
1717
name: 'CopyrightWaiverStep',
18+
inheritAttrs: false,
1819
props: {
1920
id: Number,
2021
name: String,
21-
selected: Boolean,
22-
status: {
23-
type: String,
24-
validator(value) {
25-
return ['active', 'previous', 'inactive'].includes(value)
26-
}
27-
}
22+
selected: Boolean
2823
},
2924
data() {
3025
return {

src/components/DropdownStep.vue

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="step-actions">
33
<b-field class="license-dropdown">
44
<b-select
5-
:placeholder="this.$t('stepper.DD.placeholder')"
5+
:placeholder="$t('stepper.DD.placeholder')"
66
:value="shortName"
77
@input="setCurrentLicense"
88
>
@@ -21,13 +21,8 @@
2121
import { mapGetters } from 'vuex'
2222
export default {
2323
name: 'DropdownStep',
24+
inheritAttrs: false,
2425
props: {
25-
status: {
26-
type: String,
27-
validator(value) {
28-
return ['active', 'previous', 'inactive'].includes(value)
29-
}
30-
},
3126
id: Number
3227
},
3328
data() {
@@ -66,11 +61,6 @@ export default {
6661
<style lang="scss">
6762
.license-dropdown {
6863
margin-top: 1rem;
69-
.label{
70-
font-weight: normal;
71-
opacity: 0.8;
72-
font-size: 1em;
73-
}
7464
.select, select {
7565
width: 100%;
7666
}
@@ -81,4 +71,9 @@ export default {
8171
}
8272
}
8373
}
74+
@media only screen and (max-width: 768px) {
75+
.license-dropdown {
76+
margin-top: 0;
77+
}
78+
}
8479
</style>

src/components/LicenseHTML.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<script>
1313
import { mapGetters, mapState } from 'vuex'
14-
import { generateHTML } from '../utils/license-utilities'
14+
import { generateHTML, LICENSES } from '../utils/license-utilities'
1515
1616
export default {
1717
name: 'LicenseHTML',
@@ -24,10 +24,12 @@ export default {
2424
const { work, creator, license, paragraph } = generateHTML(this.attributionDetails, this.shortName, isFull)
2525
const licenseCodeSpan = this.$t('license-use.richtext.full-text', {
2626
workTitle: work || this.$t('license-use.richtext.workTitle'),
27-
creator,
28-
license,
27+
creator: creator,
28+
license: license,
2929
by: creator ? this.$t('license-use.richtext.by') : '',
30-
'licensed-text': this.$t('license-use.richtext.licensed-text')
30+
'licenseMark': this.shortName === LICENSES.CC0.SHORT
31+
? this.$t('license-use.richtext.marked-text')
32+
: this.$t('license-use.richtext.licensed-text')
3133
})
3234
return `${paragraph}${licenseCodeSpan}</p>`
3335
}

src/components/StepHeader.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ export default {
136136
}
137137
}
138138
.step-header__caption {
139-
font-size: 0.8125rem;
140-
line-height: 1.1875rem;
141-
font-weight: 600;
139+
font-size: 1rem;
140+
line-height: 1.5rem;
141+
font-weight: 400;
142142
}
143143
.step-header {
144144
padding-top: 1rem;

src/components/StepNavigation.vue

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</v-button>
1010
<v-button
1111
v-if="stepName!=='AD'"
12-
:class="['is-success', 'next-button', { 'disabled' : isNextEnabled } ]"
12+
:class="['is-success', 'next-button', { 'disabled' : !isNextEnabled } ]"
1313
:disabled="!isNextEnabled"
1414
@click="handleNavigation('next')"
1515
>
@@ -60,7 +60,8 @@ export default {
6060
}
6161
</script>
6262

63-
<style lang="scss" scoped>
63+
<style lang="scss">
64+
@import '~@creativecommons/vocabulary/scss/color';
6465
.step-navigation {
6566
display: flex;
6667
flex-direction: row;
@@ -72,15 +73,20 @@ export default {
7273
}
7374
.button.restart-button {
7475
margin-left: auto;
75-
color: #008000;
76+
color: $color-forest-green;
7677
}
7778
.button.next-button.is-success {
78-
background-color: #008000;
79+
background-color: $color-forest-green;
7980
color: white;
8081
&:hover, &:active, &:focus {
81-
background-color: #008B00;
82+
background-color: $color-brighter-forest-green;
8283
}
8384
}
8485
}
85-
86+
@media only screen and (max-width: 768px) {
87+
.step-navigation {
88+
padding-right: 0;
89+
padding-left: 0;
90+
}
91+
}
8692
</style>

src/components/Stepper.vue

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<template>
2-
<div
3-
ref="top"
4-
class="stepper__container"
5-
>
2+
<div class="stepper__container">
63
<div
74
v-for="(step, idx) in visibleSteps()"
85
:key="idx"
@@ -11,7 +8,6 @@
118
>
129
<step-header
1310
:step="step"
14-
v-bind="step"
1511
@activate="setActiveStep(step.id)"
1612
/>
1713
<div
@@ -21,19 +17,17 @@
2117
>
2218
<component
2319
:is="stepActionComponent(step)"
24-
v-if="step.status === 'active'"
2520
v-bind="stepActionProps(step)"
2621
@change="changeStepSelected"
2722
/>
23+
<StepNavigation
24+
:step-name="step.name"
25+
:is-next-enabled="isNextEnabled(step.id)"
26+
@navigate="navigate"
27+
@restart="restart"
28+
@done="done"
29+
/>
2830
</div>
29-
<StepNavigation
30-
v-if="step.status === 'active'"
31-
:step-name="step.name"
32-
:is-next-enabled="isNextEnabled(step.id)"
33-
@navigate="navigate"
34-
@restart="restart"
35-
@done="done"
36-
/>
3731
</div>
3832
</div>
3933
</template>
@@ -289,8 +283,6 @@ export default {
289283
cursor: pointer;
290284
}
291285
}
292-
.step-container.completed:not(.disabled):hover {
293-
}
294286
.step-container.completed:not(.disabled):hover + .step-container {
295287
border-top: none;
296288
}

src/locales/en.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ export const messages = {
152152
'copy-label': 'Copy',
153153
'copied-label': 'Copied!',
154154
richtext: {
155-
'full-text': '{workTitle} {by} {creator}{licenseMark} {license}{print-instructions}',
155+
'full-text': '{workTitle}{by}{creator}{licenseMark} {license}{print-instructions}',
156156
workTitle: 'This work',
157-
by: 'by',
158-
'licensed-text': 'is licensed under',
159-
'marked-text': 'is marked with',
157+
by: ' by ',
158+
'licensed-text': ' is licensed under',
159+
'marked-text': ' marked with',
160160
'print-instructions': '. To view a copy of this license, visit {linkToLicenseDeed}'
161161
},
162162
print: {

src/styles/vocab.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727

2828
}
2929
.body-normal {
30-
font-size: 0.8125rem;
30+
font-size: 1rem;
3131
font-style: normal;
32-
font-weight: 600;
33-
line-height: 1.1875rem;
32+
font-weight: 400;
33+
line-height: 1.5rem;
3434
letter-spacing: 0;
3535
text-align: left;
3636

0 commit comments

Comments
 (0)