CSS fix
This commit is contained in:
parent
e22061fc84
commit
4b6ba43c42
3 changed files with 31 additions and 11 deletions
|
@ -280,12 +280,18 @@ function registerPopper($trigger, $dropdown) {
|
|||
function populateCopyButton() {
|
||||
var copyButton;
|
||||
$('pre code').each(function () {
|
||||
var copyButton = $('<span>', {
|
||||
'class': 'btn-clipboard',
|
||||
'data-clipboard-text': $(this).text(),
|
||||
'title': 'Click to copy'
|
||||
}).append('<i class="fa fa-copy"></i>');
|
||||
|
||||
if ($(this).parent().width() > 100) {
|
||||
copyButton.append('<span style="margin-left: 2px">Copy</span>');
|
||||
}
|
||||
|
||||
$(this).before($('<div>', {'class': 'copy-clipboard'})
|
||||
.append(copyButton = $('<span>', {
|
||||
'class': 'btn-clipboard',
|
||||
'data-clipboard-text': $(this).text(),
|
||||
'title': 'Click to copy'
|
||||
}).append('<i class="fa fa-copy"></i><span style="margin-left: 2px">Copy</span>')));
|
||||
.append(copyButton));
|
||||
|
||||
$(copyButton.get(0)).mouseleave(function () {
|
||||
$(this).attr('class', 'btn-clipboard');
|
||||
|
|
|
@ -173,7 +173,7 @@ pre {
|
|||
|
||||
@media (min-width: 800px) {
|
||||
.content-description pre:has(code) {
|
||||
min-width: 20em;
|
||||
min-width: 3em;
|
||||
}
|
||||
#common-content {
|
||||
display: flex;
|
||||
|
|
|
@ -78,11 +78,19 @@
|
|||
</form>
|
||||
{% endif %}
|
||||
<div style="clear: both"></div>
|
||||
<div class="content-description">
|
||||
{% cache 3600 'contest_html' contest.id MATH_ENGINE %}
|
||||
{{ contest.description|markdown|reference|str|safe }}
|
||||
{% endcache %}
|
||||
</div>
|
||||
|
||||
{% if contest.is_organization_private %}
|
||||
{% for org in contest.organizations.all() %}
|
||||
<div style="margin-bottom: 1em;">
|
||||
<span class="contest-tag contest-tag-org">
|
||||
<a href="{{ org.get_absolute_url() }}">
|
||||
<i class="fa fa-lock"></i> {{ org.name }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if editable_organizations or is_clonable %}
|
||||
<div style="display: flex; gap: 0.5em;">
|
||||
{% for org in editable_organizations %}
|
||||
|
@ -96,6 +104,12 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div style="padding: 0 1em;">
|
||||
{% cache 3600 'contest_html' contest.id MATH_ENGINE %}
|
||||
{{ contest.description|markdown|reference|str|safe }}
|
||||
{% endcache %}
|
||||
</div>
|
||||
|
||||
{% if contest.ended or request.user.is_superuser or is_editor or is_tester %}
|
||||
<hr>
|
||||
<div class="contest-problems">
|
||||
|
|
Loading…
Reference in a new issue