changeset 6ab002a97dde in bugs.tryton.org:default
details: https://hg.tryton.org/bugs.tryton.org?cmd=changeset;node=6ab002a97dde
description:
        Add margin to anchor for fixed navbar and highlight the target message
diffstat:

 html/issue.item.html |   3 ++-
 static/style.css     |  12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diffs (42 lines):

diff -r f6f98aafff14 -r 6ab002a97dde html/issue.item.html
--- a/html/issue.item.html      Wed Oct 21 19:05:36 2020 +0200
+++ b/html/issue.item.html      Thu Oct 22 12:13:09 2020 +0200
@@ -80,7 +80,8 @@
     <h4>Messages</h4>
     {% for msg in context.messages.reverse() %}
       {% if msg.author.username not in bots %}
-      <div class="row row-cols-1 row-cols-md-4 mt-4" id="msg{{ msg.id }}">
+      <div class="anchor"  id="msg{{ msg.id }}"></div>
+      <div class="row row-cols-1 row-cols-md-4 mt-4">
         <div class="col col-md-auto">
           <a href='issue{{ context.id }}#msg{{ msg.id }}'>msg{{msg.id}}</a>
           <a href='msg{{ msg.id }}'>(view)</a>
diff -r f6f98aafff14 -r 6ab002a97dde static/style.css
--- a/static/style.css  Wed Oct 21 19:05:36 2020 +0200
+++ b/static/style.css  Thu Oct 22 12:13:09 2020 +0200
@@ -85,6 +85,10 @@
   margin-bottom: 0;
 }
 
+:target + div + div .msg {
+  background-color: #ffc107;
+}
+
 blockquote {
   display: block;
   background: #e8e8e8;
@@ -116,6 +120,14 @@
   border-color: #6e747a;
 }
 
+.anchor {
+  display:block;
+  margin-top:-100px;
+  padding-bottom:100px;
+  position:relative;
+  visibility:hidden;
+}
+
 @media (max-width: 767.98px) {
   .history {
     display: block;

Reply via email to