Skip to content

Commit 4c5f46d

Browse files
committed
Tweak styling and Stepper
Signed-off-by: Olga Bulat <obulat@gmail.com>
1 parent 3103f0a commit 4c5f46d

File tree

5 files changed

+102
-27
lines changed

5 files changed

+102
-27
lines changed

src/components/SelectedLicenseInfo.vue

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@
2222
</li>
2323
</transition-group>
2424
</ul>
25-
<a href="https://creativecommons.org/freeworks">
26-
<div v-if="this.freeWorkStatus" class="license-freeworks-status">
27-
<img src="../assets/license-icons/fc_approved_small.png" alt="">
28-
<p>Free Culture License</p>
29-
</div>
30-
<div v-else class="license-freeworks-status">
31-
<img v-if="!this.freeWorkStatus" src="../assets/license-icons/fc_dubious.png" alt="">
32-
<p>Not a Free Culture License</p>
33-
</div>
34-
</a>
25+
<div class="freeworks-status__div">
26+
<a href="https://creativecommons.org/freeworks">
27+
<img v-if="this.freeWorkStatus" src="../assets/license-icons/fc_approved_small.png" alt="" />
28+
<img v-else src="../assets/license-icons/fc_dubious.png" />
29+
</a>
30+
</div>
31+
<p class="freeworks-status__p">
32+
<a href="https://creativecommons.org/freeworks">
33+
{{this.freeWorkStatusText}}</a>
34+
</p>
3535
</section>
3636

3737
</div>
@@ -53,6 +53,9 @@ export default {
5353
const short = this.$props.value.shortName.toLowerCase()
5454
return !(short.includes('nc') || short.includes('nd'))
5555
},
56+
freeWorkStatusText() {
57+
return this.freeWorkStatus ? this.$t('free-culture-work.yes') : this.$t('free-culture-work.no')
58+
},
5659
licenseDescription() {
5760
const descriptionString = `${this.$licenseSlug(this.selectedLicense)}-description`
5861
return this.$t(descriptionString)
@@ -99,16 +102,21 @@ export default {
99102
}
100103
101104
}
102-
div.license-freeworks-status{
105+
.freeworks-status__div{
103106
justify-content: center;
104107
text-align:center;
105108
img {
106109
width: 76px;
107110
height: 76px;
108111
}
109-
p {
110-
font-size: 13px;
111-
line-height: 19px; }
112+
}
113+
.freeworks-status__p {
114+
text-align:right;
115+
grid-row:2;
116+
grid-column: 1 / span 2;
117+
a {
118+
text-decoration: underline;
119+
}
112120
}
113121
}
114122
div {

src/components/SelectionStep.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export default {
6767
line-height: 26px;
6868
color: #333333;
6969
}
70+
.field {
71+
padding: 1rem;
72+
margin-bottom: 0;
73+
}
7074
.field.not-selected {
7175
opacity: 70%;
7276
}
@@ -75,8 +79,16 @@ export default {
7579
-webkit-transform: scale(0.98);
7680
-ms-transform: scale(.98);
7781
transform: scale(.98);
82+
border: 1px solid rgba(237,89,47, 0.5);
83+
border-radius: 5px;
7884
}
7985
.field:active {
8086
color: #ED592F;
8187
}
88+
.step-content {
89+
height: 285px;
90+
}
91+
.step-navigation {
92+
text-align: center;
93+
}
8294
</style>

src/components/Stepper.vue

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default {
113113
} else if (attrName === 'wv') {
114114
return 'exclamation-circle'
115115
} else if (attrName === 'ad') {
116-
return 'check'
116+
return 'user-circle'
117117
} else {
118118
return `creative-commons-${attrName.toLowerCase()}`
119119
}
@@ -155,7 +155,7 @@ export default {
155155
if (this.$props.value.shortName.includes('CC0')) {
156156
return 'is-step-selected'
157157
}
158-
if (attrName === 'wv' || attrName === 'ad' || !this.$props.value.shortName.includes(attrName)) {
158+
if (!this.$props.value.shortName.includes(attrName)) {
159159
return 'is-step-not_selected'
160160
} else { return 'is-step-selected' }
161161
},
@@ -182,16 +182,15 @@ export default {
182182
.card {
183183
height: 580px;
184184
}
185-
div#stepper .card-header {
185+
#stepper .card-header {
186186
border-top: 10px solid #05B5DA;
187187
background-color: #05B5DA;
188188
padding-bottom: 1rem;
189189
box-shadow: none;
190190
color:white;
191191
}
192192
.steps {
193-
margin-top: 2.5rem;
194-
margin-bottom: 1rem;
193+
margin: 1.5rem -2rem 1rem;
195194
}
196195
#stepper .b-steps .steps.is-small .step-items .step-item .step-details {
197196
padding-top: 0.4em;
@@ -204,6 +203,7 @@ export default {
204203
}
205204
nav.step-navigation {
206205
margin-top: 0;
206+
text-align:center;
207207
}
208208
.steps.is-small .icon svg {
209209
font-size: 2rem!important;
@@ -254,9 +254,48 @@ export default {
254254
border-color: #04a635;
255255
color: #04a635;
256256
}
257-
.is-active .icon svg {
258-
width: 2rem;
259-
height: 2rem;
257+
.is-step-selected .icon svg {
258+
font-size:2rem!important;
259+
width: 2rem!important;
260+
height: 2rem!important;
261+
}
262+
.is-step-selected .step-marker{
263+
width: 2.5rem!important;
264+
height:2.5rem!important;
265+
left: 50%!important;
266+
top: -17%;
267+
margin-left: -1.25rem!important;
268+
}
269+
.pagination-next {
270+
width: 200px;
271+
background-color: #04A635;
272+
color:white;
273+
}
274+
.pagination-next span {
275+
margin-left: auto;
276+
}
277+
.pagination-next:after {
278+
content:"Go to the next step";
279+
color: white;
280+
position: absolute;
281+
top: 3.5px;
282+
left: 0;
283+
right: 0;
284+
bottom: 0;
285+
}
286+
.pagination-previous {
287+
width: 200px;
288+
}
289+
.pagination-previous span {
290+
margin-right: auto;
291+
}
292+
.pagination-previous:after {
293+
content: "Change previous step";
294+
position: absolute;
295+
top: 3.5px;
296+
left: 0;
297+
right: 0;
298+
bottom: 0;
260299
}
261300
@media only screen and (max-width: 670px) {
262301
div.card {
@@ -265,5 +304,12 @@ export default {
265304
section.step-content {
266305
height: auto;
267306
}
307+
308+
}
309+
@media only screen and (max-width: 900px) {
310+
.step-title {
311+
white-space: normal;
312+
line-height: 1;
313+
}
268314
}
269315
</style>

src/locales/en.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
4040
"selected-license-instructions": "If you already know which license you need, just select it in the dropdown below.",
4141
"use-license-heading": "Use your license",
4242
"license-description": {
43-
"common": "allows others to share, distribute, remix, adapt, and build upon your work, provided that: ",
44-
"cc0": "Public Domain",
43+
"common": "allows others to share, distribute, remix, adapt, and build upon your work",
44+
"non-cc0": ", provided that:",
45+
"zero": "without restrictions (Public Domain)",
4546
"by": "the creator is credited",
4647
"nc": "the use is non-commercial",
4748
"nd": "only the original work is shared",
@@ -59,5 +60,13 @@
5960
},
6061
"this-work": "This work",
6162
"license-text": "{workTitle} {byLine} is licensed under ",
62-
"this-work": "This work"
63+
"step-navigation" : {
64+
"previous": "Change earlier step" ,
65+
"next": ""
66+
},
67+
"use-license-hint": "Learn more about how to use your license",
68+
"free-culture-work": {
69+
"yes": "Free Culture License",
70+
"no": "Not a Free Culture License"
71+
}
6372
}

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { library } from '@fortawesome/fontawesome-svg-core'
66
// internal icons
77
import {
88
faCheck, faCheckCircle, faInfoCircle, faExclamationTriangle, faExclamationCircle,
9-
faArrowUp, faAngleRight, faAngleLeft, faAngleDown,
9+
faArrowUp, faAngleRight, faAngleLeft, faAngleDown, faUserCircle, faQuestionCircle,
1010
faEye, faEyeSlash, faCaretDown, faCaretUp, faUpload, faCopy
1111
} from '@fortawesome/free-solid-svg-icons'
1212
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
1313
import LicenseUtilities from './utils/license-utilities'
1414

1515
library.add(faCheck, faCheckCircle, faInfoCircle, faExclamationTriangle, faExclamationCircle,
16-
faArrowUp, faAngleRight, faAngleLeft, faAngleDown,
16+
faArrowUp, faAngleRight, faAngleLeft, faAngleDown, faUserCircle, faQuestionCircle,
1717
faEye, faEyeSlash, faCaretDown, faCaretUp, faUpload, faCopy)
1818
Vue.component('vue-fontawesome', FontAwesomeIcon)
1919
Vue.config.productionTip = false

0 commit comments

Comments
 (0)