add manifest and icon
This commit is contained in:
BIN
public/favicon-precomposed.png
Normal file
BIN
public/favicon-precomposed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -4,23 +4,15 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||||
|
<link rel="icon" href="%PUBLIC_URL%/favicon-precomposed.png">
|
||||||
|
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon-precomposed.png">
|
||||||
|
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon-precomposed.png" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<title>P大树洞(非官方)</title>
|
<title>P大树洞(非官方)</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
|
||||||
You need to enable JavaScript to run this app.
|
|
||||||
</noscript>
|
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<!--
|
|
||||||
This HTML file is a template.
|
|
||||||
If you open it directly in the browser, you will see an empty page.
|
|
||||||
|
|
||||||
You can add webfonts, meta tags, or analytics to this file.
|
|
||||||
The build step will place the bundled scripts into the <body> tag.
|
|
||||||
|
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
|
||||||
-->
|
|
||||||
<script>
|
<script>
|
||||||
var cnzz_s_tag = document.createElement('script');
|
var cnzz_s_tag = document.createElement('script');
|
||||||
cnzz_s_tag.type = 'text/javascript';
|
cnzz_s_tag.type = 'text/javascript';
|
||||||
|
|||||||
15
public/manifest.json
Normal file
15
public/manifest.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"short_name": "树洞",
|
||||||
|
"name": "P大树洞(非官方)",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon-precomposed.png",
|
||||||
|
"sizes": "256x256",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": "./index.html",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#112244",
|
||||||
|
"background_color": "#112244"
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ import './Common.css';
|
|||||||
|
|
||||||
const chinese_format=buildFormatter(chineseStrings);
|
const chinese_format=buildFormatter(chineseStrings);
|
||||||
|
|
||||||
const PID_RE=/(^|\D)([1-9]\d{4,5})(?=\D)/g;
|
const PID_RE=/(^|[^\d])([1-9]\d{4,5})(?!\d)/g;
|
||||||
const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Japanese|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win|洞主)(?![A-Za-z])/gi;
|
const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Japanese|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win|洞主)(?![A-Za-z])/gi;
|
||||||
|
|
||||||
function pad2(x) {
|
function pad2(x) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const SEARCH_PAGESIZE=50;
|
|||||||
const CLICKABLE_TAGS={a: true, audio: true};
|
const CLICKABLE_TAGS={a: true, audio: true};
|
||||||
const PREVIEW_REPLY_COUNT=10;
|
const PREVIEW_REPLY_COUNT=10;
|
||||||
|
|
||||||
const LATEST_POST_ID=parseInt(localStorage['_LATEST_POST_ID'],10)||0;
|
window.LATEST_POST_ID=parseInt(localStorage['_LATEST_POST_ID'],10)||0;
|
||||||
|
|
||||||
function Reply(props) {
|
function Reply(props) {
|
||||||
return (
|
return (
|
||||||
@@ -32,7 +32,7 @@ function Reply(props) {
|
|||||||
function FlowItem(props) {
|
function FlowItem(props) {
|
||||||
return (
|
return (
|
||||||
<div className="flow-item box">
|
<div className="flow-item box">
|
||||||
{parseInt(props.info.pid,10)>LATEST_POST_ID && <div className="flow-item-dot" /> }
|
{parseInt(props.info.pid,10)>window.LATEST_POST_ID && <div className="flow-item-dot" /> }
|
||||||
<div className="box-header">
|
<div className="box-header">
|
||||||
{!!parseInt(props.info.likenum,10) && <span className="box-header-badge">{props.info.likenum}★</span>}
|
{!!parseInt(props.info.likenum,10) && <span className="box-header-badge">{props.info.likenum}★</span>}
|
||||||
{!!parseInt(props.info.reply,10) && <span className="box-header-badge">{props.info.reply}回复</span>}
|
{!!parseInt(props.info.reply,10) && <span className="box-header-badge">{props.info.reply}回复</span>}
|
||||||
@@ -171,6 +171,7 @@ export class Flow extends Component {
|
|||||||
loading_status: 'done',
|
loading_status: 'done',
|
||||||
};
|
};
|
||||||
this.on_scroll_bound=this.on_scroll.bind(this);
|
this.on_scroll_bound=this.on_scroll.bind(this);
|
||||||
|
window.LATEST_POST_ID=parseInt(localStorage['_LATEST_POST_ID'],10)||0;
|
||||||
}
|
}
|
||||||
|
|
||||||
load_page(page) {
|
load_page(page) {
|
||||||
|
|||||||
Reference in New Issue
Block a user