Skip to content

Commit

Permalink
Created a themes directory and moved all CSS and images there.
Browse files Browse the repository at this point in the history
Edited the PHP combiner and .htaccess logic to accommodate this change, as well as allowing manifest files to use a "../" when referencing files, which will be handy when adding themes that don't include structural files yet.

Modified all HTML files to point to /themes/default for their theme.
  • Loading branch information
scottjehl committed Oct 13, 2010
1 parent cd478e2 commit d5cbcf7
Show file tree
Hide file tree
Showing 112 changed files with 894 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Options +FollowSymLinks

RewriteEngine On
RewriteRule ^css/all combine.php?type=css
RewriteRule ^themes/([a-zA-Z\-\_\0-9]+)\/$ combine.php?type=css&theme=$1
RewriteRule ^js/all combine.php?type=javascript

# Turn on Expires and set default to 0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Usage

Early documentation: https://github.com/jquery/jquery-mobile/wiki/_pages

For now, I've set things up with a little combinator script to concat all the css and js files into one request and gzip. (js/all and css/all)
For now, I've set things up with a little combinator script to concat all the css and js files into one request and gzip. (js/all and themes/default)
You'll need to point your local apache & php webserver at this root directory in order to preview things.

If you don't currently have a webserver running locally, a quick way to get up and running is to download and install Mamp for Mac OSX. Once installed, just open Mamp, click preferences, go to the Apache tab, and select your local jQuery Mobile folder as the root. Then you can open a browser to http://localhost:8888 to preview the code.
Expand Down
16 changes: 13 additions & 3 deletions combine.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@

$cache = true;
$pullfromcache = false;
$theme = $_GET['theme'];
$cachedir = dirname(__FILE__) . '/cache';
$cssdir = dirname(__FILE__) . '/css';
$cssdir = dirname(__FILE__) . '/themes/' . $theme;
$jsdir = dirname(__FILE__) . '/js';

// Determine the directory and type we should use
Expand All @@ -52,15 +53,24 @@
// Determine last modification date of the files
$lastmodified = 0;
while (list(,$element) = each($elements)) {
$path = realpath($base . '/' . $element);
$thisbase = $base;
$thiselement = $element;
if( strpos($thiselement, "../") === 0 ){
$thiselement = str_replace("../","",$thiselement);
$thisbase = explode("/", $thisbase);
array_pop($thisbase);
$thisbase = implode("/", $thisbase);
}
$path = realpath($thisbase . '/' . $thiselement);
//echo $path;

if (($type == 'javascript' && substr($path, -3) != '.js') ||
($type == 'css' && substr($path, -4) != '.css')) {
header ("HTTP/1.0 403 Forbidden");
exit;
}

if (substr($path, 0, strlen($base)) != $base || !file_exists($path)) {
if (substr($path, 0, strlen($thisbase)) != $thisbase || !file_exists($path)) {
header ("HTTP/1.0 404 Not Found");
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../css/all" />
<link rel="stylesheet" href="../themes/default" />
<script type="text/javascript" src="../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/api-buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/buttons-grouped.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/buttons-icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/buttons-inline.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/buttons-themes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/buttons-types.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/docs-buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/buttons/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Events</title>
<link rel="stylesheet" href="../css/all" />
<link rel="stylesheet" href="../themes/default" />
<script type="text/javascript" src="../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="../css/all" />
<link rel="stylesheet" href="../themes/default" />
<script type="text/javascript" src="../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/forms/api-forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/forms/buttons-themes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/forms/docs-forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/forms/forms-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/forms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Forms</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery UI Mobile Framework - Documentation</title>
<link rel="stylesheet" href="css/all" />
<link rel="stylesheet" href="themes/default" />
<script type="text/javascript" src="js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Intro</title>
<link rel="stylesheet" href="../css/all" />
<link rel="stylesheet" href="../themes/default" />
<script type="text/javascript" src="../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Links</title>
<link rel="stylesheet" href="../css/all" />
<link rel="stylesheet" href="../themes/default" />
<script type="text/javascript" src="../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/api-lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/docs-lists.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-count.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-divider.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-formatting.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-inset.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-nested.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-ol.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-readonly.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-split.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-themes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="../docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-thumbnails.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/lists/lists-ul.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Lists</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
<script type="text/javascript" src="docs/docs.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Intro</title>
<link rel="stylesheet" href="../css/all" />
<link rel="stylesheet" href="../themes/default" />
<script type="text/javascript" src="../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Docs - Buttons</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>jQuery Mobile Framework - Dialog Example</title>
<link rel="stylesheet" href="../../css/all" />
<link rel="stylesheet" href="../../themes/default" />
<script type="text/javascript" src="../../js/all"></script>
</head>
<body>
Expand Down
Loading

0 comments on commit d5cbcf7

Please sign in to comment.