Skip to content

Commit 760defb

Browse files
authored
Merge pull request #1034 from datanfr/improve-blog-section
Versioning of critical CSS
2 parents 5e032d2 + 3758f47 commit 760defb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

application/helpers/utility_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function css_url(){
88
}
99

1010
function get_version(){
11-
return 90;
11+
return 91;
1212
}
1313

1414
function legislature_current(){

application/views/templates/header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
<link rel="preload" href="https://matomo.datan.fr/1337.js" onload="embedTracker()" type="script" crossorigin>
9090
<?php
9191
if (isset($critical_css)): ?>
92-
<link rel="stylesheet" media="screen and (max-width: 480px)" href="<?= asset_url() ?>css/critical/<?= $critical_css ?>-mobile.css" />
93-
<link rel="stylesheet" media="screen and (min-width: 481px)" href="<?= asset_url() ?>css/critical/<?= $critical_css ?>.css" />
92+
<link rel="stylesheet" media="screen and (max-width: 480px)" href="<?= asset_url() ?>css/critical/<?= $critical_css ?>-mobile.css?v=<?= get_version() ?>" />
93+
<link rel="stylesheet" media="screen and (min-width: 481px)" href="<?= asset_url() ?>css/critical/<?= $critical_css ?>.css?v=<?= get_version() ?>" />
9494
<link rel="stylesheet" href="<?= css_url() ?>main.css?v=<?= get_version() ?>" media="print" onload="this.media='all'; this.onload=null;">
9595
<noscript><link rel="stylesheet" type="text/css" href="<?= css_url() ?>main.css?v=<?= get_version() ?>"></noscript>
9696
<?php else: ?>

0 commit comments

Comments
 (0)