Add support for documentation tooltips
commit622fdea660c2d613fdf4b16c433b38d0abad8680
authorMatilde Park <matilde@park.computer>
dateTue 6 Aug 2019, 09:24 (7 years ago)
parentc0ff06a
static/scripts.js+4−1
@@ -340,4 +340,7 @@ let docsNavScroll = function() {
340340 }
341341}
342342
343−if (window.location.href.includes("docs")) docsNavScroll();
343+if (window.location.href.includes("docs")) {
344+ docsNavScroll();
345+ tippy('.tooltip')
346+}
templates/base.html+2
@@ -35,6 +35,8 @@
3535 {% if config.build_search_index %}
3636 <script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") | safe }}"></script>
3737 <script type="text/javascript" src="{{ get_url(path="search_index.en.js") | safe }}"></script>
38+ <script src="https://unpkg.com/popper.js@1"></script>
39+ <script src="https://unpkg.com/tippy.js@4"></script>
3840 {% endif %}
3941 <script src="{{ config.base_url }}/scripts.js"></script>
4042 </body>