Skip to content
Browse files

Moved to relative paths and using the long hand php echo instead of t…

…he ?= - which seems like it should work, but folk are complaining. Alex fixes #14 and fixes #8
  • Loading branch information...
1 parent ca90501 commit ee0752280163c6e69ecaf5de9f1a23673bb13d6c @remy remy committed Sep 15, 2011
Showing with 18 additions and 18 deletions.
  1. +4 −4 css/html5demos.css
  2. +1 −1 includes/footer.php
  3. +5 −5 includes/header.php
  4. +8 −8 index.php
View
8 css/html5demos.css
@@ -13,7 +13,7 @@ section, header, footer {
#wrapper {
width: 600px;
margin: 0 auto;
- background: #fff url(/images/shade.jpg) repeat-x center bottom;
+ background: #fff url(../images/shade.jpg) repeat-x center bottom;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
@@ -85,7 +85,7 @@ li {
#promo {
font-size: 90%;
- background: #333 url(/images/learn-js.jpg) no-repeat left center;
+ background: #333 url(../images/learn-js.jpg) no-repeat left center;
display: block;
color: #efefef;
text-decoration: none;
@@ -101,7 +101,7 @@ li {
#ih5 {
font-size: 90%;
- background: #442C0D url(/images/ih5.jpg) no-repeat left center;
+ background: #442C0D url(../images/ih5.jpg) no-repeat left center;
display: block;
color: #F7FCE4;
text-decoration: none;
@@ -204,7 +204,7 @@ body.view-source #view-source {
height: 16px;
width: 16px;
text-indent: -9999px;
- background-image: url(/images/browsers.gif);
+ background-image: url(../images/browsers.gif);
background-repeat: none;
margin-right: 5px;
}
View
2 includes/footer.php
@@ -4,7 +4,7 @@
<footer><a href="/">HTML5 demos</a>/<a id="built" href="http://twitter.com/rem">@rem built this</a>/<a href="#view-source">view source</a></footer>
</section>
<a href="http://github.com/remy/html5demos"><img style="position: absolute; top: 0; left: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png" alt="Fork me on GitHub" /></a>
-<script src="/js/prettify.packed.js"></script>
+<script src="js/prettify.packed.js"></script>
<script>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
View
10 includes/header.php
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html lang="en"<?=$manifest?>>
<head>
-<meta charset=utf-8 />
-<meta name="viewport" content="width=620" />
+<meta charset=utf-8>
+<meta name="viewport" content="width=620">
<title>HTML5 Demo: <?=$title?></title>
-<link rel="stylesheet" href="/css/html5demos.css" type="text/css" />
-<?php if (!$manifest) : ?><script src="/js/h5utils.js"></script><?php endif ?>
+<link rel="stylesheet" href="css/html5demos.css">
+<?php if (!$manifest) : ?><script src="js/h5utils.js"></script><?php endif ?>
</head>
<body>
<section id="wrapper">
<header>
<h1><?=$title?></h1>
- </header>
+ </header>
View
16 index.php
@@ -2,10 +2,10 @@
$demos = json_decode(file_get_contents('demos.json'));
function support($support, $url) {
- $browsers = split(' ', 'ie firefox opera safari chrome'); // big 5 - should I add iPhone (for geo, etc)?
+ $browsers = explode(' ', 'ie firefox opera safari chrome'); // big 5 - should I add iPhone (for geo, etc)?
- $live = isset($support->live) ? split(' ', $support->live) : array();
- $nightly = isset($support->nightly) ? split(' ', $support->nightly) : array();
+ $live = isset($support->live) ? explode(' ', $support->live) : array();
+ $nightly = isset($support->nightly) ? explode(' ', $support->nightly) : array();
$html = '<span title="unknown browser support" class="yourbrowser tag" id="test-' . $url . '"></span> ';
@@ -26,7 +26,7 @@ function support($support, $url) {
}
function spans($list) {
- $items = split(' ', $list);
+ $items = explode(' ', $list);
$html = '';
foreach ($items as $item) {
$html .= '<span class="tag">' . $item . '</span> ';
@@ -41,7 +41,7 @@ function spans($list) {
<meta charset=utf-8 />
<meta name="viewport" content="width=620" />
<title>HTML5 Demos and Examples</title>
-<link rel="stylesheet" href="/css/html5demos.css" />
+<link rel="stylesheet" href="css/html5demos.css" />
<script src="js/h5utils.js"></script>
<script src="js/modernizr.custom.js"></script>
</head>
@@ -79,9 +79,9 @@ function spans($list) {
<tbody>
<?php foreach ($demos as $demo) :?>
<tr>
- <td class="demo"><a href="<?=$demo->url?>"><?=$demo->desc?></a><?php if (isset($demo->note)) { echo ' <small>' . $demo->note . '</small>'; }?></td>
- <td class="support"><?=support($demo->support, $demo->url)?></td>
- <td class="tags"><?=spans($demo->tags)?></td>
+ <td class="demo"><a href="<?php echo $demo->url?>"><?php echo $demo->desc?></a><?php if (isset($demo->note)) { echo ' <small>' . $demo->note . '</small>'; }?></td>
+ <td class="support"><?php echo support($demo->support, $demo->url)?></td>
+ <td class="tags"><?php echo spans($demo->tags)?></td>
</tr>
<?php endforeach ?>
</tbody>

0 comments on commit ee07522

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