Skip to content

Commit

Permalink
Update JSON path reference and page title cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Leeks committed Sep 17, 2014
1 parent c2e8324 commit 17607cd
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 19 deletions.
5 changes: 3 additions & 2 deletions css-selectors.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$sheet = 'CSS';
$title = "Cheetyr – $sheet Selectors Cheatsheet";
$sheet = 'css';
$pageTitle = strtoupper($sheet);
$title = "Cheetyr – $pageTitle Selectors Cheatsheet";
include 'header.php';
?>
<?php include 'main.php'; ?>
Expand Down
5 changes: 3 additions & 2 deletions git.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$sheet = 'Git';
$title = "Cheetyr – $sheet Cheatsheet";
$sheet = 'git';
$pageTitle = ucfirst($sheet);
$title = "Cheetyr – $pageTitle Cheatsheet";
include 'header.php';
?>
<?php include 'main.php'; ?>
Expand Down
5 changes: 3 additions & 2 deletions illustrator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$sheet = 'Illustrator';
$title = "Cheetyr – Adobe $sheet Cheatsheet";
$sheet = 'illustrator';
$pageTitle = ucfirst($sheet);
$title = "Cheetyr – Adobe $pageTitle Cheatsheet";
include 'header.php';
?>
<?php include 'main.php'; ?>
Expand Down
35 changes: 26 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
<?php
$title = "Cheetyr – Cheatsheets for Designers &amp; Developers";
include 'header.php';
?>
<main>
<h1>Welcome to Cheetyr</h1>
<p class="lede">A handy collection of cheatsheets and shortcuts to speed up the work of designers and developers.</p>
<p>This project is very much a work in progress, and I hope in time to make it as comprehensive as possible. If you are interested in helping it grow, or just have a little feedback, please <a href="http://williamleeks.com/contact.php">get in touch</a> or get involved on <a href="https://github.com/WilliamLeeks/Cheetyr">GitHub</a>.</p>
</main>
<?php include 'footer.php'; ?>
header("Content-Type: text/html");
include dirname(__FILE__) . '/includes/AltoRouter.php';

$router = new AltoRouter();
$router->setBasePath('');
/* Setup the URL routing. This is production ready. */

// Main routes that non-customers see
$router->map('GET','/', 'home.php', 'home');
$router->map('GET','/home', 'home.php', 'home-home');
$router->map('GET','/photoshop', 'photoshop.php', 'photoshop');
$router->map('GET','/illustrator', 'illustrator.php', 'illustrator');
$router->map('GET','/css-selectors', 'css-selectors.php', 'css-selectors');
$router->map('GET','/git', 'git.php', 'git');
$router->map('GET','/vim', 'vim.php', 'vim');

/* Match the current request */
$match = $router->match();
if($match) {
require $match['target'];
}
else {
header("HTTP/1.0 404 Not Found");
require '404.php';
}
?>
5 changes: 3 additions & 2 deletions photoshop.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$sheet = 'Photoshop';
$title = "Cheetyr – Adobe $sheet Cheatsheet";
$sheet = 'photoshop';
$pageTitle = ucfirst($sheet);
$title = "Cheetyr – Adobe $pageTitle Cheatsheet";
include 'header.php';
?>
<?php include 'main.php'; ?>
Expand Down
5 changes: 3 additions & 2 deletions vim.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$sheet = 'Vim';
$title = "Cheetyr – $sheet Cheatsheet";
$sheet = 'vim';
$pageTitle = ucfirst($sheet);
$title = "Cheetyr – $pageTitle Cheatsheet";
include 'header.php';
?>
<?php include 'main.php'; ?>
Expand Down

0 comments on commit 17607cd

Please sign in to comment.