diff --git a/static/assets/icons/16-warn.svg b/static/assets/icons/16-warn.svg new file mode 100644 index 0000000000..91931ce222 --- /dev/null +++ b/static/assets/icons/16-warn.svg @@ -0,0 +1,7 @@ + diff --git a/static/styles/docs.css b/static/styles/docs.css index b25cd430ab..830843b0d4 100644 --- a/static/styles/docs.css +++ b/static/styles/docs.css @@ -528,6 +528,15 @@ h1 .pill { margin-bottom: -3px } +.deprecation { + align-items: baseline; +} + +.deprecation svg { + margin-bottom: -4px; + padding: 0; +} + .tooltip-context { position: relative } diff --git a/templates/func_template.html.j2 b/templates/func_template.html.j2 index 1d3b95710e..2e1b3e7571 100644 --- a/templates/func_template.html.j2 +++ b/templates/func_template.html.j2 @@ -3,8 +3,17 @@ {% extends "base_template.html.j2" %} {% block content %} -
{{ body['content']['name'] }}{% if body['content']['element'] %}{{
- macros.tooltip_display('Element', 'Element functions can be customized with set and show rules.') }}{% endif %}{{ body['content']['name'] }}
+
+ {% if body['content']['element'] %}
+ {{ macros.tooltip_display('Element', 'Element functions can be customized with set and show rules.') }}
+ {% endif %}
+ {% if body['content']['contextual'] %}
+ {{ macros.tooltip_display('Contextual', 'Contextual functions can only be used when the context is known') }}
+ {% endif %}
+
+{{ method['name'] }}{{ method['name'] }}
+
+
+ {% if method['element'] %}
+ {{ macros.tooltip_display('Element', 'Element functions can be customized with set and show rules.') }}
+ {% endif %}
+ {% if method['contextual'] %}
+ {{ macros.tooltip_display('Contextual', 'Contextual functions can only be used when the context is known') }}
+ {% endif %}
+
+ {% if method['deprecation'] %}
+
+ {{ method['name'] }}{{ method['name'] }}
+
+ {% if method['element'] %}
+ {{ macros.tooltip_display('Element', 'Element functions can be customized with set and show rules.') }}
+ {% endif %}
+ {% if method['contextual'] %}
+ {{ macros.tooltip_display('Contextual', 'Contextual functions can only be used when the context is known') }}
+ {% endif %}
+
+