1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-28 17:19:01 +02:00

comment nav

This commit is contained in:
Pomax
2016-02-01 10:56:16 -08:00
parent f0e41c53cb
commit dda27c123b
5 changed files with 27 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@@ -23,6 +23,7 @@ var Navigation = React.createClass({
<navigation className={ this.props.compact ? "compact" : null }> <navigation className={ this.props.compact ? "compact" : null }>
<ul className="navigation"> <ul className="navigation">
{ sectionPages.map(this.generateNavItem) } { sectionPages.map(this.generateNavItem) }
<li><a href="#comments">Comments and questions</a></li>
</ul> </ul>
</navigation> </navigation>
</div> </div>

View File

@@ -68,7 +68,21 @@
</div> </div>
</article> </article>
<section id="comments">
<style>
#comments {
margin-top: 0px;
width: calc(960px + 2em);
border-top: 1px solid rgba(255, 0, 0, 0.5);
padding-top: 3em;
}
</style>
<h2>Comments and questions</h2>
<div id="disqus_thread"></div> <div id="disqus_thread"></div>
</section>
<!-- Disqus commenting -->
<script src="lib/site/disqus.js" async></script>
<!-- referral tracking, because I like knowing who's linking to my book --> <!-- referral tracking, because I like knowing who's linking to my book -->
<script src="lib/site/referrer.js" async></script> <script src="lib/site/referrer.js" async></script>

View File

@@ -14,9 +14,12 @@ navigation {
padding: 0.5em 1em; padding: 0.5em 1em;
li { li {
&:nth-child(n+2):before { &:nth-child(n+2)[data-number]:before {
content: "§" attr(data-number) ". " content: "§" attr(data-number) ". "
} }
&:nth-child(n+2):not([data-number]) {
margin: 5px 0;
}
} }
} }

View File

@@ -75,9 +75,12 @@ navigation ul {
margin: 0; margin: 0;
padding: 0.5em 1em; padding: 0.5em 1em;
} }
navigation ul li:nth-child(n+2):before { navigation ul li:nth-child(n+2)[data-number]:before {
content: "§" attr(data-number) ". "; content: "§" attr(data-number) ". ";
} }
navigation ul li:nth-child(n+2):not([data-number]) {
margin: 5px 0;
}
navigation.compact { navigation.compact {
width: 100%; width: 100%;
border: none; border: none;