fix: featured version ui shifts (#1191)

This commit is contained in:
Younes 2023-06-12 00:31:18 +01:00 committed by GitHub
parent f4560bd7d8
commit 3036f43b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -569,43 +569,46 @@
<ChevronRightIcon class="featured-header-chevron" aria-hidden="true" /> <ChevronRightIcon class="featured-header-chevron" aria-hidden="true" />
</nuxt-link> </nuxt-link>
</div> </div>
<NuxtLink <ClientOnly>
v-for="version in featuredVersions" <NuxtLink
:key="version.id" v-for="(version, index) in featuredVersions"
class="featured-version button-transparent" :key="index"
:to="`/${project.project_type}/${ class="featured-version button-transparent"
project.slug ? project.slug : project.id :to="`/${project.project_type}/${
}/version/${encodeURI(version.displayUrlEnding)}`" project.slug ? project.slug : project.id
> }/version/${encodeURI(version.displayUrlEnding)}`"
<a :ref_key="`featured-version-${index}`"
v-tooltip="
version.primaryFile.filename + ' (' + $formatBytes(version.primaryFile.size) + ')'
"
:href="version.primaryFile.url"
class="download square-button brand-button"
:aria-label="`Download ${version.name}`"
@click.stop="(event) => event.stopPropagation()"
> >
<DownloadIcon aria-hidden="true" /> <NuxtLink
</a> v-tooltip="
<div class="info"> version.primaryFile.filename + ' (' + $formatBytes(version.primaryFile.size) + ')'
<nuxt-link "
:to="`/${project.project_type}/${ :to="version.primaryFile.url"
project.slug ? project.slug : project.id external
}/version/${encodeURI(version.displayUrlEnding)}`" class="download square-button brand-button"
class="top" :aria-label="`Download ${version.name}`"
> >
{{ version.name }} <DownloadIcon aria-hidden="true" />
</nuxt-link> </NuxtLink>
<div v-if="version.game_versions.length > 0" class="game-version item"> <div class="info">
{{ version.loaders.map((x) => $formatCategory(x)).join(', ') }} <NuxtLink
{{ $formatVersion(version.game_versions) }} :to="`/${project.project_type}/${
project.slug ? project.slug : project.id
}/version/${encodeURI(version.displayUrlEnding)}`"
class="top"
>
{{ version.name }}
</NuxtLink>
<div v-if="version.game_versions.length > 0" class="game-version item">
{{ version.loaders.map((x) => $formatCategory(x)).join(', ') }}
{{ $formatVersion(version.game_versions) }}
</div>
<Badge v-if="version.version_type === 'release'" type="release" color="green" />
<Badge v-else-if="version.version_type === 'beta'" type="beta" color="orange" />
<Badge v-else-if="version.version_type === 'alpha'" type="alpha" color="red" />
</div> </div>
<Badge v-if="version.version_type === 'release'" type="release" color="green" /> </NuxtLink>
<Badge v-else-if="version.version_type === 'beta'" type="beta" color="orange" /> </ClientOnly>
<Badge v-else-if="version.version_type === 'alpha'" type="alpha" color="red" />
</div>
</NuxtLink>
<hr class="card-divider" /> <hr class="card-divider" />
</template> </template>
<h2 class="card-header">Project members</h2> <h2 class="card-header">Project members</h2>