Add copy button to submission source

This commit is contained in:
cuom1999 2021-11-07 20:06:03 -06:00
parent d42d47a674
commit 2f50c7e218
2 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{% extends "base.html" %} {% extends "common-content.html" %}
{% block header %} {% block header %}
<span class="submission-info"> <span class="submission-info">

View file

@ -17,6 +17,10 @@
a:active .line .highlighter { a:active .line .highlighter {
background: rgba(255, 212, 0, 0.48); background: rgba(255, 212, 0, 0.48);
} }
.copy-clipboard {
margin-top: 0;
}
</style> </style>
{% endblock %} {% endblock %}
@ -41,9 +45,9 @@
<hr> <hr>
<br> <br>
<div class="source-wrap"> <div class="source-wrap">
<table> <table style="width: 100%">
<tr> <tr>
<td class="source-ln"> <td class="source-ln" style="width: 0">
<div> <div>
{% for line in raw_source.split('\n') %} {% for line in raw_source.split('\n') %}
<a href="#line-{{ loop.index }}" name="line-{{ loop.index }}"> <a href="#line-{{ loop.index }}" name="line-{{ loop.index }}">