Merge pull request #35 from web3privacy/dk/images-&-images-fix

Dk/images & images fix
This commit is contained in:
DanielKlein 2024-09-23 21:21:22 +02:00 committed by GitHub
commit 28c3293ddd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 31 deletions

View file

@ -40,6 +40,7 @@ const projectItems: { label: string | string[], type: string, rating?: ProjectRa
h="48px lg:64px" h="48px lg:64px"
:class="switcher ? '' : 'lg:max-w-full! lg:w-full '" :class="switcher ? '' : 'lg:max-w-full! lg:w-full '"
> >
<ClientOnly>
<NuxtImg <NuxtImg
:src="project?.image || '/no-image-1-1.svg'" :src="project?.image || '/no-image-1-1.svg'"
class="w-full h-auto" class="w-full h-auto"
@ -50,6 +51,7 @@ const projectItems: { label: string | string[], type: string, rating?: ProjectRa
object-fit object-fit
bg="#121212" bg="#121212"
/> />
</ClientOnly>
<div <div
flex flex
flex-col flex-col

View file

@ -27,6 +27,7 @@ function onOptionSelected(value: string | number) {
<div class="relative font-700 font-24px"> <div class="relative font-700 font-24px">
<HeadlessListboxButton <HeadlessListboxButton
class="relative cursor-pointer py-6px px-14px text-left border-2px bg-app-white text-app-black text-xs sm:text-sm sm:leading-6" class="relative cursor-pointer py-6px px-14px text-left border-2px bg-app-white text-app-black text-xs sm:text-sm sm:leading-6"
:class="{ 'text-app-danger!': isOptionSelected?.value === 'sunset' }"
> >
<span class="block truncate mr-8px font">{{ isOptionSelected?.label }} <span <span class="block truncate mr-8px font">{{ isOptionSelected?.label }} <span
v-if="titleShowCount" v-if="titleShowCount"
@ -58,7 +59,7 @@ function onOptionSelected(value: string | number) {
> >
<li <li
class="w-full relative cursor-pointer select-none py-8px p-16px bg-app-black text-app-white" class="w-full relative cursor-pointer select-none py-8px p-16px bg-app-black text-app-white"
:class="[active ? 'text-app-white' : 'text-app-white']" :class="[active ? 'text-app-white' : 'text-app-white', { 'text-app-danger!': option.value === 'sunset' }]"
> >
<span <span
class="block truncate" class="block truncate"

View file

@ -49,7 +49,6 @@ const cardTitles = ref< { label: string, sortKey: string, togglable?: boolean }[
items-center items-center
gap-x-12px gap-x-12px
w-full w-full
mb="8px lg:16px"
> >
<h2 <h2
text="app-white 16px lg:24px" text="app-white 16px lg:24px"
@ -148,6 +147,7 @@ const cardTitles = ref< { label: string, sortKey: string, togglable?: boolean }[
gap-16px gap-16px
text-white text-white
w-full w-full
mb="8px lg:24px"
> >
<Card <Card
v-for="project in group.projects" v-for="project in group.projects"

View file

@ -25,14 +25,25 @@ const logo = props.project?.logos?.at(0)?.url
items-center items-center
lg:gap-32px lg:gap-32px
> >
<NuxtImg <ClientOnly>
<div
max-w-200px max-w-200px
max-h-200px max-h-200px
shrink shrink
relative
>
<NuxtImg
border="1px app-text-grey" border="1px app-text-grey"
:src="logo ?? '/no-image-1-1.svg'" :src="logo ?? '/no-image-1-1.svg'"
class="bg-app-bg-grey object-cover h-full vertical-align[middle] block w-full h-[300px] " class="bg-app-bg-grey object-cover h-full vertical-align[middle] block w-full h-[300px] "
/> />
<div flex items-center gap-4px absolute top-12px right-12px bg-app-danger text-12px leading-16px font-bold px-8px py-4px rounded-full v-if="project.sunset">
<UnoIcon i-material-symbols-dangerous text-16px />
SUNSET
<p></p>
</div>
</div>
</ClientOnly>
<div <div
grow grow
w-full w-full
@ -216,7 +227,14 @@ const logo = props.project?.logos?.at(0)?.url
{{ project.percentage }} % {{ project.percentage }} %
</div> </div>
</div> </div>
<div col-span-4 flex items-center justify-center w-full v-if="selectedMobileRating && !isLargeScreen"> <div
v-if="selectedMobileRating && !isLargeScreen"
col-span-4
flex
items-center
justify-center
w-full
>
<ProjectRating <ProjectRating
:rating="selectedMobileRating" :rating="selectedMobileRating"
:percentage="selectedMobileRating.points" :percentage="selectedMobileRating.points"

View file

@ -51,9 +51,9 @@ export const useData = defineStore('data', () => {
const data = await $fetch<{ const data = await $fetch<{
categories: Category[] categories: Category[]
projects: Project[] projects: Project[]
project_phase: { id: string, name: string }[] phases: { id: string, name: string }[]
asset_custody_type: { id: string, name: string }[] custodys: { id: string, name: string }[]
sign_in_type_requirments: { id: string, name: string }[] requirements: { id: string, name: string }[]
usecases: Usecase[] usecases: Usecase[]
ecosystems: Ecosystem[] ecosystems: Ecosystem[]
assets: Asset[] assets: Asset[]
@ -73,9 +73,9 @@ export const useData = defineStore('data', () => {
features.value = data.features features.value = data.features
ranks.value = data.ranks ranks.value = data.ranks
projectPhase.value = data.project_phase?.map(p => ({ id: p.id.toLowerCase(), name: p.name })) projectPhase.value = data.phases?.map(p => ({ id: p.id.toLowerCase(), name: p.name }))
assetCustody.value = data.asset_custody_type.map(a => ({ id: a.id.toLowerCase(), name: a.name })) assetCustody.value = data.custodys.map(a => ({ id: a.id.toLowerCase(), name: a.name }))
signInRequirments.value = data.sign_in_type_requirments.map(s => ({ id: s.id.toLowerCase(), name: s.name })) signInRequirments.value = data.requirements.map(s => ({ id: s.id.toLowerCase(), name: s.name }))
} }
catch (e) { catch (e) {
console.error(e) console.error(e)
@ -129,7 +129,7 @@ export const useData = defineStore('data', () => {
selectedCategoryId.value !== 'all' ? project.categories.includes(selectedCategoryId.value) : true, selectedCategoryId.value !== 'all' ? project.categories.includes(selectedCategoryId.value) : true,
) )
.filter(project => .filter(project =>
selectedUsecaseId.value !== 'all' ? project.usecases?.map(u => u.toLowerCase()).includes(selectedUsecaseId.value.toLowerCase()) : true, selectedUsecaseId.value !== 'all' ? selectedUsecaseId.value === 'sunset' ? project.sunset : project.usecases?.map(u => u.toLowerCase()).includes(selectedUsecaseId.value.toLowerCase()) : true,
) )
.filter(project => .filter(project =>
selectedEcosystemId.value !== 'all' ? project.ecosystem?.map(e => e.toLowerCase()).includes(selectedEcosystemId.value.toLowerCase()) : true, selectedEcosystemId.value !== 'all' ? project.ecosystem?.map(e => e.toLowerCase()).includes(selectedEcosystemId.value.toLowerCase()) : true,
@ -204,7 +204,7 @@ export const useData = defineStore('data', () => {
} }
}).sort((a, b) => b.projects.length - a.projects.length) }).sort((a, b) => b.projects.length - a.projects.length)
return groupedProjects return groupedProjects.filter(group => group.projects.length > 0)
}) })
const filteredProjectsCount = computed(() => filteredProjects.value.length) const filteredProjectsCount = computed(() => filteredProjects.value.length)

View file

@ -124,7 +124,6 @@ watch([scrollY, top, y], (newValues, oldValues) => {
/> />
</div> </div>
</div> </div>
{{ selectedAssetsUsedId }}
<slot /> <slot />
</div> </div>
</div> </div>

View file

@ -1,7 +1,7 @@
{ {
"name": "develitesse-nuxt", "name": "develitesse-nuxt",
"private": true, "private": true,
"packageManager": "pnpm@9.10.0", "packageManager": "pnpm@9.11.0",
"scripts": { "scripts": {
"build": "nuxt build", "build": "nuxt build",
"cleanup": "nuxt cleanup", "cleanup": "nuxt cleanup",