Drop the date and new badge from the engine cards
Engines are evergreen products, not dated posts — the meta row, its styles, the unused isNew wiring and the new-badge translations go.
This commit is contained in:
@@ -177,7 +177,6 @@ export default {
|
||||
errorTitle: 'Failed to connect to Wiki',
|
||||
noPagesTitle: 'No engines found',
|
||||
noPagesDesc: "It seems like there aren't any engine pages available on the wiki at the moment.",
|
||||
new: 'New',
|
||||
explore: 'Explore',
|
||||
openWiki: 'Open in Wiki',
|
||||
},
|
||||
|
||||
@@ -177,7 +177,6 @@ export default {
|
||||
errorTitle: 'Nem sikerült csatlakozni a Wikihez',
|
||||
noPagesTitle: 'Nem találhatók motorok',
|
||||
noPagesDesc: 'Úgy tűnik, jelenleg nincsenek motoroldalak a wikin.',
|
||||
new: 'Új',
|
||||
explore: 'Felfedezés',
|
||||
openWiki: 'Megnyitás a Wikiben',
|
||||
},
|
||||
|
||||
@@ -37,16 +37,6 @@
|
||||
<div class="engine-card-index">{{ String(index + 1).padStart(2, '0') }}</div>
|
||||
|
||||
<div class="engine-card-body">
|
||||
<div class="engine-card-meta">
|
||||
<span v-if="isNew(page.createdAt)" class="engine-new-badge">
|
||||
<span class="engine-new-dot"></span>
|
||||
{{ t('engines.new') }}
|
||||
</span>
|
||||
<span class="engine-card-updated">
|
||||
<i class="fa-solid fa-clock-rotate-left mr-1 opacity-60"></i>{{ formatDateTime(page.updatedAt) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<h2 class="engine-card-title">
|
||||
<a :href="exploreUrl(page)" target="_blank" rel="noopener">{{ page.title }}</a>
|
||||
</h2>
|
||||
@@ -75,7 +65,6 @@
|
||||
import { onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { formatDateTime } from '../../lib/dateFormat'
|
||||
import { WIKI_BASE } from '../../api/wiki.api'
|
||||
import { useEnginesStore } from '../../stores/engines.store'
|
||||
import type { WikiPageWithContent } from '../../lib/interfaces/wiki.interface'
|
||||
@@ -85,7 +74,7 @@ const { t } = useI18n()
|
||||
|
||||
const store = useEnginesStore()
|
||||
const { pages: enginePages, loading, error } = storeToRefs(store)
|
||||
const { isNew, getCleanPreview } = store
|
||||
const { getCleanPreview } = store
|
||||
|
||||
// Explore points at the engine's git repository (from wiki metadata);
|
||||
// pages without one fall back to their wiki page.
|
||||
@@ -134,18 +123,6 @@ onMounted(() => store.fetch())
|
||||
.engine-card-body {
|
||||
@apply relative p-8 md:p-12;
|
||||
}
|
||||
.engine-card-meta {
|
||||
@apply flex items-center gap-3 mb-5 text-xs font-semibold uppercase tracking-wider text-slate-500;
|
||||
}
|
||||
.engine-new-badge {
|
||||
@apply flex items-center gap-1 text-emerald-400 bg-emerald-950 px-2 py-0.5 rounded-full border border-emerald-800;
|
||||
}
|
||||
.engine-new-dot {
|
||||
@apply w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse;
|
||||
}
|
||||
.engine-card-updated {
|
||||
@apply text-slate-500;
|
||||
}
|
||||
.engine-card-title {
|
||||
@apply text-3xl md:text-5xl font-black text-white mb-4 leading-tight;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import wikiApi from '../api/wiki.api'
|
||||
import { isNew } from '../lib/softwareUtils'
|
||||
import { useLoadable } from '../composables/useLoadable'
|
||||
import type { WikiPageWithContent } from '../lib/interfaces/wiki.interface'
|
||||
|
||||
@@ -20,5 +19,5 @@ export const useEnginesStore = defineStore('engines', () => {
|
||||
return content.replace(/[#*`_[\]()>|-]/g, '').replace(/\s+/g, ' ').trim().slice(0, 260) + '...'
|
||||
}
|
||||
|
||||
return { pages, loading, error, fetch, isNew, getCleanPreview, invalidate }
|
||||
return { pages, loading, error, fetch, getCleanPreview, invalidate }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user