add: stuff to bottom, remove some techs

This commit is contained in:
webfussel 2024-05-31 19:43:13 +02:00
parent f13d74d2d8
commit 2b4f34671e
5 changed files with 17 additions and 5 deletions

View file

@ -1,7 +1,7 @@
<template>
<div class="Technology flex-col" :class="[size]">
<a v-if="link" :href="link" target="_blank" rel="noopener noreferrer">
<img loading="lazy" :src="img" :alt="altText()" :height="getPixelForSize()" :width="getWidth()" :class="[size]"/>
<img loading="lazy" :src="img" :alt="altText()" :height="getPixelForSize()" :width="getWidth()" />
</a>
<img v-else loading="lazy" :height="getPixelForSize()" :width="getWidth()" :src="img" :alt="altText()"/>
<span class="tip">{{name}}</span>
@ -14,7 +14,7 @@ type Props = {
name: string
link?: string
width?: number
size?: 'm' | 'l'
size?: 's' | 'm' | 'l'
}
const {name, size, width} = withDefaults(defineProps<Props>(), {
@ -22,7 +22,13 @@ const {name, size, width} = withDefaults(defineProps<Props>(), {
width: 50,
})
const sizes = {
s: 15,
m: 30,
l: 50,
}
const altText = () => `Icon für ${name}`
const getPixelForSize = () => size === 'm' ? 30 : 50
const getPixelForSize = () => sizes[size]
const getWidth = () => width / 50 * getPixelForSize()
</script>