diff --git a/template/pagetype-doc.html.jinja b/template/pagetype-doc.html.jinja index 12fd9ff176..27f3a64f1e 100644 --- a/template/pagetype-doc.html.jinja +++ b/template/pagetype-doc.html.jinja @@ -15,12 +15,21 @@ new ClipboardJS('.clipboard-btn'); }); - {# temp styling for testing. Need to cleanup #} + {# temp styling for testing. #} {% endblock %} diff --git a/tool/filter_copy_code_to_clipboard.py b/tool/filter_copy_code_to_clipboard.py index 950e0ccfbf..6ff346248e 100644 --- a/tool/filter_copy_code_to_clipboard.py +++ b/tool/filter_copy_code_to_clipboard.py @@ -31,9 +31,12 @@ def filter_soup(soup, **kwargs): codeBlock["id"] = codeBlock_id # Add copy button new_tag = soup.new_tag('button', id=codeBlock_id+'button') - new_tag.append("Copy to clipboard") #TODO: localize + icon = soup.new_tag('i') + icon['class'] = "fa fa-clipboard" new_tag['class'] = "clipboard-btn" + new_tag['alt'] = "Copy to clipboard" new_tag['data-clipboard-target'] = "#"+codeBlock_id + new_tag.insert(0, icon) code_block.insert(0, new_tag) # index1 += 1