* New project card * no shadow on icons * Remove updated label * reduce tag count to 5 * improve envs * fix: project card bottom row not growing * move actions in grid mode * focus changes + new project list component * Allow more tags in grid mode, deprioritize non-loader tags * fix prod deploy robots.txt * remove unused id * App cards * prepr * publish date + fix router links * fix author hover underline in firefox * perf: preload on search item hover * remove unused filter * remove option for old grid view --------- Co-authored-by: tdgao <mr.trumgao@gmail.com> Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
38 lines
723 B
Vue
38 lines
723 B
Vue
<template>
|
|
<router-link
|
|
v-if="
|
|
(typeof to === 'object' && (to?.path || to?.query)) ||
|
|
(typeof to === 'string' && to?.startsWith('/'))
|
|
"
|
|
:to="to"
|
|
v-bind="$attrs"
|
|
>
|
|
<slot />
|
|
</router-link>
|
|
<a v-else-if="typeof to === 'string' && to?.startsWith('http')" :href="to" v-bind="$attrs">
|
|
<slot />
|
|
</a>
|
|
<button
|
|
v-else-if="typeof to === 'function'"
|
|
v-bind="$attrs"
|
|
class="inline bg-transparent border-none p-0 m-0 cursor-pointer"
|
|
@click="to()"
|
|
>
|
|
<slot />
|
|
</button>
|
|
<span v-else v-bind="$attrs">
|
|
<slot />
|
|
</span>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
to: any
|
|
}>()
|
|
|
|
defineOptions({
|
|
inheritAttrs: false,
|
|
})
|
|
</script>
|