Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
329 changes: 281 additions & 48 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"buefy": "^0.9.4",
"clipboard": "^2.0.6",
"core-js": "^3.6.5",
"markdown-it": "^12.0.3",
"vue": "^2.6.10",
"vue-analytics": "^5.22.1",
"vue-hotjar": "^1.2.0",
Expand Down
8 changes: 5 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
<LocaleChooser class="locale-chooser" />
</div>
<div class="columns">
<Stepper v-model="currentStepId" />
<div class="column">
<Stepper v-model="currentStepId" />
<help-section />
</div>
<div class="column">
<div class="fixed-right-column">
<LicenseDetailsCard
Expand All @@ -41,7 +44,6 @@
<LicenseUseCard
v-if="showLicenseUse"
/>
<HelpSection />
</div>
</div>
</div>
Expand Down Expand Up @@ -88,7 +90,7 @@ export default {
if (process.env.NODE_ENV === 'production') {
this.$ga.page('/')
}
this.$store.subscribe((mutation, state) => {
this.$store.subscribe((mutation) => {
if (mutation.type === 'updateAttributesFromShort' || mutation.type === 'setSelected') {
this.showLicense = true
}
Expand Down
614 changes: 291 additions & 323 deletions src/components/HelpSection.vue

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/LicenseDetailsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default {
},
cardHeading() {
return this.shortName === LICENSES.CC0.SHORT
? this.$t('license-details-card.cc0-heading')
? this.$t('license-details-card.heading-cc0')
: this.$t('license-details-card.heading')
}

Expand Down
41 changes: 41 additions & 0 deletions src/components/MdText.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<script>
import MarkdownIt from 'markdown-it'

export default {
name: 'MdText',
props: {
source: {
type: String,
required: true
},
tag: {
type: String,
default: 'div'
}
},
data() {
return {
md: null
}
},
computed: {
content() {
const src = this.source
return this.md?.render(src)
}
},
created() {
this.md = new MarkdownIt()
},
destroyed() {
this.md = null
},
render(h) {
return h(this.tag, { domProps: { innerHTML: this.content } })
}
}
</script>

<style scoped>

</style>
5 changes: 2 additions & 3 deletions src/components/Stepper.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="stepper__container column">
<div class="stepper__container">
<div
v-for="(step, idx) in visibleSteps()"
:key="idx"
Expand Down Expand Up @@ -286,7 +286,6 @@ export default {
--step-left-padding: calc(var(--h-padding) + var(--counter-size) + 1rem);
&:last-of-type {
border-bottom: 2px solid #d8d8d8;
margin-bottom: 15rem;
}
}
.step-container.completed:not(.disabled):hover {
Expand Down Expand Up @@ -355,7 +354,7 @@ export default {
/*transform: scaleY(1);*/
}
}
@media (max-width: 860px) {
@media only screen and (max-width: 768px) {
.step-container:last-of-type {
margin-bottom: 1rem;
}
Expand Down
4 changes: 2 additions & 2 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import VueI18n from 'vue-i18n'
Vue.use(VueI18n)

function loadLocaleMessages() {
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.js$/i)
const messages = {}
locales.keys().forEach(key => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
messages[locale] = locales(key).messages
}
})
return messages
Expand Down
Loading