Fix css on darkmode

This commit is contained in:
cuom1999 2023-01-11 22:07:35 -06:00
parent e09c28031b
commit d344282425
6 changed files with 1477 additions and 13 deletions

View file

@ -38,6 +38,15 @@ else:
super(PagedownWidget, self).__init__(*args, **kwargs)
class Media:
extend = False
js = [
"pagedown/Markdown.Converter.js",
"pagedown-extra/pagedown/Markdown.Converter.js",
"pagedown/Markdown.Sanitizer.js",
"pagedown/Markdown.Editor.js",
"pagedown-extra/Markdown.Extra.js",
"pagedown_init.js",
]
css = {
"all": [
"markdown.css",

View file

@ -104,8 +104,7 @@ class Select2Mixin(object):
https://docs.djangoproject.com/en/1.8/topics/forms/media/#media-as-a-dynamic-property
"""
return forms.Media(
js=[DEFAULT_SELECT2_JS, "django_select2.js"],
css={"screen": [DEFAULT_SELECT2_CSS]},
js=["django_select2.js"],
)

View file

@ -21,9 +21,3 @@ sass resources:sass_processed
echo
postcss "${FILES[@]}" --verbose --use autoprefixer -d resources
cp sass_processed/pagedown_widget.css resources/pagedown_widget.css
cp sass_processed/dmmd-preview.css resources/dmmd-preview.css
cp resources/pagedown_widget.css resources/pagedown/demo/browser/demo.css

File diff suppressed because it is too large Load diff

View file

@ -171,3 +171,54 @@
.wmd-preview:empty {
display: none;
}
/* Extra styles to allow for image upload */
.pagedown-image-upload {
display: none;
z-index: 10001;
position: fixed;
background: white;
top: 50%;
left: 50%;
padding: 10px;
width: 400px;
max-width: 90%;
transform: translate3d(-50%, -50%, 0);
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.5);
}
.pagedown-image-upload .submit-row {
margin: 10px 0 0 0;
}
.pagedown-image-upload.show {
display: block;
}
.pagedown-image-upload .submit-loading {
display: none;
vertical-align: middle;
border: 4px solid #f3f3f3; /* Light grey */
border-top: 4px solid #79aec8; /* Blue */
border-radius: 50%;
width: 24px;
height: 24px;
animation: spin 1s linear infinite;
}
.pagedown-image-upload .submit-loading.show {
display: inline-block;
}
.pagedown-image-upload .submit-input {
display: none;
}
.pagedown-image-upload .submit-input.show {
display: inline-block;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

View file

@ -220,10 +220,10 @@
{% endif %}
</form>
{% if active_participations %}
<h4 class="toggle open">
<h3 class="toggle open contest-group-header">
<i class="fa fa-chevron-right fa-fw"></i>
{{ _('Active Contests') }}
</h4>
</h3>
<div class="toggled">
<table class="contest-list table striped">
<thead>