diff options
-rw-r--r-- | design/sass/_books.scss | 14 | ||||
-rw-r--r-- | design/templates/details/book.html | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/design/sass/_books.scss b/design/sass/_books.scss index ec81b7e..b0159c0 100644 --- a/design/sass/_books.scss +++ b/design/sass/_books.scss @@ -166,6 +166,20 @@ .highlights article:first-of-type { margin-top: 1em; } +.highlink { + margin-right: 1em; + float: left; + font-size: 0.75em; + line-height: 1.6; + color: lighten($body_font, 60); + @include breakpoint(alpha) { + margin-top: 0.5em; + } + &:visited { + color: lighten($body_font, 60); + } +} .highlights .foot { @include fontsize(14); } + diff --git a/design/templates/details/book.html b/design/templates/details/book.html index e1d211a..c9e9089 100644 --- a/design/templates/details/book.html +++ b/design/templates/details/book.html @@ -38,8 +38,9 @@ <h4>Highlights:</h4> {% for object in object.bookhighlight_set.all reversed %} <article class="h-entry hentry post--article book" itemscope itemType="http://schema.org/Article"> - {{object.body_html|safe|amp|smartypants}} - <p class="foot">page: {{object.page}} <small>kindle location: {{object.location|cut:"["|cut:"]"}}</small></p> + <a class="highlink" name="h{{forloop.counter}}-page-{{object.page}}" href="#h{{forloop.counter}}-page-{{object.page}}">¶</a> + {{object.body_html|safe|amp|smartypants}} + <p class="foot">page: {{object.page}} {% if object.location %}<small>kindle location: {{object.location|cut:"["|cut:"]"}}</small>{%endif%}</p> </article> {% endfor %} </div> |