mirror of
https://github.com/clagnut/webtypography.git
synced 2025-09-03 10:03:00 +02:00
updated wording of footer, fixed invalid html entities in ToC
This commit is contained in:
@@ -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 ‘The Elements of Typographic Style’ © 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>
|
9
toc.php
9
toc.php
@@ -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";
|
||||
|
Reference in New Issue
Block a user