Use buck rule for ReleaseNotes instead of Makefile
This eliminates the last Makefile in our code base.
Also change the section style within ReleaseNotes from asciidoc style to
asciidoctor style.
Also I feel that put images/link.png under ReleaseNotes and deal with
all the resource packing is too stupid, so I used the unicode emoji
instead of the picture ("🔗"). If this is too crazy, we can also use "#"
instead :) This also affects documentation rendering.
Other side effects:
1. The css of release notes switched from default asciidoc css into
default asciidoctor css.
2. The section anchors for ReleaseNotes/index.html changed from "2_13"
to "s2_13", because asciidoctorj is unhappy with anchors without
letters.
Change-Id: I4adf2ce090385cc6b699445012f10a009892aaac
This commit is contained in:
committed by
David Pursehouse
parent
251443314d
commit
4f5ad9d313
@@ -171,11 +171,14 @@ LINK_SCRIPT = """
|
||||
a.setAttribute('href', '#' + id);
|
||||
a.setAttribute('style', 'position: absolute;'
|
||||
+ ' left: ' + (element.offsetLeft - 16 - 2 * 4) + 'px;'
|
||||
+ ' padding-left: 4px; padding-right: 4px; padding-top:4px;');
|
||||
var img = document.createElement('img');
|
||||
img.setAttribute('src', 'images/link.png');
|
||||
img.setAttribute('style', 'background-color: #FFFFFF;');
|
||||
a.appendChild(img);
|
||||
+ ' padding-left: 4px; padding-right: 4px;');
|
||||
var span = document.createElement('span');
|
||||
span.setAttribute('style', 'height: ' + element.offsetHeight + 'px;'
|
||||
+ ' display: inline-block; vertical-align: baseline;'
|
||||
+ ' font-size: 16px; text-decoration: none; color: grey;');
|
||||
a.appendChild(span);
|
||||
var link = document.createTextNode('🔗');
|
||||
span.appendChild(link);
|
||||
element.insertBefore(a, element.firstChild);
|
||||
|
||||
// remove the link icon when the mouse is moved away,
|
||||
@@ -183,14 +186,16 @@ LINK_SCRIPT = """
|
||||
hide = function(evt) {
|
||||
if (document.elementFromPoint(evt.clientX, evt.clientY) != element
|
||||
&& document.elementFromPoint(evt.clientX, evt.clientY) != a
|
||||
&& document.elementFromPoint(evt.clientX, evt.clientY) != img
|
||||
&& document.elementFromPoint(evt.clientX, evt.clientY) != span
|
||||
&& document.elementFromPoint(evt.clientX, evt.clientY) != link
|
||||
&& element.contains(a)) {
|
||||
element.removeChild(a);
|
||||
}
|
||||
}
|
||||
element.onmouseout = hide;
|
||||
a.onmouseout = hide;
|
||||
img.onmouseout = hide;
|
||||
span.onmouseout = hide;
|
||||
link.onmouseout = hide;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user