mirror of
https://github.com/LJ5O/website.git
synced 2026-08-11 22:54:46 +02:00
Addd tags on projects display
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import feature from './feature.vue';
|
import feature from './libs/feature.vue';
|
||||||
|
|
||||||
import {useI18n} from 'vue-i18n';
|
import {useI18n} from 'vue-i18n';
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|||||||
34
src/components/home/libs/projectTag.vue
Normal file
34
src/components/home/libs/projectTag.vue
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<p>{{ title }}</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
title:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
},
|
||||||
|
colour:{
|
||||||
|
type:String,
|
||||||
|
required:false,
|
||||||
|
default:"#17a717"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
div{
|
||||||
|
background-color: v-bind(colour);
|
||||||
|
width: fit-content;
|
||||||
|
height: fit-content;
|
||||||
|
padding: 2px 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
p{
|
||||||
|
font-size: 1em;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -13,6 +13,9 @@
|
|||||||
<div class="project_picture">
|
<div class="project_picture">
|
||||||
<img :src="e.picture">
|
<img :src="e.picture">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="project_tags">
|
||||||
|
<projectTag v-for="(tag,indexTag) in e.tags" :key="indexTag" :title="tag.title" :colour="tag.colour"></projectTag>
|
||||||
|
</div>
|
||||||
<div class="project_description">
|
<div class="project_description">
|
||||||
<article>
|
<article>
|
||||||
<p>{{ e.desc }}</p>
|
<p>{{ e.desc }}</p>
|
||||||
@@ -26,6 +29,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import projectTag from './libs/projectTag.vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
projects:{
|
projects:{
|
||||||
type:Array,
|
type:Array,
|
||||||
@@ -81,11 +86,25 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.project_tags{
|
||||||
|
width: 95%;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
.project_description{
|
.project_description{
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
.project_description p{
|
||||||
|
margin: 8px auto;
|
||||||
}
|
}
|
||||||
.project_button{
|
.project_button{
|
||||||
background-color: rgb(65, 185, 61);
|
background-color: rgb(65, 185, 61);
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
desc:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin felis lectus, feugiat in eros sit amet, \
|
desc:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin felis lectus, feugiat in eros sit amet, \
|
||||||
venenatis euismod urna. Aliquam id porttitor erat, vitae dapibus velit. Praesent id felis tincidunt,",
|
venenatis euismod urna. Aliquam id porttitor erat, vitae dapibus velit. Praesent id felis tincidunt,",
|
||||||
buttonText:"Oui !",
|
buttonText:"Oui !",
|
||||||
buttonLink:"#"
|
buttonLink:"#",
|
||||||
|
tags:[{title:"School", colour:"purple"}]
|
||||||
}]
|
}]
|
||||||
</script>
|
</script>
|
||||||
<!-- Want to config displayed text ? Have a look inside components !
|
<!-- Want to config displayed text ? Have a look inside components !
|
||||||
|
|||||||
Reference in New Issue
Block a user