mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add last-updated to default listing template
This commit is contained in:
parent
ab2dbe2cd6
commit
fcbca7ae1c
2 changed files with 36 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import RelatedLinks from '~/src/components/listing-parts/related-links.astro'
|
||||||
import Devices from '~/src/components/listing-parts/devices.astro'
|
import Devices from '~/src/components/listing-parts/devices.astro'
|
||||||
import RelatedVideos from '~/src/components/listing-parts/related-videos.astro'
|
import RelatedVideos from '~/src/components/listing-parts/related-videos.astro'
|
||||||
import Bundles from '~/src/components/listing-parts/bundles.astro'
|
import Bundles from '~/src/components/listing-parts/bundles.astro'
|
||||||
|
import LastUpdated from '~/src/components/listing-parts/last-updated.astro'
|
||||||
|
|
||||||
import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
|
import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
|
||||||
|
|
||||||
|
|
@ -65,4 +66,8 @@ const details = new ListingDetails( listing )
|
||||||
listing={ listing }
|
listing={ listing }
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<LastUpdated
|
||||||
|
listing={ listing }
|
||||||
|
/>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
31
src/components/listing-parts/last-updated.astro
Normal file
31
src/components/listing-parts/last-updated.astro
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
import { makeLastUpdatedFriendly } from '~/helpers/parse-date.js'
|
||||||
|
|
||||||
|
const {
|
||||||
|
listing
|
||||||
|
} = Astro.props
|
||||||
|
|
||||||
|
console.log( 'listing.lastUpdated', listing.lastUpdated )
|
||||||
|
|
||||||
|
const lastUpdatedFriendly = makeLastUpdatedFriendly( listing.lastUpdated )
|
||||||
|
|
||||||
|
---
|
||||||
|
<div class="report-update text-xs text-center w-full shadow-none py-24">
|
||||||
|
{ lastUpdatedFriendly !== null &&
|
||||||
|
<div>
|
||||||
|
<time
|
||||||
|
datetime={ listing.lastUpdated.raw }
|
||||||
|
>
|
||||||
|
Last Updated { lastUpdatedFriendly }
|
||||||
|
</time>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<!-- https://eric.blog/2016/01/08/prefilling-github-issues/ -->
|
||||||
|
<a
|
||||||
|
href={ `https://github.com/ThatGuySam/doesitarm/issues?q=is%3Aissue+${ listing.name }` }
|
||||||
|
target="_blank"
|
||||||
|
class="underline"
|
||||||
|
rel="noopener"
|
||||||
|
>Report Update</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue