mirror of
https://github.com/LJ5O/website.git
synced 2026-08-11 22:54:46 +02:00
New list component
No great name ideas came for this one
This commit is contained in:
76
src/components/skills/factList.vue
Normal file
76
src/components/skills/factList.vue
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<template>
|
||||||
|
<div class="fact">
|
||||||
|
<img :src="picture">
|
||||||
|
<article><p>{{ text }}</p></article>
|
||||||
|
<RouterLink v-if="link!='#'" class="router" :to="link"><button class="button">{{ buttonText }}</button></RouterLink>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { RouterLink } from 'vue-router';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
text:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
},
|
||||||
|
buttonText:{
|
||||||
|
type:String,
|
||||||
|
required:false,
|
||||||
|
default:undefined
|
||||||
|
},
|
||||||
|
link:{
|
||||||
|
type:String,
|
||||||
|
required:false,
|
||||||
|
default: "#"
|
||||||
|
},
|
||||||
|
picture:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.fact{
|
||||||
|
background-color: #302c2c;
|
||||||
|
border: 2px solid #EAEAEA;
|
||||||
|
border-radius: 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-basis: content;
|
||||||
|
height: 200px;
|
||||||
|
/*justify-content: space-between;*/
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
img{
|
||||||
|
height: 150px;
|
||||||
|
width: 30%;
|
||||||
|
min-width: 100px;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
|
color: white;
|
||||||
|
padding: 0 20px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.router{
|
||||||
|
margin-right: 20px;
|
||||||
|
min-width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.router button{
|
||||||
|
background-color: aqua;
|
||||||
|
font-size: 1.3em;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -2,16 +2,38 @@
|
|||||||
<Header/>
|
<Header/>
|
||||||
<h1 class="center">Skills</h1>
|
<h1 class="center">Skills</h1>
|
||||||
<p class="center">
|
<p class="center">
|
||||||
As I have worked on various topics, I learned a lot about different technologies. As years and tasks are going by, I always strive to learn more and make a good use of my capacities.</p>
|
As I have worked on various topics, I learned a lot about different technologies. As years and tasks are going by, I always strive to learn more and make a good use of my capacities.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<FactList v-for="(e,i) in skills" :key="i" :text="e.text" :buttonText="e.buttonText" :link="e.link" :picture="e.picture" class="factList"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import Header from '@/components/header.vue';
|
import Header from '@/components/header.vue';
|
||||||
|
import FactList from '@/components/skills/factList.vue';
|
||||||
|
|
||||||
|
const skills = [{
|
||||||
|
text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ante turpis, mattis vel tellus nec, porttitor condimentum libero. Fusce ut neque magna.",
|
||||||
|
buttonText: "Click",
|
||||||
|
picture: "https://picsum.photos/400/200"
|
||||||
|
},{
|
||||||
|
text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ante turpis, mattis vel tellus nec, porttitor condimentum libero. Fusce ut neque magna. ",
|
||||||
|
buttonText: "Click me",
|
||||||
|
picture: "https://picsum.photos/50",
|
||||||
|
link: "google.com"
|
||||||
|
}]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.center{
|
.center{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.factList{
|
||||||
|
width: 60%;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Reference in New Issue
Block a user