Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #2 from stonehippo/master

Cleaned up the inline/compiled CSS logic
  • Loading branch information...
commit 66f2068cc8c8a6b1525d3a247689539cd150b6d9 2 parents ee27f71 + 9dd696e
Luke Brooker authored

Showing 1 changed file with 11 additions and 6 deletions. Show diff stats Hide diff stats

  1. +11 6 index.php
17 index.php
@@ -177,18 +177,23 @@ function print_html($folder, $file, $file_path, $folder_name = null) {
177 177 echo '<pre class="prettyprint lang-html">';
178 178 echo $html_string_code;
179 179 echo '</pre></div>';
180   - if (file_exists($css_file) || $css_string) {
  180 + if ($css_string) {
181 181 echo '<div class="css code"><h5 class="pat-res-heading"><a href="'.$file.'" class="clip">CSS <span>select</span></a>';
182   - if($css_string): echo '<span class="inline">embedded</span>'; endif;
183   - if(file_exists($css_file)): echo '<span class="inline">compiled</span>'; endif;
  182 + echo '<span class="inline">embedded</span>';
184 183 echo '</h5>';
185 184 echo '<pre class="prettyprint lang-css">';
186   - echo htmlspecialchars(file_get_contents($css_file));
187 185 echo $css_string;
188 186 echo '</pre></div>';
189   - if($css_string): echo '<style type="text/css">';
  187 + echo '<style type="text/css">';
190 188 echo $css_string;
191   - echo '</style>'; endif;
  189 + echo '</style>';
  190 + } elseif (file_exists($css_file)) {
  191 + echo '<div class="css code"><h5 class="pat-res-heading"><a href="'.$file.'" class="clip">CSS <span>select</span></a>';
  192 + echo '<span class="inline">compiled</span>';
  193 + echo '</h5>';
  194 + echo '<pre class="prettyprint lang-css">';
  195 + echo htmlspecialchars(file_get_contents($css_file));
  196 + echo '</pre></div>';
192 197 }
193 198 echo '</div>';
194 199 echo '</div>';

0 comments on commit 66f2068

Please sign in to comment.
Something went wrong with that request. Please try again.