Skip to content

Commit

Permalink
146 add app icon (#147)
Browse files Browse the repository at this point in the history
* feat(SEO): opti SEO keywords

* feat(icon): add PWA icon
  • Loading branch information
PaiJi authored Jan 30, 2024
1 parent 59fdad9 commit 6e42854
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 9 deletions.
Binary file added public/assets/icons/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/icons/icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "FEC·兽展日历",
"start_url": "/",
"display": "standalone",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}
5 changes: 4 additions & 1 deletion src/components/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export default function Header() {
<header className="mb-6 rounded-b-xl bg-white flex justify-between max-sm:sticky max-sm:top-0 max-sm:z-20 max-sm:shadow">
<div className="m-2 md:m-6 text-base md:text-4xl text-geraldine font-bold">
<span className="block">FEC 🐺🐱🐯</span>
<span className="text-base mt-0 block">FEC·兽展日历 / 新年快乐!🏮</span>
<div className="flex">
<h1 className="text-base mt-0">FEC·兽展日历</h1>
<span className="text-base"> / 新年快乐!🏮</span>
</div>
</div>
<div
className="block sm:hidden flex align-end justify-end mx-4 md:px-6 md:py-8 text-3xl text-red-400 items-center"
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Layout({
name="description"
content={
headMetas?.des ||
"欢迎来到FEC·兽展日历!FEC·兽展日历致力于为您提供最新最全的位于中国大陆境内的兽展相关资讯整合,来这里寻找感兴趣的展会,叫上朋友一起来玩吧!"
"欢迎来到FEC·兽展日历!FEC·兽展日历致力于为您提供最新最全的位于中国大陆境内的兽展、兽聚等相关资讯整合,来这里寻找感兴趣的展会,叫上朋友一起来玩吧!"
}
key="description"
/>
Expand All @@ -56,7 +56,7 @@ export default function Layout({
property="og:description"
content={
headMetas?.des ||
"欢迎来到FEC·兽展日历!FEC·兽展日历致力于为您提供最新最全的位于中国大陆境内的兽展相关资讯整合,来这里寻找感兴趣的展会,叫上朋友一起来玩吧!"
"欢迎来到FEC·兽展日历!FEC·兽展日历致力于为您提供最新最全的位于中国大陆境内的兽展、兽聚相关资讯整合,来这里寻找感兴趣的展会,叫上朋友一起来玩吧!"
}
/>
<meta
Expand Down
8 changes: 4 additions & 4 deletions src/pages/[organization]/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ export default function EventDetail({ event }: { event: Event }) {
<BsCalendar2DateFill className="text-gray-500 inline-block mr-2" />
<time aria-label="活动开始时间" suppressHydrationWarning>
{event.startDate
? new Date(event.startDate).toLocaleDateString()
? format(event.startDate,'yyyy年MM月dd日')
: '暂未公布'}
</time>
<TbArrowsRightLeft className="mx-2 text-sm" />
<time aria-label="活动结束时间" suppressHydrationWarning>
{event.endDate
? new Date(event.endDate).toLocaleDateString()
? format(event.endDate,'yyyy年MM月dd日')
: '暂未公布'}
</time>
</p>
Expand Down Expand Up @@ -554,8 +554,8 @@ export async function getStaticProps(context: GetStaticPropsContext) {
props: {
event,
headMetas: {
title: `${event?.name} FEC·兽展日历`,
keywords: `${event?.name}, ${event?.name} 时间, ${event?.city} 兽展,${event?.city} 兽聚`,
title: `${event?.name}-FEC·兽展日历`,
keywords: `${event?.name}, ${event?.name} 时间, ${event?.city}兽展,${event?.city}兽聚`,
des: metaDes,
url: `https://www.furryeventchina.com/${context.params?.organization}/${event?.slug}`,
cover: imageUrl(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/years.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export default function Years({ events }: { events: Event[] }) {
key={yearLabel}
className="mb-4 border rounded-xl p-6 bg-white"
>
<h1 className="font-bold text-gray-400 text-3xl mb-4">
<h2 className="font-bold text-gray-400 text-3xl mb-4">
{yearLabel === "no-date" ? "暂未定档" : yearLabel}
</h1>
</h2>
<p className="text-gray-600 mb-4">
{yearLabel=== "no-date" ? "" : `${yearLabel}年`}共有 {groupByYearEvents[yearLabel].length} 场活动:
</p>
Expand Down

0 comments on commit 6e42854

Please sign in to comment.