updated wording of footer, fixed invalid html entities in ToC

This commit is contained in:
Richard Rutter
2014-02-26 16:29:46 +00:00
parent cad8846aae
commit fb4f6825bc
2 changed files with 6 additions and 7 deletions

View File

@@ -1,6 +1,4 @@
<div><br /></div>
<p id="footer">
This work 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 created and is maintained by <a href="http://www.clagnut.com/blog/1600/">Richard Rutter</a>.<br />
Extracts from &#8216;The Elements of Typographic Style&#8217; &copy; Robert Bringhurst.
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>

View File

@@ -30,18 +30,19 @@ OL {list-style:none}
<li><a href="/">Front cover</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?
foreach($chapters as $chapter_num => $chapter) {
echo "<li id='$chapter_num'><span>$chapter_num </span><h3>$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) {
$section_chapter = explode("." , $section_num)[0];
if($section_chapter == $chapter_num) {
echo "<li id='$section_num'><span>$section_num </span><h4>$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) {
$item_ar = explode("." , $item_num);
$item_section = $item_ar[0] . "." . $item_ar[1];
if($item_section == $section_num) {
echo "<li id='$item_num'><span>$item_num </span><a href='/$item_num'>$item</a></li>\n";
echo "<li id='$item_num'><span>$item_num </span><a href='/$item_num'>".htmlentities($item)."</a></li>\n";
}
}
echo "</ol>\n</li>\n";