This commit is contained in:
2020-12-21 12:49:41 +01:00
parent 2c5eaf5f97
commit ddfcf3570b
4 changed files with 10 additions and 6 deletions

View File

@@ -7,7 +7,8 @@
<span v-else class="inline absolute rounded-full h-4 w-4 bg-gray-500"></span>
</div>
<div class="leading-7">
<p class="text-base dark:text-dark-100 text-gray-800 leading-6">{{ formatDate(begin) }} - {{ formatDate(end) }} <span class="px-3">|</span> {{location}}</p>
<p v-if="isSameDate" class="text-base dark:text-dark-100 text-gray-800 leading-6">{{ formatDate(begin) }} <span class="px-3">|</span> {{location}}</p>
<p v-else class="text-base dark:text-dark-100 text-gray-800 leading-6">{{ formatDate(begin) }} - {{ formatDate(end) }} <span class="px-3">|</span> {{location}}</p>
<h1 class="text-2xl font-bold">{{ $t(title) }}</h1>
<h2 class="text-xl">{{ company }}</h2>
</div>
@@ -42,7 +43,10 @@ export default {
methods: {
formatDate(date) {
const dateFormat = date.split('-')
return date === 'Today' ? 'Today' : this.$t('month.' + dateFormat[0]) + " " + dateFormat[1]
return date === 'Today' ? this.$t('date.today') : this.$t('month.' + dateFormat[0]) + " " + dateFormat[1]
},
isSameDate() {
return this.begin === this.end
}
}
}

View File

@@ -42,7 +42,7 @@ export default {
methods: {
formatDate(date) {
const dateFormat = date.split('-')
return date === 'Today' ? 'Today' : this.$t('month.' + dateFormat[0]) + " " + dateFormat[1]
return date === 'Today' ? this.$t('date.today') : this.$t('month.' + dateFormat[0]) + " " + dateFormat[1]
}
}
}

View File

@@ -13,7 +13,7 @@
"company": "ArtDanjProduction",
"location": "France",
"begin_date": "09-2015",
"end_date": "date.today"
"end_date": "Today"
},
{
"slug": "idemia",

View File

@@ -5,7 +5,7 @@
"description": "formations.freelance.description",
"location": "Remote",
"begin_date": "04-2015",
"end_date": "date.today"
"end_date": "Today"
},
{
"slug": "dnb",
@@ -21,6 +21,6 @@
"description": "formations.bac.description",
"location": "France",
"begin_date": "09-2020",
"end_date": "date.today"
"end_date": "Today"
}
]