惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

爱吃肉的猫

那就,再相逢 Butterfly的魔改教程:最新评论页 离歌不夜天 前端分享 - 滑动阻尼效果 Butterfly的魔改教程:右键菜单 音乐分享 - doi微醺氛围 Butterfly的魔改教程:动态相册页 近况记事 - 11 微信公众号:Ai大模型让回复更具智能化 近况记事 - 10 Healthy Love Butterfly的魔改教程:关于本站 近况记事 - 9 Butterfly的魔改教程:待办清单 TrollStore - 不掉签助手 近况记事 - 8 Twikoo评论回复邮件模版 过一个很特别的七夕 The Young Boy and the Sea Butterfly的魔改教程:文章订阅页 思考题目:混乱是阶梯 近况记事 - 7 Butterfly的魔改教程:即刻短文页 Butterfly的魔改教程:loading加载动画 差旅游记 再见,不惑之年:二十又一 近况记事 - 6 Butterfly的魔改教程:自定页数跳转 堆友AI作图:3D资源设计平台,堆出你的未来 【QD-Today】自建私有自动签到服务 Long time no see Butterfly的魔改教程:聊天记录页 Butterfly的魔改教程:个性定位信息 近况记事 - 5 Butterfly的魔改教程:好物推荐页 CDN加速 二刷《想见你》 网络言论不是法外之地 近况记事 - 4 深夜训斥 近况记事 - 3 近况记事 - 2 日常打理的那些事 Butterfly的魔改教程:随机阅读一篇文章 随笔 · 封 布柒糖FM项目进展报告 清明路雨纷纷 TA - 仲夏夜的荒原 重构记录 - 4 近况记事 Butterfly的魔改教程:评论弹窗 2021款 Model Y 近两年用车总结 重构记录 - 3 百日祭 避风的港湾 Emoji表情大全 iCat-APP 开源记录 Butterfly的调整教程:文章外挂标签美化 iOS修改 - 万铲铲的致富之路 Markdown 基础教程 从你的全世界路过 小米摄像头!避!雷! VuePress 搭建教程 Hexo跳过指定文件渲染 百度贴吧每日自动签到 重构记录 - 1 GitHub Desktop提交报错 快速批量处理重命名 Git连接仓库常用命令 Ubuntu处理deb命令 掘金自动签到并挖矿 一个简洁的橙色调个人简介 我的猫以前也是流浪猫 布柒糖FM 最新指北 初学写个了油猴脚本 幽灵404页面 PC游戏 · 植物大战僵尸 语言包 · 越狱篇 砸壳多开 · 越狱篇 HuiRan Cursors 手动关闭Win10自动更新 iPhone XR 完美越狱 成功实例 三年的跌撞 关于《小橘妈妈》 魔改前置教程:添加自定义css和js文件 Hexo 博客添加RSS插件 Butterfly的魔改教程:导航栏魔改美化
PWA:让你的网站变成桌面应用APP
亦小封 · 2023-10-28 · via 爱吃肉的猫

下班后闲来无事,博客的也完善的差不多了,便想着逛逛大佬们的博客寻求下新灵感,突然在 @张洪heo 那里看到一篇让网页支持iOS添加到主屏幕全屏应用,webapp启动图生成工具 的文章。
Butterfly原生的PWA配置比较精简,在某些方面的适配会有些问题,本站就一直没有启用PWA。洪哥这完善的PWA模块刚好可以弥补原生的问题,对于离线又或是响应来说,这最适合不过了。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
link(rel="manifest" href=url_for(theme.pwa.manifest))
if(theme.pwa.theme_color)
meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
if(theme.pwa.mask_icon)
link(rel="mask-icon" href=url_for(theme.pwa.mask_icon) color="#5bbad5")

if(theme.pwa.apple_touch_icon)
link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.pwa.apple_touch_icon))
link(rel="apple-touch-icon-precomposed", sizes="180x180", href=url_for(theme.pwa.apple_touch_icon))
if(theme.pwa.favicon_32_32)
link(rel="icon" type="image/png" sizes="32x32" href=url_for(theme.pwa.favicon_32_32))
if(theme.pwa.favicon_16_16)
link(rel="icon" type="image/png" sizes="16x16" href=url_for(theme.pwa.favicon_16_16))
if(theme.pwa.bookmark_icon)
link(rel="bookmark", href=url_for(theme.pwa.bookmark_icon))

if(theme.pwa.startup_image_enable)
if(theme.pwa.favicon_2048_2732)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2048_2732), media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_2732_2048)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2732_2048), media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_1668_2388)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1668_2388), media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_2388_1668)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2388_1668), media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_1536_2048)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1536_2048), media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_2048_1536)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2048_1536), media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_1668_2224)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1668_2224), media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_2224_1668)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2224_1668), media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_1620_2160)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1620_2160), media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_2160_1620)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2160_1620), media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_1290_2796)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1290_2796), media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2796_1290)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2796_1290), media="(device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_1179_2556)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1179_2556), media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2556_1179)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2556_1179), media="(device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_1248_2778)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1248_2778), media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2778_1248)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2778_1248), media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_1170_2532)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1170_2532), media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2532_1170)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2532_1170), media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_1125_2436)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1125_2436), media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2436_1125)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2436_1125), media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_1242_2688)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1242_2688), media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2688_1242)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2688_1242), media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_828_1792)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_828_1792), media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_1792_828)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1792_828), media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_1242_2208)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1242_2208), media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)")
if(theme.pwa.favicon_2208_1242)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_2208_1242), media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)")
if(theme.pwa.favicon_750_1334)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_750_1334), media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_1334_750)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1334_750), media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")
if(theme.pwa.favicon_640_1136)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_640_1136), media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)")
if(theme.pwa.favicon_1136_640)
link(rel="apple-touch-startup-image", href=url_for(theme.pwa.favicon_1136_640), media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)")