correct camel case of GitHub

This commit is contained in:
Richard Rutter
2014-02-27 23:36:16 +00:00
parent 0258562783
commit 75c6477eb0
2 changed files with 7 additions and 6 deletions

View File

@@ -1,3 +1,3 @@
<p id="footer"> <p id="footer">
This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>. It was <a href="http://www.clagnut.com/blog/1600/">created</a> and is maintained by <a href="http://www.clagnut.com/">Richard Rutter</a>. Please feel free to contribute by <a href="https://github.com/clagnut/webtypography">forking it on Github</a>. This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>. It was <a href="http://www.clagnut.com/blog/1600/">created</a> and is maintained by <a href="http://www.clagnut.com/">Richard Rutter</a>. Please feel free to contribute by <a href="https://github.com/clagnut/webtypography">forking it on GitHub</a>.
</p> </p>

11
toc.php
View File

@@ -29,18 +29,19 @@ OL {list-style:none}
<ol id='toc'> <ol id='toc'>
<li><a href="/">Front cover</a></li> <li><a href="/">Front cover</a></li>
<li style="margin-bottom:1.5em"><a href="/intro/">Introduction</a></li> <li style="margin-bottom:1.5em"><a href="/intro/">Introduction</a></li>
<?php <?php
// Inefficient looping through the ToC data arrays, but heh it works doesn't it? // Inefficient looping through the ToC data arrays, but heh it works doesn't it?
foreach($chapters as $chapter_num => $chapter) { foreach($chapters as $chapter_num => $chapter) {
echo "<li id='$chapter_num'><span>$chapter_num </span><h3>".htmlentities($chapter)."</h3>\n<ol>\n"; echo "<li id='$chapter_num'><span>$chapter_num </span><h3>".htmlentities($chapter)."</h3>\n<ol>\n";
foreach($sections as $section_num => $section) { foreach($sections as $section_num => $section) {
$section_chapter = explode("." , $section_num)[0]; $section_chapter_ar = explode("." , $section_num);
$section_chapter = $section_chapter_ar[0];
if($section_chapter == $chapter_num) { if($section_chapter == $chapter_num) {
echo "<li id='$section_num'><span>$section_num </span><h4>".htmlentities($section)."</h4>\n<ol>\n"; echo "<li id='$section_num'><span>$section_num </span><h4>".htmlentities($section)."</h4>\n<ol>\n";
foreach($items as $item_num => $item) { foreach($items as $item_num => $item) {
$item_ar = explode("." , $item_num); $item_ar = explode("." , $item_num);
$item_section = $item_ar[0] . "." . $item_ar[1]; $item_section = $item_ar[0] . "." . $item_ar[1];
if($item_section == $section_num) { if($item_section == $section_num) {
echo "<li id='$item_num'><span>$item_num </span><a href='/$item_num'>".preventOrphans($item)."</a></li>\n"; echo "<li id='$item_num'><span>$item_num </span><a href='/$item_num'>".preventOrphans($item)."</a></li>\n";
} }
@@ -51,7 +52,7 @@ foreach($chapters as $chapter_num => $chapter) {
echo "</ol>\n</li>\n"; echo "</ol>\n</li>\n";
} }
?> ?>
<li><h3>Reference</h3> <li><h3>Reference</h3>
<ol id="reference"> <ol id="reference">
<li><a href="/bibliography/">Bibliography</a></li> <li><a href="/bibliography/">Bibliography</a></li>
@@ -70,4 +71,4 @@ foreach($chapters as $chapter_num => $chapter) {
<?php include($dr . "footer.inc.php") ?> <?php include($dr . "footer.inc.php") ?>
</body> </body>
</html> </html>