mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-24 00:40:32 +01:00
Change fetch skills
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<div class="mb-3 mr-2 p-1 md:p-2 h-32 w-32 border-gray-900 dark:border-dark-200 border-2 duration-300 rounded-3xl hover:bg-opacity-25" :class="getColor">
|
||||
<div class="w-full h-full flex flex-col justify-center items-center">
|
||||
<div>
|
||||
<img class="rounded-sm" alt="Skill Img" :src="getCoverLink" />
|
||||
<img class="rounded-sm" :alt="`Skill ${name} Image`" :src="`https://athena.arthurdanjou.fr/files/${cover}`" />
|
||||
</div>
|
||||
<h1 class="md:text-lg text-md font-bold text-center text-gray-700 dark:text-gray-400">{{ skill }}</h1>
|
||||
<h1 class="md:text-lg text-md font-bold text-center text-gray-700 dark:text-gray-400">{{ name }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -13,7 +13,7 @@
|
||||
import {computed, defineComponent} from '@nuxtjs/composition-api'
|
||||
|
||||
interface SkillProps {
|
||||
skill: string,
|
||||
name: string,
|
||||
color: string,
|
||||
cover: string
|
||||
}
|
||||
@@ -21,7 +21,7 @@ interface SkillProps {
|
||||
export default defineComponent({
|
||||
name: "Skill",
|
||||
props: {
|
||||
skill: {
|
||||
name: {
|
||||
type: String,
|
||||
default: "Rien"
|
||||
},
|
||||
@@ -65,11 +65,9 @@ export default defineComponent({
|
||||
return 'hover:bg-amber-400'
|
||||
}
|
||||
})
|
||||
const getCoverLink = computed(() => require(`@/assets/images/skills/${props.cover}`))
|
||||
|
||||
return {
|
||||
getColor,
|
||||
getCoverLink
|
||||
getColor
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user