From 110e3948419b0a70650c1a39c0aefc6c06641898 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 24 Aug 2023 12:13:04 +0300 Subject: [PATCH] add cached css version --- src/config/app.php.example | 1 + src/public/index.php | 6 +++--- src/public/peer.php | 6 +++--- src/public/search.php | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/config/app.php.example b/src/config/app.php.example index f48503c..b281d7b 100644 --- a/src/config/app.php.example +++ b/src/config/app.php.example @@ -65,6 +65,7 @@ define('GEOIP_LITE_2_CITY_DB', __DIR__ . '/../../storage/GeoLite2/GeoLite2-City. // Webapp define('WEBSITE_URL', ''); define('WEBSITE_NAME', 'YGGstate'); +define('WEBSITE_CSS_VERSION', 1); define('WEBSITE_PEER_REMOTE_TIME_ONLINE_TIMEOUT', 60 * 5); define('WEBSITE_PEER_REMOTE_PAGINATION_LIMIT', 20); diff --git a/src/public/index.php b/src/public/index.php index 31dc37f..43992d5 100644 --- a/src/public/index.php +++ b/src/public/index.php @@ -165,9 +165,9 @@ $peers = $memory->getByMethodCallback( - - - + + + <?php echo sprintf(_('%s - Yggdrasil network explorer since %s'), WEBSITE_NAME, date('Y', $memory->getByMethodCallback($db, 'getPeerFirstByTimeAdded')->timeAdded)) ?> diff --git a/src/public/peer.php b/src/public/peer.php index 1eeed19..c6d57c9 100644 --- a/src/public/peer.php +++ b/src/public/peer.php @@ -191,9 +191,9 @@ $peerPortStatuses = $db->findLastPeerPortStatusesByPeerId($requestPeerId); - - - + + + <?php if ($peerInfo) { ?> <?php echo sprintf(_('Peer %s - %s'), $peerInfo->address, WEBSITE_NAME) ?> diff --git a/src/public/search.php b/src/public/search.php index 5311e8b..4ce9163 100644 --- a/src/public/search.php +++ b/src/public/search.php @@ -68,9 +68,9 @@ $results = $sphinx->searchPeers($requestQuery, <!DOCTYPE html> <html lang="en-US"> <head> - <link rel="stylesheet" type="text/css" href="<?php echo WEBSITE_URL ?>/assets/theme/<?php echo $requestTheme ?>/css/common.css?<?php echo time() ?>" /> - <link rel="stylesheet" type="text/css" href="<?php echo WEBSITE_URL ?>/assets/theme/<?php echo $requestTheme ?>/css/framework.css?<?php echo time() ?>" /> - <link rel="stylesheet" type="text/css" href="<?php echo WEBSITE_URL ?>/assets/theme/<?php echo $requestTheme ?>/css/yggverse/graph/calendar/month.css?<?php echo time() ?>" /> + <link rel="stylesheet" type="text/css" href="<?php echo WEBSITE_URL ?>/assets/theme/<?php echo $requestTheme ?>/css/common.css?<?php echo WEBSITE_CSS_VERSION ?>" /> + <link rel="stylesheet" type="text/css" href="<?php echo WEBSITE_URL ?>/assets/theme/<?php echo $requestTheme ?>/css/framework.css?<?php echo WEBSITE_CSS_VERSION ?>" /> + <link rel="stylesheet" type="text/css" href="<?php echo WEBSITE_URL ?>/assets/theme/<?php echo $requestTheme ?>/css/yggverse/graph/calendar/month.css?<?php echo WEBSITE_CSS_VERSION ?>" /> <title> <?php echo sprintf(_('%s - Search - %s'), htmlentities($requestQuery), WEBSITE_NAME) ?>