diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-01-15 19:32:56 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-01-19 15:51:16 +0000 |
commit | 9232c62b050f5b9371b3c74dfe57e87ad186b9c9 (patch) | |
tree | 0eba0334066bf38796392f314366f712da519f06 | |
parent | 3d5e0210feacf96e21e1916ab0df84b83f5f05e2 (diff) |
Pad internal update links so they are in view.
Fixes #1308.
-rw-r--r-- | templates/web/base/report/update.html | 2 | ||||
-rw-r--r-- | web/cobrands/sass/_layout.scss | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html index 66e698606..a09913d39 100644 --- a/templates/web/base/report/update.html +++ b/templates/web/base/report/update.html @@ -28,6 +28,7 @@ <p class="meta-2"> [% INCLUDE meta_line %] </p> </div> [% ELSE %] + <a name="update_[% update.id %]" class="internal-link-fixed-header"></a> [% INCLUDE 'report/photo.html' object=update %] <div class="item-list__update-text"> <div class="moderate-display"> @@ -44,7 +45,6 @@ [% END %] <p class="meta-2"> - <a name="update_[% update.id %]"></a> [% INCLUDE meta_line %] [% mlog = update.latest_moderation_log_entry(); IF mlog %] <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %] diff --git a/web/cobrands/sass/_layout.scss b/web/cobrands/sass/_layout.scss index a2dd1a8a0..96b3d2aec 100644 --- a/web/cobrands/sass/_layout.scss +++ b/web/cobrands/sass/_layout.scss @@ -3,6 +3,14 @@ $image-sprite: '/cobrands/fixmystreet/images/sprite.png' !default; +.internal-link-fixed-header { + display: block; + /* 5em is roughly the height of .nav-wrapper-2 (4em) plus the border-top on + .nav-wrapper-2 (4px), plus the padding-top on .item-list__item (0.5em). */ + padding-top: 5em; + margin-top: -5em; +} + //hacks for desk/mob only stuff .desk-only { display: block; |