mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
* 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>
40 lines
1.1 KiB
Vue
40 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import { ExternalIcon } from '@modrinth/assets'
|
|
|
|
import { AutoLink } from '../../base'
|
|
|
|
export type ProjectCardAuthorDetails = {
|
|
name: string
|
|
link?: string
|
|
}
|
|
|
|
defineProps<{
|
|
author: ProjectCardAuthorDetails
|
|
}>()
|
|
</script>
|
|
|
|
<template>
|
|
<!-- author will try to be full width, but no longer than the proper fit. but this also allows it to truncate if necessary -->
|
|
<!-- the weird padding and negative margin are to include the potential hover underline in bounding box which affects rendering on firefox -->
|
|
<span
|
|
class="line-clamp-1 break-all text-secondary font-normal max-w-fit w-full pb-[2px] mb-[-2px]"
|
|
>
|
|
by
|
|
<AutoLink
|
|
:to="author.link"
|
|
:class="
|
|
author.link
|
|
? 'custom-focus-indicator text-inherit outline-none group focus-visible:text-[--color-focus-ring] smart-clickable:allow-pointer-events'
|
|
: ''
|
|
"
|
|
>
|
|
<span
|
|
class="group-focus:underline group-focus:brightness-[--hover-brightness] group-hover:brightness-[--hover-brightness] group-hover:underline"
|
|
>
|
|
{{ author.name }}
|
|
</span>
|
|
<ExternalIcon v-if="author.link?.startsWith('http')" class="shrink-0 ml-1" />
|
|
</AutoLink>
|
|
</span>
|
|
</template>
|