Fix colors

This commit is contained in:
2020-12-15 18:15:34 +01:00
parent da769dc714
commit 78d9197044
10 changed files with 146 additions and 199 deletions

View File

@@ -1,5 +1,6 @@
<template>
<div class="mb-3 mr-3 p-1 md:p-2 h-64 w-64 border-gray-900 dark:border-dark-200 border-2 duration-300 rounded-3xl hover:bg-opacity-25 hover:scale-105 transform cursor-pointer" :class="'hover:bg-'+color+ '-600'">
<div class="mb-3 mr-3 p-1 md:p-2 h-64 w-64 border-gray-900 dark:border-dark-200 border-2 duration-300 rounded-3xl hover:bg-opacity-25 hover:scale-105 transform cursor-pointer"
:class="getColor">
<div class="w-full h-full flex flex-col justify-center items-center">
<div class="text-center">
<img alt="Project Img" class="rounded-md" width="150" :src="'http://localhost:5555/files/' + cover">
@@ -36,6 +37,56 @@ export default {
computed: {
formatLink() {
return this.url.replace('https://', '').replace('http://', '')
},
getColor() {
switch (this.color) {
case 'orange':
return 'hover:bg-orange-600'
case 'purple':
return 'hover:bg-purple-600'
case 'blue':
return 'hover:bg-blue-600'
case 'green':
return 'hover:bg-green-600'
case 'yellow':
return 'hover:bg-yellow-600'
case 'cyan':
return 'hover:bg-cyan-600'
case 'teal':
return 'hover:bg-teal-600'
case 'amber':
return 'hover:bg-amber-600'
case 'blueGray':
return 'hover:bg-blueGray-600'
case 'emerald':
return 'hover:bg-emerald-600'
case 'lightBlue':
return 'hover:bg-lightBlue-600'
case 'lime':
return 'hover:bg-lime-600'
case 'rose':
return 'hover:bg-rose-600'
case 'black':
return 'hover:bg-black-600'
case 'white':
return 'hover:bg-white-600'
case 'pink':
return 'hover:bg-pink-600'
case 'fuchsia':
return 'hover:bg-fuchsia-600'
case 'violet':
return 'hover:bg-violet-600'
case 'indigo':
return 'hover:bg-indigo-600'
case 'warmGray':
return 'hover:bg-warmGray-600'
case 'trueGray':
return 'hover:bg-trueGray-600'
case 'gray':
return 'hover:bg-gray-600'
case 'coolGray':
return 'hover:bg-coolGray-600'
}
}
}
}