Skip to content

Commit

Permalink
Add PWA manifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
apqx committed Jan 7, 2025
1 parent 3100ef0 commit 8b7269a
Show file tree
Hide file tree
Showing 13 changed files with 105 additions and 14 deletions.
1 change: 0 additions & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
categories: 404-page
title: 立泉落落
description: 昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: false
blockFromSearchEngine: true
preloadImageWebp: https://apqx-host.oss-cn-hangzhou.aliyuncs.com/blog/emojis/noto-animated-emoji/peacock/512.webp
Expand Down
10 changes: 7 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{% if page.cover != null -%}
<meta data-pagefind-default-meta="image[content]" property="og:image" content="{{ page.cover }}"/>
{% else -%}
<meta data-pagefind-default-meta="image[content]" property="og:image" content="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg"/>
<meta data-pagefind-default-meta="image[content]" property="og:image" content="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/old_man.jpg"/>
{% endif -%}
{% if page.blockFromSearchEngine == true -%}
<!-- Let search engine not index this page -->
Expand All @@ -30,8 +30,12 @@
<!-- Let browser know website is optimized for mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<!-- Site icon -->
<link rel="shortcut icon" href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/snail.png"/>
<link rel="apple-touch-icon" href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/snail_white_bg.png"/>
<!-- PWA, Chrome 添加到桌面图标 -->
<link rel="manifest" href="/manifest.json" />
<!-- Chrome Safari Tab 图标 -->
<link rel="shortcut icon" href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/old_man_rounded.png"/>
<!-- Safari 添加到桌面图标 -->
<link rel="apple-touch-icon" href="https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/old_man_white_bg.jpg"/>
{% comment %} js和css由内部webpack工程输出,debug模式下使用localhost版本,release模式下使用托管在阿里云上的版本 {% endcomment -%}
<script async type="text/javascript" src="{{ resUrlPrefix }}blog-runtime-v{{ version }}.js"></script>
<script async type="text/javascript" src="{{ resUrlPrefix }}blog-scaffold-v{{ version }}.js"></script>
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
topbar-title: ʕ•ᴥ•ʔ
description: 旅居杭州的九五后昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
share-description: 昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
preloadImageJpg: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_original_thumb.jpg
---

Expand Down
95 changes: 95 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"short_name": "立泉落落",
"name": "立泉落落",
"icons": [
{
"purpose": "maskable",
"sizes": "48x48",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x48.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "72x72",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x72.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "96x96",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x96.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "128x128",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x128.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "192x192",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x192.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "384x384",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x384.png",
"type": "image/png"
},
{
"purpose": "maskable",
"sizes": "512x512",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/maskable_icon_x512.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "48x48",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_48.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "72x72",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_72.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "96x96",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_96.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "128x128",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_128.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "192x192",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_192.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "384x384",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_384.png",
"type": "image/png"
},
{
"purpose": "any",
"sizes": "512x512",
"src": "https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/icon/old_man_rounded_white_bg_512.png",
"type": "image/png"
}

],
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff"
}

2 changes: 1 addition & 1 deletion npm/dist/blog-scaffold-v2.0.0.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion npm/src/component/dialog/BasicDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export abstract class BasicDialog<T extends BasicDialogProps, V> extends React.C

initScrollListener() {
if (!this.listenScroll) return

let lastScrollTop = -1
let lastFireTime = 0
this.dialogContentE.addEventListener("scroll", () => {
Expand All @@ -138,7 +139,7 @@ export abstract class BasicDialog<T extends BasicDialogProps, V> extends React.C
const upScroll = newScrollTop <= lastScrollTop
lastScrollTop = newScrollTop
if (upScroll) return
if (this.dialogContentE.scrollHeight - this.dialogContentE.clientHeight - this.dialogContentE.scrollTop < 300) {
if (this.dialogContentE.scrollHeight - this.dialogContentE.clientHeight - this.dialogContentE.scrollTop < this.dialogContentE.clientHeight / 2) {
if (Date.now() - lastFireTime < 100) return
consoleDebug("BasicDialog scroll near to bottom, should fire load more")
this.scrollNearToBottom()
Expand Down
1 change: 0 additions & 1 deletion page/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
title: 立泉落落|印刷品
topbar-title: 印刷品
description: 昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: false
blockFromSearchEngine: true
---
Expand Down
1 change: 0 additions & 1 deletion page/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
title: 立泉落落|分享
topbar-title: Share the moments
description: 昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: false
blockFromSearchEngine: true
---
Expand Down
1 change: 0 additions & 1 deletion section/opera.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
topbar-title: Lift the camera
description: 2021年08月08日,我在博客里开辟这个分区来承载曾经在剧场看过的剧和拍过的剧照,以昆曲为主,使用标签把每一场演出按剧种、剧团、剧目、演员、剧场分类归档。
share-description: 结庐在人境,心远地自偏。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: true
blockFromSearchEngine: false
---
Expand Down
1 change: 0 additions & 1 deletion section/poetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
title: 立泉落落|诗文
topbar-title: Words we love
description: 落花人独立,微雨燕双飞。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: true
blockFromSearchEngine: false
preloadImageJpg: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_poetry_thumb.jpg
Expand Down
1 change: 0 additions & 1 deletion section/repost.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
title: 立泉落落|转载
topbar-title: Why so serious
description: 静念园林好,人间良可辞。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: true
blockFromSearchEngine: false
preloadImageJpg: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/index_repost_thumb.jpg
Expand Down
1 change: 0 additions & 1 deletion section/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
title: 立泉落落|搜索
topbar-title: Hello there
description: 昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: false
blockFromSearchEngine: true
---
Expand Down
1 change: 0 additions & 1 deletion section/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
title: 立泉落落|标签
topbar-title: Surprise to click
description: 昆虫,野生散养攻城狮,“十分”“业余”摄影Fans。
cover: https://apqx.oss-cn-hangzhou.aliyuncs.com/blog/site/me.jpg
sitemap: false
blockFromSearchEngine: true
preloadImageWebp: https://apqx-host.oss-cn-hangzhou.aliyuncs.com/blog/emojis/noto-animated-emoji/cooking/512.webp
Expand Down

0 comments on commit 8b7269a

Please sign in to comment.