静态资源版本收敛到 FB_ASSET_V 常量 (#1)
原先 layout.php 与 install.php 各写一份 style.css?v=N,改样式时只改一处, 另一处会漂移 —— 实际就发生了:首页 v=10、安装页还是 v=7,两页样式不一致。 现在统一在 lib/bootstrap.php 定义 FB_ASSET_V,两处都引用它。 以后改 assets 下的 css/js,只改这一个数字。
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ function fb_layout_head($title, array $opt = []) {
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16x16.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon.png">
|
||||
<link rel="manifest" href="assets/site.webmanifest">
|
||||
<link rel="stylesheet" href="assets/style.css?v=10">
|
||||
<link rel="stylesheet" href="assets/style.css?v=<?php echo (int)FB_ASSET_V; ?>">
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
|
||||
Reference in New Issue
Block a user