Skip to content

Commit 64422ec

Browse files
committed
Don’t try to use criticalcss if none exists.
1 parent ee627bd commit 64422ec

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

_tmpl/_partials/head.hbs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
<meta name="fullcss" content="/_css/all.css">
88

99
<?php
10-
if( is_null( $_GET[ "nocrit" ] ) ) {
10+
$critical = @file_get_contents("_css/critical.css" );
11+
$criticalCssNotEmpty = $critical !== false && strlen($critical) !== 0;
12+
if( is_null( $_GET[ "nocrit" ] ) && $criticalCssNotEmpty ) {
1113
echo "<style>";
12-
include( "_css/critical.css" );
14+
echo $critical;
1315
echo "</style>";
1416
} else {
1517
echo '<link rel="stylesheet" href="/_css/all.css">';

_tmpl/index.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
<nav class="social">
3535
<a class="no-txt twitter" href="https://twitter.com/respimg">The RICG on Twitter</a>
36+
<a href="https://ricg-slack.herokuapp.com"><img src="https://ricg-slack.herokuapp.com/badge.svg" alt="Join the RICG on Slack"></a>
3637
</nav>
3738
</div>
3839

0 commit comments

Comments
 (0)