Use css for darkmode

This commit is contained in:
cuom1999 2022-12-18 03:31:31 -06:00
parent de875bd384
commit 97a56145b2
62 changed files with 6748 additions and 1034 deletions

View file

@ -263,6 +263,7 @@ MIDDLEWARE = (
"impersonate.middleware.ImpersonateMiddleware",
"judge.middleware.DMOJImpersonationMiddleware",
"judge.middleware.ContestMiddleware",
"judge.middleware.DarkModeMiddleware",
"django.contrib.flatpages.middleware.FlatpageFallbackMiddleware",
"judge.social_auth.SocialAuthExceptionMiddleware",
"django.contrib.redirects.middleware.RedirectFallbackMiddleware",

View file

@ -212,6 +212,7 @@ urlpatterns = [
name="home",
),
url(r"^500/$", exception),
url(r"^toggle_darkmode/$", user.toggle_darkmode, name="toggle_darkmode"),
url(r"^admin/", admin.site.urls),
url(r"^i18n/", include("django.conf.urls.i18n")),
url(r"^accounts/", include(register_patterns)),

View file

@ -31,7 +31,6 @@ from judge.widgets import (
AdminSelect2Widget,
CheckboxSelectMultipleWithSelectAll,
HeavyPreviewAdminPageDownWidget,
HeavyPreviewPageDownWidget,
)
MEMORY_UNITS = (("KB", "KB"), ("MB", "MB"))

View file

@ -8,3 +8,4 @@ def finished_submission(sub):
keys += ["contest_complete:%d" % participation.id]
keys += ["contest_attempted:%d" % participation.id]
cache.delete_many(keys)

View file

@ -70,3 +70,15 @@ class ContestMiddleware(object):
request.participation = None
request.in_contest_mode = request.in_contest and request.contest_mode
return self.get_response(request)
class DarkModeMiddleware(object):
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
if "darkmode" in request.GET:
return HttpResponseRedirect(
reverse("toggle_darkmode") + "?next=" + urlquote(request.path)
)
return self.get_response(request)

View file

@ -22,6 +22,7 @@ def get_resource(request):
scheme = "https"
else:
scheme = "http"
return {
"PYGMENT_THEME": settings.PYGMENT_THEME,
"INLINE_JQUERY": settings.INLINE_JQUERY,
@ -30,6 +31,7 @@ def get_resource(request):
"FONTAWESOME_CSS": settings.FONTAWESOME_CSS,
"DMOJ_SCHEME": scheme,
"DMOJ_CANONICAL": settings.DMOJ_CANONICAL,
"use_darkmode": request.session.get("darkmode", False) == True,
}

View file

@ -623,3 +623,11 @@ def sample_import_users(request):
response = HttpResponse(content, content_type="text/plain")
response["Content-Disposition"] = "attachment; filename={0}".format(filename)
return response
def toggle_darkmode(request):
path = request.GET.get("next")
if not path:
return HttpResponseBadRequest()
request.session["darkmode"] = not request.session.get("darkmode", False)
return HttpResponseRedirect(path)

View file

@ -40,7 +40,6 @@ else:
class Media:
css = {
"all": [
"pagedown_widget.css",
"markdown.css",
]
}
@ -49,6 +48,7 @@ else:
class Media:
css = {
"all": [
"pagedown_widget.css",
"content-description.css",
"admin/css/pagedown.css",
"markdown.css",
@ -104,7 +104,6 @@ else:
}
class Media:
css = {"all": ["dmmd-preview.css"]}
js = ["dmmd-preview.js"]
class HeavyPreviewAdminPageDownWidget(
@ -117,5 +116,6 @@ else:
"table.css",
"ranks.css",
"markdown.css",
"dmmd-preview.css",
]
}

View file

@ -21,3 +21,9 @@ 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

View file

@ -782,7 +782,7 @@ math {
}
.featherlight {
z-index: 1000;
z-index: 1000 !important;
}
select {
@ -799,6 +799,60 @@ select {
.notification-open #notification {
color: green !important;
}
.title-row {
color: #393630;
display: inline;
}
.gray {
color: gray;
}
.white {
color: white;
}
.black {
color: black;
}
.red {
color: red;
}
.green {
color: green;
}
.grayed {
color: #666;
}
.darkcyan {
color: darkcyan;
}
.peru {
color: peru;
}
.blue {
color: blue;
}
.background-d6e8f7 {
background-color: d6e8f7;
}
.background-bisque {
background-color: bisque;
}
.background-footer {
color: #808080;
}
@media (max-width: 799px) {
#user-links, .anon {
padding-right: 0.5em;

View file

@ -187,6 +187,42 @@
color: white;
}
.chat {
.active-span {
margin-top: 1em;
margin-right: 1em;
color: #636363;
}
.unread-count {
float: right;
color: white;
background-color: darkcyan;
border-radius: 2px;
padding: 0 0.5em;
}
#setting-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
right: 0;
}
#setting-content li {
padding: 12px 16px;
text-decoration: none;
display: block;
color: black;
font-weight: bold;
}
#setting-content li:hover {
background-color: #ddd;
cursor: pointer;
}
}
@media (max-width: 799px) {
#chat-area {
height: 500px;

View file

@ -21,6 +21,106 @@ a {
h2 {
margin-bottom: 20px;
}
.revision-text p:first-child {
margin-top: 0;
}
.revision-text p:last-child {
margin-bottom: 0;
}
.featherlight-edit .featherlight-content {
background: #FAFAFA;
padding: 10px 15px 10px 10px;
border-radius: 10px;
border: 1px solid #CCC;
}
.new-comments .comment-display {
display: flex;
margin-top: -0.25em !important;
padding-left: 1em;
padding-top: 0.5em !important;
border: 1px solid #ccc;
background: #fafafa;
}
.new-comments .comment .detail {
margin: 0px 15px 0px;
width: 100%;
max-width: calc(100% - 134px);
}
.new-comments .comment-edits {
padding-right: 0.75em;
}
.new-comments .comment .detail .header {
display: flex;
flex-wrap: wrap;
padding: 2px 0px;
font-weight: normal;
border-bottom: 1px #888 solid;
color: #888;
text-align: right;
}
.previous-revision, .next-revision {
color: #444;
}
.new-comments .header i {
color: #888 !important;
}
.new-comments .info {
padding-top: 0.4em;
display: flex;
}
.new-comments .gravatar {
width: 75px;
max-width: 75px;
}
.new-comments .vote {
margin-right: 1em;
height: 75px;
padding-top: 0.4em;
}
.new-comments .comment-display {
border-radius: 4px;
}
.new-comments .comment:target > .comment-display {
border: 1px solid #2980b9;
border-left: 10px solid #2980b9;
padding-left: 5px;
}
.comments.top-level-comments {
margin-bottom: -3px;
}
.bad-comment {
opacity: 0.3;
}
.bad-comment:hover {
opacity: 1;
/* This is necessary to prevent random flickering */
-webkit-transform: translatez(0);
-moz-transform: translatez(0);
-ms-transform: translatez(0);
-o-transform: translatez(0);
transform: translatez(0);
}
.reply-comment {
margin: -50px 23px 10px -40px;
padding-top: 50px;
}
}
.no-comments-message {
@ -133,3 +233,48 @@ a {
.comment-body {
word-wrap: break-word;
}
.actionbar {
display: flex;
.actionbar-button {
cursor: pointer;
padding: 0.8em;
border: 0.2px solid lightgray;
border-radius: 5em;
font-weight: bold;
display: inherit;
}
.actionbar-block {
display: flex;
flex: 1;
justify-content: center;
}
.pagevote-score {
margin-right: 0.3em;
}
.like-button {
padding-right: 0.5em;
border-radius: 5em 0 0 5em;
}
.actionbar-button:hover {
background: lightgray;
}
.dislike-button {
padding-left: 0.5em;
border-radius: 0 5em 5em 0;
border-left: 0;
}
.like-button.voted {
color: blue;
}
.dislike-button.voted {
color: red;
}
.actionbar-text {
padding-left: 0.4em;
}
.bookmarked {
color: rgb(180, 180, 7);
}
}

View file

@ -403,16 +403,4 @@ $(function() {
$('html').click(function () {
$nav_list.hide();
});
$('#nav-darkmode-icon').on('click', function() {
if (localStorage.getItem("darkmode") === "true") {
localStorage.setItem("darkmode", "false");
DarkReader.disable();
}
else {
localStorage.setItem("darkmode", "true");
DarkReader.enable();
}
})
});

View file

@ -118,6 +118,12 @@
}
}
.time-left {
text-align: left;
color: #777;
padding-top: 0.5em;
}
.contest-list {
td {
vertical-align: middle !important;
@ -157,6 +163,12 @@
vertical-align: top;
}
.contest-tag-hidden {
background-color: #000000;
color: #ffffff;
}
.participate-button {
display: inline-block;
width: 90px;
@ -168,6 +180,10 @@
}
}
.first-solve {
background: #00f9a1;
}
.contest-tag {
box-shadow: inset 0 -0.1em 0 rgba(0, 0, 0, 0.12);
padding: 0.15em 0.3em;
@ -177,11 +193,37 @@
position: relative;
}
.contest-tag-edit {
background-color: green
}
.contest-tag-private {
background-color: #666666;
color: #ffffff;
}
.contest-tag-org {
background-color: #cccccc;
a {
color: #000000;
}
}
.contest-tag-rated {
background-color: #e54c14;
color: #ffffff;
}
.contest-list-title {
font-size: 18px;
font-weight: 600;
}
.contest-list-sort {
color: #7dc7ff;
}
form.contest-join-pseudotab {
display: inline;
line-height: 1.7em;
@ -207,3 +249,12 @@ form.contest-join-pseudotab {
padding: 0 5px;
}
#add-clarification {
float: left;
color: chartreuse;
}
#add-clarification:hover {
color: cyan;
}

5408
resources/darkmode.css Normal file

File diff suppressed because one or more lines are too long

View file

@ -39,3 +39,5 @@ div.dmmd-no-button:not(.dmmd-preview-has-content) {
div.dmmd-preview-stale {
background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #f8f8f8 10px, #f8f8f8 20px);
}
/*# sourceMappingURL=dmmd-preview.css.map */

View file

@ -0,0 +1,41 @@
div.dmmd-preview {
padding: 0;
}
div.dmmd-preview-update {
background: #ccc;
color: #333;
text-align: center;
cursor: pointer;
border-radius: 4px;
height: 2em;
line-height: 2em;
}
div.dmmd-preview-content {
padding: 0 7px;
}
div.dmmd-preview.dmmd-preview-has-content div.dmmd-preview-update {
border-radius: 4px 4px 0 0;
}
div.dmmd-preview-has-content div.dmmd-preview-content {
padding-bottom: 7px;
}
div.dmmd-no-button div.dmmd-preview-update {
display: none;
}
div.dmmd-no-button div.dmmd-preview-content {
padding-bottom: 0;
}
div.dmmd-no-button:not(.dmmd-preview-has-content) {
display: none;
}
div.dmmd-preview-stale {
background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #f8f8f8 10px, #f8f8f8 20px);
}

View file

@ -27,3 +27,23 @@
.org-field-wrapper:has(> input[type=checkbox]) {
display: contents;
}
.organization-row {
display: block;
padding: 0.5em;
border-bottom: 1px gray solid;
border-top: none;
color: black;
font-weight: 500;
display: flex;
align-items: center;
}
.organization-row:hover {
background-color: #f3f3f3;
}
.organization-container {
border: 1px gray solid;
margin-bottom: 3em;
}

View file

@ -1,14 +1,7 @@
body
{
background-color: White;
}
.wmd-panel
{
margin-left: 25%;
margin-right: 25%;
width: 50%;
min-width: 500px;
.wmd-panel {
margin: 0;
width: 100%;
min-width: 0;
}
.wmd-button-bar {
@ -49,69 +42,77 @@ body
}
.wmd-bold-button {
background-image: url("pagedown/resources/bold.svg");
background-image: url("/static/pagedown/resources/bold.svg");
}
.wmd-italic-button {
background-image: url("pagedown/resources/italic.svg");
background-image: url("/static/pagedown/resources/italic.svg");
}
.wmd-latex-button {
background-image: url("pagedown/resources/latex.svg");
background-image: url("/static/pagedown/resources/latex.svg");
}
.wmd-latex-button-display {
background-image: url("pagedown/resources/latex-display.svg");
background-image: url("/static/pagedown/resources/latex-display.svg");
}
.wmd-link-button {
background-image: url("pagedown/resources/link.svg");
background-image: url("/static/pagedown/resources/link.svg");
}
.wmd-user-reference-button {
background-image: url("pagedown/resources/user.svg");
background-image: url("/static/pagedown/resources/user.svg");
}
.wmd-quote-button {
background-image: url("pagedown/resources/blockquote.svg");
background-image: url("/static/pagedown/resources/blockquote.svg");
}
.wmd-code-button {
background-image: url("pagedown/resources/code.svg");
background-image: url("/static/pagedown/resources/code.svg");
}
.wmd-image-button {
background-image: url("pagedown/resources/image.svg");
background-image: url("/static/pagedown/resources/image.svg");
}
.wmd-olist-button {
background-image: url("pagedown/resources/olist.svg");
background-image: url("/static/pagedown/resources/olist.svg");
background-size: 18px;
}
.wmd-ulist-button {
background-image: url("pagedown/resources/ulist.svg");
background-image: url("/static/pagedown/resources/ulist.svg");
background-size: 18px;
}
.wmd-heading-button {
background-image: url("pagedown/resources/heading.svg");
background-image: url("/static/pagedown/resources/heading.svg");
}
.wmd-hr-button {
background-image: url("pagedown/resources/hr.svg");
background-image: url("/static/pagedown/resources/hr.svg");
}
.wmd-undo-button {
background-image: url("pagedown/resources/undo.svg");
background-image: url("/static/pagedown/resources/undo.svg");
background-size: 18px;
}
.wmd-redo-button {
background-image: url("pagedown/resources/redo.svg");
background-image: url("/static/pagedown/resources/redo.svg");
background-size: 18px;
}
.wmd-admonition-button {
background-image: url("/static/pagedown/resources/admonition.svg");
}
.wmd-spoiler-button {
background-image: url("/static/pagedown/resources/spoiler.svg");
}
.wmd-button-active:hover {
background-color: lightgray;
}
@ -120,8 +121,7 @@ body
filter: invert(88%) sepia(1%) saturate(0%) hue-rotate(278deg) brightness(98%) contrast(91%);
}
.wmd-spacer
{
.wmd-spacer {
display: inline-flex;
width: 20px;
}
@ -140,12 +140,12 @@ body
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog > form > input[type="text"] {
.wmd-prompt-dialog > form > input[type=text] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog > form > input[type="button"] {
.wmd-prompt-dialog > form > input[type=button] {
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
@ -170,3 +170,5 @@ body
.wmd-preview:empty {
display: none;
}
/*# sourceMappingURL=pagedown_widget.css.map */

View file

@ -42,75 +42,75 @@
}
.wmd-bold-button {
background-image: url("pagedown/resources/bold.svg");
background-image: url("/static/pagedown/resources/bold.svg");
}
.wmd-italic-button {
background-image: url("pagedown/resources/italic.svg");
background-image: url("/static/pagedown/resources/italic.svg");
}
.wmd-latex-button {
background-image: url("pagedown/resources/latex.svg");
background-image: url("/static/pagedown/resources/latex.svg");
}
.wmd-latex-button-display {
background-image: url("pagedown/resources/latex-display.svg");
background-image: url("/static/pagedown/resources/latex-display.svg");
}
.wmd-link-button {
background-image: url("pagedown/resources/link.svg");
background-image: url("/static/pagedown/resources/link.svg");
}
.wmd-user-reference-button {
background-image: url("pagedown/resources/user.svg");
background-image: url("/static/pagedown/resources/user.svg");
}
.wmd-quote-button {
background-image: url("pagedown/resources/blockquote.svg");
background-image: url("/static/pagedown/resources/blockquote.svg");
}
.wmd-code-button {
background-image: url("pagedown/resources/code.svg");
background-image: url("/static/pagedown/resources/code.svg");
}
.wmd-image-button {
background-image: url("pagedown/resources/image.svg");
background-image: url("/static/pagedown/resources/image.svg");
}
.wmd-olist-button {
background-image: url("pagedown/resources/olist.svg");
background-image: url("/static/pagedown/resources/olist.svg");
background-size: 18px;
}
.wmd-ulist-button {
background-image: url("pagedown/resources/ulist.svg");
background-image: url("/static/pagedown/resources/ulist.svg");
background-size: 18px;
}
.wmd-heading-button {
background-image: url("pagedown/resources/heading.svg");
background-image: url("/static/pagedown/resources/heading.svg");
}
.wmd-hr-button {
background-image: url("pagedown/resources/hr.svg");
background-image: url("/static/pagedown/resources/hr.svg");
}
.wmd-undo-button {
background-image: url("pagedown/resources/undo.svg");
background-image: url("/static/pagedown/resources/undo.svg");
background-size: 18px;
}
.wmd-redo-button {
background-image: url("pagedown/resources/redo.svg");
background-image: url("/static/pagedown/resources/redo.svg");
background-size: 18px;
}
.wmd-admonition-button {
background-image: url("pagedown/resources/admonition.svg");
background-image: url("/static/pagedown/resources/admonition.svg");
}
.wmd-spoiler-button {
background-image: url("pagedown/resources/spoiler.svg");
background-image: url("/static/pagedown/resources/spoiler.svg");
}
.wmd-button-active:hover {
@ -121,8 +121,7 @@
filter: invert(88%) sepia(1%) saturate(0%) hue-rotate(278deg) brightness(98%) contrast(91%);
}
.wmd-spacer
{
.wmd-spacer {
display: inline-flex;
width: 20px;
}
@ -141,12 +140,12 @@
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog > form > input[type="text"] {
.wmd-prompt-dialog > form > input[type=text] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog > form > input[type="button"] {
.wmd-prompt-dialog > form > input[type=button] {
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
@ -171,3 +170,5 @@
.wmd-preview:empty {
display: none;
}
/*# sourceMappingURL=pagedown_widget.css.map */

View file

@ -0,0 +1,173 @@
.wmd-panel {
margin: 0;
width: 100%;
min-width: 0;
}
.wmd-button-bar {
width: 100%;
background-color: white;
}
.wmd-input {
height: 300px;
width: 100%;
background: #fff;
border: 1px solid DarkGray;
font-family: Consolas, "Liberation Mono", Monaco, "Courier New", monospace !important;
}
.wmd-preview {
background: none;
word-wrap: break-word;
}
.wmd-button-row {
margin: 10px 5px 5px;
padding: 0;
}
.wmd-button {
display: inline-flex;
list-style: none;
width: 20px;
height: 20px;
background-repeat: no-repeat;
background-size: 14px 14px;
background-position: center;
border-radius: 3px;
cursor: pointer;
padding-left: 2px;
padding-right: 3px;
}
.wmd-bold-button {
background-image: url("/static/pagedown/resources/bold.svg");
}
.wmd-italic-button {
background-image: url("/static/pagedown/resources/italic.svg");
}
.wmd-latex-button {
background-image: url("/static/pagedown/resources/latex.svg");
}
.wmd-latex-button-display {
background-image: url("/static/pagedown/resources/latex-display.svg");
}
.wmd-link-button {
background-image: url("/static/pagedown/resources/link.svg");
}
.wmd-user-reference-button {
background-image: url("/static/pagedown/resources/user.svg");
}
.wmd-quote-button {
background-image: url("/static/pagedown/resources/blockquote.svg");
}
.wmd-code-button {
background-image: url("/static/pagedown/resources/code.svg");
}
.wmd-image-button {
background-image: url("/static/pagedown/resources/image.svg");
}
.wmd-olist-button {
background-image: url("/static/pagedown/resources/olist.svg");
background-size: 18px;
}
.wmd-ulist-button {
background-image: url("/static/pagedown/resources/ulist.svg");
background-size: 18px;
}
.wmd-heading-button {
background-image: url("/static/pagedown/resources/heading.svg");
}
.wmd-hr-button {
background-image: url("/static/pagedown/resources/hr.svg");
}
.wmd-undo-button {
background-image: url("/static/pagedown/resources/undo.svg");
background-size: 18px;
}
.wmd-redo-button {
background-image: url("/static/pagedown/resources/redo.svg");
background-size: 18px;
}
.wmd-admonition-button {
background-image: url("/static/pagedown/resources/admonition.svg");
}
.wmd-spoiler-button {
background-image: url("/static/pagedown/resources/spoiler.svg");
}
.wmd-button-active:hover {
background-color: lightgray;
}
.wmd-button-inactive {
filter: invert(88%) sepia(1%) saturate(0%) hue-rotate(278deg) brightness(98%) contrast(91%);
}
.wmd-spacer
{
display: inline-flex;
width: 20px;
}
.wmd-prompt-background {
background-color: Black;
}
.wmd-prompt-dialog {
border: 1px solid #999999;
background-color: #F5F5F5;
}
.wmd-prompt-dialog > div {
font-size: 0.8em;
font-family: arial, helvetica, sans-serif;
}
.wmd-prompt-dialog > form > input[type="text"] {
border: 1px solid #999999;
color: black;
}
.wmd-prompt-dialog > form > input[type="button"] {
border: 1px solid #888888;
font-family: trebuchet MS, helvetica, sans-serif;
font-size: 0.8em;
font-weight: bold;
}
.wmd-wrapper {
padding-right: 0 !important;
}
.wmd-preview {
margin-top: 15px;
padding: 7px;
background: white;
line-height: 1.5em;
font-size: 1em;
border: 1px solid #a9a9a9;
border-radius: 5px;
box-sizing: border-box;
}
.wmd-preview:empty {
display: none;
}

View file

@ -234,6 +234,70 @@ ul.problem-list {
.submit-bar {
float: right;
}
#submit-wrapper {
margin-top: 0.7em;
}
#submit-wrapper #editor, #submit-wrapper #language {
margin-top: 4px;
}
#id_language {
width: 100%;
}
#result-version-info {
border-bottom: 1px solid rgb(148, 148, 148);
margin: 0px 1em;
color: #757575;
font-weight: 600;
padding: 0.2em 0;
text-align: right;
}
#language-select2 .select2-results__message {
white-space: nowrap
}
#language-select2.select2-dropdown--above {
display: flex;
flex-direction: column-reverse;
}
#language-select2 .select2-results__option {
color: #757575 !important;
background: white !important;
}
#language-select2 .select2-results__option--highlighted {
text-decoration: underline;
}
#language-select2 .select2-results__option[aria-selected=true] {
font-weight: bold;
color: black !important;
}
#language-select2 .select2-results__option {
padding: 4px 0px;
}
#language-select2 .select2-results__options {
overflow-y: visible !important;
}
#language-select2 .select2-results__option {
break-inside: avoid-column;
}
#language-select2 .select2-results {
-webkit-columns: 10 7em;
-moz-columns: 10 7em;
columns: 10 7em;
padding-left: 1.5em;
padding-top: 0.5em;
}
}
@media (max-width: 550px) {
@ -329,6 +393,40 @@ ul.problem-list {
color: darkblue;
}
.problem-data-form {
.bad-file input, .bad-file .select2-selection {
border-color: red;
}
}
.problem-clarification {
border-bottom: 1px solid #ccc;
margin-top: 1em;
margin-bottom: 1em;
}
#clarification_header {
color: red;
cursor: pointer;
}
#clarification_header:hover {
color: orange;
}
#comment-announcement {
margin-top: 1em;
background-color: lightgray;
border-radius: 30px;
padding: 0.5em;
text-align: center;
cursor: pointer;
color: dimgrey;
font-weight: bold;
}
#comment-announcement:hover {
background-color: gray;
}
@media (max-width: 799px) {
.problem-middle-right {
display: flex;

View file

@ -42,3 +42,11 @@
background: white;
color: black;
}
.judge-online {
color:#44AD41;
}
.judge-offline {
color:#DE2121;
}

View file

@ -14,3 +14,6 @@
@import "misc";
@import "chatbox";
@import "organization";
@import "ticket";
@import "pagedown_widget";
@import "dmmd-preview";

176
resources/ticket.scss Normal file
View file

@ -0,0 +1,176 @@
.ticket-container {
#content > h2:first-child small {
color: #999;
font-size: 0.9em;
margin-left: 0.3em;
}
#content > h2:first-child .status, #content > h2:first-child .title {
display: inline;
}
#content > h2:first-child .fa-check-circle-o {
color: #00a900;
}
#content > h2:first-child .fa-exclamation-circle {
color: darkred;
}
.ticket-container {
width: 100%;
margin: 0 auto;
display: flex;
flex-direction: row;
flex-wrap: wrap-reverse;
max-width: 1000px;
}
.ticket-sidebar {
flex: 1;
padding: 10px 0 0 10px;
min-width: 150px;
max-width: 200px;
}
.ticket-info {
position: sticky;
top: 60px;
}
.ticket-messages {
flex: 1;
}
.info-box {
margin: 5px 0 10px;
border: 1px #999 solid;
border-radius: 5px;
}
.info-title {
padding: 2px 5px;
font-weight: 600;
border-bottom: 1px #999 solid;
background: #eee;
border-radius: 5px 5px 0 0;
}
.info-data {
padding: 2px 5px;
}
.info-empty {
color: #999;
font-style: italic;
}
.close-ticket {
display: block;
width: 100%;
background: linear-gradient(to bottom, #4bad00 0%, #278811 100%);
border-color: #24710e;
font-weight: 600;
}
.close-ticket:hover {
background: #24710e;
}
.open-ticket {
display: block;
width: 100%;
background: linear-gradient(to bottom, #ff130f, #b03d17);
border-color: #853011;
font-weight: 600;
}
.open-ticket:hover {
background: #853011;
}
a.edit-notes {
float: right;
}
#ticket-notes .info-real :first-child {
margin-top: 0;
}
#ticket-notes .info-real :last-child {
margin-bottom: 0;
}
.message {
margin-top: -40px;
padding-top: 55px;
}
.message .info {
}
.message .username {
text-align: center;
}
.message .gravatar {
width: 40px;
border-radius: 4px;
display: block;
margin: 0 auto;
}
.message .message-date, .message .message-time {
display: inline-block;
}
.message .detail {
border: 1px #999 solid;
border-radius: 5px;
flex: 1;
min-width: 200px;
}
.message .header {
background: #eee;
color: #777;
border-bottom: 1px solid #999;
border-radius: 5px 5px 0 0;
padding: 2px 7px;
display: inline-flex;
width: -webkit-fill-available;
}
.message .send-time {
text-align: right;
}
.message .content {
padding: 7px;
}
.message .content :first-child {
margin-top: 0;
}
.message .content :last-child {
margin-bottom: 0;
}
.new-message .detail {
padding: 8px 10px;
}
.new-message .submit, #edit-notes .submit {
margin: 10px 0 0 auto;
}
.user-container {
display: inline-flex;
}
.user-container .username {
padding-left: 0.5em;
padding-top: 1.65em;
}
}

View file

@ -43,7 +43,12 @@ th.header.rank {
}
#users-table {
.username {
th a, th a:link, th a:visited {
color: white;
}
th a:hover {
color: #0F0;
}
.about-column {
@ -81,6 +86,74 @@ th.header.rank {
background: #fff897;
}
}
.organization-column a {
color: gray !important;
font-weight: 600;
}
.disqualified {
background-color: #ffa8a8 !important;
}
.frozen {
background: lightskyblue !important;
}
.full-score, .full-score a {
font-weight: bold;
color: green;
}
.partial-score, .partial-score a {
color: green;
}
.failed-score, .failed-score a {
font-weight: bold;
color: red;
}
.pretest-full-score, .pretest-full-score a {
font-weight: bold;
color: #2980b9;
}
.pretest-partial-score, .pretest-partial-score a {
color: #2980b9;
}
.pretest-failed-score, .pretest-failed-score a {
font-weight: bold;
color: red;
}
.user-points {
font-weight: bold;
color: black;
}
.solving-time {
color: gray;
font-weight: normal;
font-size: 0.75em;
padding-bottom: -0.75em;
}
.point-denominator {
border-top: 1px solid gray;
font-size: 0.7em;
}
.fullname-column {
text-align: right !important;
border-right: none !important;
}
.fullname-column span {
color: gray !important;
font-weight: 600;
}
}
#search-form {
@ -399,3 +472,11 @@ a.edit-profile {
}
}
}
.user-info-header {
color: gray;
}
.user-stat-header {
color: gray;
}

View file

@ -597,3 +597,137 @@ ul.select2-selection__rendered {
.control-button:hover {
background: gray;
}
.registration-form {
.sortedm2m-container, .sortedm2m-container p.selector-filter {
width: 300px;
}
.sortedm2m-container p.selector-filter input {
width: 262px;
}
ul.sortedm2m {
width: 284px;
min-height: 100px;
max-height: 200px;
}
.sortedm2m-container, .sortedm2m-container p.selector-filter {
width: 300px;
}
.sortedm2m-container p.selector-filter input {
width: 262px;
}
ul.sortedm2m {
width: 284px;
min-height: 70px;
max-height: 200px;
height: 70px
}
.inline-header {
float: left;
font-size: 1.1em;
padding: 4px 8px;
padding-left: 0;
}
.block-header {
color: #555;
font-size: 1.1em;
font-weight: 600;
padding-bottom: 0.2em;
padding-left: 2px;
margin-top: 0.75em
}
.fullwidth {
display: block;
overflow: hidden;
}
.fullwidth input {
width: 100%;
}
.fullwidth-error input {
width: 100%;
border-color: red;
}
.form-field-error {
color: red;
}
small {
font-size: 0.7em;
padding-left: 0.6em;
}
#edit-form {
border: unset;
background: unset;
max-width: 450px;
width: 450px;
}
ul.errorlist {
margin: 0px;
text-align: right;
list-style: none;
}
.full-textfield {
padding-top: 0.5em;
}
.tos-section {
display: inline-block;
padding-right: 1em;
}
.pass-req {
padding: 0;
}
}
#center-float {
display: inline-block;
text-align: initial;
max-width: 450px;
width: 450px;
}
#login-panel {
display: inline-block;
position: relative;
margin: 5em auto auto -10em;
top: 40%;
left: 50%;
h4 {
padding-top: 1em;
}
.social {
display: inline;
font-size: 2.3em;
float: none;
}
.google-icon i {
color: #DD4B38;
}
.facebook-icon i {
color: #133783;
}
.github-icon i {
color: black;
}
}

View file

@ -2,7 +2,7 @@
{% set profile = request.profile if logged_in else None %}
{% if logged_in %}
{% if include_hr %}<hr>{% endif %}
<div class="page-vote">
<div class="page-vote actionbar">
<span class="actionbar-block" style="justify-content: flex-start;">
<span id="like-button-{{pagevote.id}}"
class="like-button actionbar-button {% if pagevote.vote_score(request.profile) == 1 %}voted{% endif %}"
@ -41,7 +41,7 @@
</span>
{% if actionbar_report_url %}
<span class="actionbar-block">
<a class="actionbar-button" href="{{actionbar_report_url}}" style="color: black">
<a class="actionbar-button black" href="{{actionbar_report_url}}">
<i class="fa fa-flag-o" style="font-size: large;"></i>
<span class="actionbar-text">{{_("Report")}}</span>
</a>

View file

@ -1,48 +1,4 @@
<style>
.actionbar-button {
cursor: pointer;
padding: 0.8em;
border: 0.2px solid lightgray;
border-radius: 5em;
font-weight: bold;
display: inherit;
}
.actionbar-block {
display: flex;
flex: 1;
justify-content: center;
}
.page-vote {
display: flex;
}
.pagevote-score {
margin-right: 0.3em;
}
.like-button {
padding-right: 0.5em;
border-radius: 5em 0 0 5em;
}
.actionbar-button:hover {
background: lightgray;
}
.dislike-button {
padding-left: 0.5em;
border-radius: 0 5em 5em 0;
border-left: 0;
}
.like-button.voted {
color: blue;
}
.dislike-button.voted {
color: red;
}
.actionbar-text {
padding-left: 0.4em;
}
.bookmarked {
color: rgb(180, 180, 7);
}
@media (max-width: 799px) {
.actionbar-text {
display: none;

View file

@ -47,6 +47,7 @@
{% if not INLINE_FONTAWESOME %}
<link rel="stylesheet" href="{{ FONTAWESOME_CSS }}">
{% endif %}
<link rel="stylesheet" type="text/css" href="{{ static('markdown.css') }}">
{% compress css %}
<link rel="stylesheet" href="{{ static('style.css') }}">
{% if PYGMENT_THEME %}
@ -68,17 +69,15 @@
</style>
{% endif %}
{% block media %}{% endblock %}
{% if use_darkmode %}
{% compress css %}
<link rel="stylesheet" href="{{ static('darkmode.css') }}">
{% endcompress %}
{% endif %}
{% if not INLINE_JQUERY %}
<script src="{{ JQUERY_JS }}"></script>
{% endif %}
<link rel="stylesheet" type="text/css" href="{{ static('markdown.css') }}">
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://cdn.jsdelivr.net/npm/darkreader@4.9.58/darkreader.min.js"></script>
<script type="text/javascript">
if (localStorage.getItem("darkmode") === "true") {
DarkReader.enable();
}
</script>
{% compress js %}
<script>{{ inlinei18n(LANGUAGE_CODE)|safe }}</script>
{% if INLINE_JQUERY %}
@ -255,7 +254,7 @@
</div>
</span>
<span title="{{_('Dark Mode')}}">
<span class="icofont-adjust navbar-icon" id="nav-darkmode-icon" aria-hidden="true"></span>
<a class="icofont-adjust navbar-icon black" id="nav-darkmode-icon" aria-hidden="true" href="?darkmode=1"></a>
</span>
</span>
{% if request.user.is_authenticated %}
@ -283,7 +282,7 @@
<div class="dropdown-item"><a href="{{ url('impersonate-stop') }}">Stop impersonating</a></div>
{% else %}
<div class="dropdown-item">
<a href="#" id="logout" style="color: red !important">{{ _('Log out') }}</a>
<a href="#" id="logout" class="red">{{ _('Log out') }}</a>
<form id="logout-form" action="{{ url('auth_logout') }}" method="POST">
{% csrf_token %}
</form>
@ -319,9 +318,9 @@
</div>
<div id="contest-info-toggle" class="{{'contest-info-toggle-mode-on' if request.contest_mode else 'contest-info-toggle-mode-off'}}">
{% if request.contest_mode %}
<i class="fa fa-toggle-on" style="color: white"></i> {{_('Compete')}}
<i class="fa fa-toggle-on white"></i> {{_('Compete')}}
{% else %}
<i class="fa fa-toggle-off" style="color: white"></i> {{_('General')}}
<i class="fa fa-toggle-off white"></i> {{_('General')}}
{% endif %}
</div>
</div>
@ -333,7 +332,7 @@
<br>
<main id="content">
{% block title_row %}
<h2 style="color:#393630; display:inline">
<h2 class="title-row">
{% block content_title %}
{% if content_title %}{{ content_title }}{% else %}{{ title }}{% endif %}
{% endblock %}
@ -355,7 +354,7 @@
<footer>
<span id="footer-content">
<br>
<a style="color: #808080" target="_blank" href="https://dmoj.ca">proudly powered by <b>DMOJ</b></a><a target="_blank" href="https://github.com/LQDJudge/online-judge"> | developed by LQDJudge team</a> |
<a class="background-footer" target="_blank" href="https://dmoj.ca">proudly powered by <b>DMOJ</b></a><a target="_blank" href="https://github.com/LQDJudge/online-judge"> | developed by LQDJudge team</a> |
{% if i18n_config.footer %}
{{ i18n_config.footer|safe }} |
{% endif %}

View file

@ -16,14 +16,6 @@
font-style: italic;
text-align: center;
}
#add-clarification {
float: left;
color: chartreuse;
}
#add-clarification:hover {
color: cyan;
}
</style>
{% endblock %}

View file

@ -573,6 +573,7 @@ let META_HEADER = [
{% endblock media %}
{% block body %}
<div class="chat">
<div id="mobile" class="tabs">
<ul>
<li id="chat-tab" class="tab active"><a href="#">
@ -627,4 +628,5 @@ let META_HEADER = [
</div>
</div>
</div>
</div>
{% endblock body %}

View file

@ -99,19 +99,6 @@
padding: 0.05em 0.6em;
width: 100%;
}
.active-span {
margin-top: 1em;
margin-right: 1em;
color: #636363;
}
.unread-count {
float: right;
color: white;
background-color: darkcyan;
border-radius: 2px;
padding: 0 0.5em;
}
#search-form {
float: inherit;
}
@ -121,26 +108,7 @@
#setting {
position: relative;
}
#setting-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
right: 0;
}
#setting-content li {
padding: 12px 16px;
text-decoration: none;
display: block;
color: black;
font-weight: bold;
}
#setting-content li:hover {
background-color: #ddd;
cursor: pointer;
}
@media (min-width: 800px) {
#page-container {

View file

@ -16,7 +16,7 @@
<span class="content-message">
<div class="body-block" id="body-block-{{ message.id }}" title="{{ message.time|date('g:i a') }}">
{% if request.user.is_staff %}
<a class="chatbtn_remove_mess" value="{{message.id}}" style="color:red; cursor: pointer;">
<a class="red chatbtn_remove_mess" value="{{message.id}}" style="cursor: pointer;">
{{_('Delete')}}
</a>
{% endif %}

View file

@ -26,7 +26,7 @@
</button>
<div id="setting-content">
<li>
<a href="{{url('toggle_ignore', other_user.id)}}" style="color: {{'green' if is_ignored else 'red'}}">
<a href="{{url('toggle_ignore', other_user.id)}}" class=" {{'green' if is_ignored else 'red'}}">
{% if is_ignored %}
{{_('Unignore')}}
{% else %}

View file

@ -1,104 +1,3 @@
{% compress css %}
{{ comment_form.media.css }}
<style media="all">
.revision-text p:first-child {
margin-top: 0;
}
.revision-text p:last-child {
margin-bottom: 0;
}
.featherlight-edit .featherlight-content {
background: #FAFAFA;
padding: 10px 15px 10px 10px;
border-radius: 10px;
border: 1px solid #CCC;
}
.new-comments .comment-display {
display: flex;
margin-top: -0.25em !important;
padding-left: 1em;
padding-top: 0.5em !important;
border: 1px solid #ccc;
background: #fafafa;
}
.new-comments .comment .detail {
margin: 0px 15px 0px;
width: 100%;
max-width: calc(100% - 134px);
}
.new-comments .comment-edits {
padding-right: 0.75em;
}
.new-comments .comment .detail .header {
display: flex;
flex-wrap: wrap;
padding: 2px 0px;
font-weight: normal;
border-bottom: 1px #888 solid;
color: #888;
text-align: right;
}
.previous-revision, .next-revision {
color: #444;
}
.new-comments .header i {
color: #888 !important;
}
.new-comments .info {
padding-top: 0.4em;
display: flex;
}
.new-comments .gravatar {
width: 75px;
max-width: 75px;
}
.new-comments .vote {
margin-right: 1em;
height: 75px;
padding-top: 0.4em;
}
.new-comments .comment-display {
border-radius: 4px;
}
.new-comments .comment:target > .comment-display {
border: 1px solid #2980b9;
border-left: 10px solid #2980b9;
padding-left: 5px;
}
.comments.top-level-comments {
margin-bottom: -3px;
}
.bad-comment {
opacity: 0.3;
}
.bad-comment:hover {
opacity: 1;
/* This is necessary to prevent random flickering */
-webkit-transform: translatez(0)
-moz-transform: translatez(0);
-ms-transform: translatez(0);
-o-transform: translatez(0);
transform: translatez(0);
}
.reply-comment {
margin: -50px 23px 10px -40px;
padding-top: 50px;
}
</style>
{% endcompress %}

View file

@ -216,6 +216,7 @@
event.preventDefault();
$("#new-comment").show("slow");
$("#write-comment").hide();
$(".no-comments-message").hide();
});
});

View file

@ -5,12 +5,6 @@
{% block two_col_media %}
<style>
.time-left {
text-align: left;
color: #777;
padding-top: 0.5em;
}
.content-description ul {
padding: 0 !important;
}
@ -116,27 +110,27 @@
</a>
<span class="contest-tags">
{% if not contest.is_visible %}
<span style="background-color: #000000; color: #ffffff" class="contest-tag">
<span class="contest-tag contest-tag-hidden">
<i class="fa fa-eye-slash"></i> {{ _('hidden') }}
</span>
{% endif %}
{% if contest.is_editable %}
<span style="background-color: green" class="contest-tag">
<a href="{{ url('organization_contest_edit', organization.id, organization.slug, contest.key) }}" style="color: white">
<span class="contest-tag contest-tag-edit">
<a href="{{ url('organization_contest_edit', organization.id, organization.slug, contest.key) }}" class="white">
<i class="fa fa-edit"></i> {{ _('Edit') }}
</a>
</span>
{% endif %}
{% if contest.is_private %}
<span style="background-color: #666666; color: #ffffff" class="contest-tag">
<span class="contest-tag contest-tag-private">
<i class="fa fa-lock"></i> {{ _('private') }}
</span>
{% endif %}
{% if not hide_contest_orgs %}
{% if contest.is_organization_private %}
{% for org in contest.organizations.all() %}
<span style="background-color: #cccccc" class="contest-tag">
<a href="{{ org.get_absolute_url() }}" style="color: #000000">
<span class="contest-tag contest-tag-org">
<a href="{{ org.get_absolute_url() }}">
<i class="fa fa-lock"></i> {{ org.name }}
</a>
</span>
@ -144,7 +138,7 @@
{% endif %}
{% endif %}
{% if contest.is_rated %}
<span style="background-color: #e54c14; color: #ffffff" class="contest-tag">
<span class="contest-tag-rated">
<i class="fa fa-bar-chart"></i> {{ _('rated') }}
</span>
{% endif %}
@ -366,10 +360,10 @@
<thead>
<tr>
<th style="width:90%">
<a style="color: #7dc7ff" href="{{ sort_links.name }}">{{ _('Contest') }}{{ sort_order.name }}</a>
<a class="contest-list-sort" href="{{ sort_links.name }}">{{ _('Contest') }}{{ sort_order.name }}</a>
</th>
<th>
<a style="color: #7dc7ff" href="{{ sort_links.user_count }}">{{ _('Users') }}{{ sort_order.user_count }}</a>
<a class="contest-list-sort" href="{{ sort_links.user_count }}">{{ _('Users') }}{{ sort_order.user_count }}</a>
</th>
{% if not request.in_contest %}
<th style="width:15%"></th>

View file

@ -15,26 +15,10 @@
display: inline !important;
}
#users-table th a, #users-table th a:link, #users-table th a:visited {
color: white;
}
#users-table th a:hover {
color: #0F0;
}
#users-table td a:hover {
text-decoration: underline;
}
.first-solve {
background: #00f9a1;
}
.frozen {
background: lightskyblue !important;
}
.rank {
min-width: 2.5em
}
@ -43,55 +27,6 @@
min-width: 2.5em;
}
.disqualified {
background-color: #ffa8a8 !important;
}
.full-score, .full-score a {
font-weight: bold;
color: green;
}
.partial-score, .partial-score a {
color: green;
}
.failed-score, .failed-score a {
font-weight: bold;
color: red;
}
.pretest-full-score, .pretest-full-score a {
font-weight: bold;
color: #2980b9;
}
.pretest-partial-score, .pretest-partial-score a {
color: #2980b9;
}
.pretest-failed-score, .pretest-failed-score a {
font-weight: bold;
color: red;
}
.user-points {
font-weight: bold;
color: black;
}
.solving-time {
color: gray;
font-weight: normal;
font-size: 0.75em;
padding-bottom: -0.75em;
}
.point-denominator {
border-top: 1px solid gray;
font-size: 0.7em;
}
.start-time {
display: none;
}
@ -107,21 +42,6 @@
border-right: none !important;
}
.organization-column a {
color: gray !important;
font-weight: 600;
}
.fullname-column {
text-align: right !important;
border-right: none !important;
}
.fullname-column span {
color: gray !important;
font-weight: 600;
}
.featherlight-content {
border-radius: 10px;
height: 80%;
@ -138,10 +58,6 @@
overflow: initial !important
}
.select2-results__option--highlighted {
background-color: #DEDEDE !important;
}
.select2-results__option {
white-space: nowrap;
}

View file

@ -16,12 +16,12 @@
{% block user_footer %}
{% if user.user.first_name %}
<div style="color: gray; font-weight: 600; display: none" class="fullname">
<div style="font-weight: 600; display: none" class="fullname gray">
{{ user.user.first_name if user.user.first_name else ''}}
</div>
{% endif %}
{% if user.user.last_name %}
<div class="school" style="display: none"><a style="color: gray; font-weight: 600">
<div class="school gray" style="display: none"><a style="font-weight: 600">
{{- user.user.last_name -}}
</a></div>
{% endif %}
@ -29,7 +29,7 @@
{% block user_data %}
{% if user.participation.virtual %}
<sub style="color:grey">[{{user.participation.virtual}}]</sub>
<sub class="gray">[{{user.participation.virtual}}]</sub>
{% endif %}
{% if can_edit %}
<span class="contest-participation-operation">

View file

@ -22,7 +22,7 @@
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span style="color:red"> * </span>{% endif %}:</b> </label>
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>

View file

@ -44,7 +44,7 @@
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span style="color:red"> * </span>{% endif %}:</b> </label>
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
@ -77,7 +77,7 @@
<td class="problems-{{field.name}}" title="
{{ field.help_text|safe if field.help_text }}"
style="{{ 'display:none' if field.is_hidden }}"
>{{field}}<div style="color:red">{{field.errors}}</div></td>
>{{field}}<div class="red">{{field.errors}}</div></td>
{% endfor %}
</tr>
{% endfor %}

View file

@ -11,7 +11,7 @@
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span style="color:red"> * </span>{% endif %}:</b> </label>
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>

View file

@ -2,24 +2,10 @@
{% block two_col_media %}
<style>
.organization-row {
display: block;
padding: 0.5em;
border-bottom: 1px gray solid;
border-top: none;
color: black;
font-weight: bold;
}
.organization-container .organization-row:last-child {
border-bottom: none;
}
.organization-row:hover {
background-color: #f3f3f3;
}
.organization-container {
border: 1px gray solid;
margin-bottom: 3em;
}
.org-logo {
vertical-align: middle;
height: 2em;

View file

@ -427,10 +427,6 @@
width: 1em;
}
.bad-file input, .bad-file .select2-selection {
border-color: red;
}
span.order {
padding-right: 0.5em;
}
@ -481,7 +477,7 @@
<li>{{ data_form.instance.feedback }}</li>
</ul>
{% endif %}
<form action="" method="POST" enctype="multipart/form-data">
<form class="problem-data-form" action="" method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ cases_formset.management_form }}
<table class="table">

View file

@ -19,14 +19,6 @@
a.hot-problem-link:hover > .hot-problem-count {
visibility: visible;
}
span.hot-problem-count {
color: #555;
font-size: 0.75em;
vertical-align: super;
visibility: hidden;
padding-left: 0.25em;
position: relative;
}
ul.problem-list {
padding: 0 !important;
}

View file

@ -135,7 +135,7 @@
<br><br>
{% if can_edit_contest %}
<div style="float: right; font-size: 1.2em">
<a href="{{url('new_contest_clarification', request.participation.contest.key)}}"><i class="fa fa-plus-circle" style="color:green"></i> <u>{{_('Add clarifications')}}</u></a>
<a href="{{url('new_contest_clarification', request.participation.contest.key)}}"><i class="fa fa-plus-circle" class="green"></i> <u>{{_('Add clarifications')}}</u></a>
</div>
{% endif %}
{% if has_clarifications %}

View file

@ -23,7 +23,6 @@
padding: 5px 10px 10px;
margin: -10px -10px 10px;
border-radius: 5px 5px 0 0;
color: white;
}
.control-group {
@ -124,7 +123,7 @@
<div class="panes">
{% if request.user.has_perm('judge.rejudge_submission_lot') %}
<div class="pane">
<h3>{{ _('Filter submissions') }}</h3>
<h3 class="white">{{ _('Filter submissions') }}</h3>
<form action="{{ url('problem_submissions_action', problem.code) }}" method="post" id="form-action">
{% csrf_token %}
<div class="control-group">

View file

@ -15,12 +15,6 @@
vertical-align: middle;
}
.problem-clarification {
border-bottom: 1px solid #ccc;
margin-top: 1em;
margin-bottom: 1em;
}
.clarifications-area h2 {
margin-bottom: 20px;
}
@ -49,29 +43,6 @@
height: 0;
}
#clarification_header {
color: red;
cursor: pointer;
}
#clarification_header:hover {
color: orange;
}
#comment-announcement {
margin-top: 1em;
background-color: lightgray;
border-radius: 30px;
padding: 0.5em;
text-align: center;
cursor: pointer;
color: dimgrey;
font-weight: bold;
}
#comment-announcement:hover {
background-color: gray;
}
#comment-section {
display: none;
}
@ -139,7 +110,7 @@
</a>
{% endif %}
{% endif %}
<h2 style="color:#393630; display: inline-block">{{ title }}</h2>
<h2 class="title-row" style="display: inline-block">{{ title }}</h2>
{% if problem.is_organization_private %}
<span class="organization-tags">
{% for org in problem.organizations.all() %}
@ -358,7 +329,7 @@
{{ available_judges|join(", ") }}
{% endif %}
{% else %}
<i style="color: red">{{ _('none available') }}</i>
<i class="red">{{ _('none available') }}</i>
{% endif %}
</div>
</div>

View file

@ -161,73 +161,6 @@
{% block media %}
{{ form.media.css }}
{% compress css %}
<style media="screen">
#submit-wrapper {
margin-top: 0.7em;
}
#submit-wrapper #editor, #submit-wrapper #language {
margin-top: 4px;
}
#id_language {
width: 100%;
}
#result-version-info {
border-bottom: 1px solid rgb(148, 148, 148);
margin: 0px 1em;
color: #757575;
font-weight: 600;
padding: 0.2em 0;
text-align: right;
}
#language-select2 .select2-results__message {
white-space: nowrap
}
#language-select2.select2-dropdown--above {
display: flex;
flex-direction: column-reverse;
}
#language-select2 .select2-results__option {
color: #757575 !important;
background: white !important;
}
#language-select2 .select2-results__option--highlighted {
text-decoration: underline;
}
#language-select2 .select2-results__option[aria-selected=true] {
font-weight: bold;
color: black !important;
}
#language-select2 .select2-results__option {
padding: 4px 0px;
}
#language-select2 .select2-results__options {
overflow-y: visible !important;
}
#language-select2 .select2-results__option {
break-inside: avoid-column;
}
#language-select2 .select2-results {
-webkit-columns: 10 7em;
-moz-columns: 10 7em;
columns: 10 7em;
padding-left: 1.5em;
padding-top: 0.5em;
}
</style>
{% endcompress %}
{% endblock %}
{% block body %}

View file

@ -1,18 +1,5 @@
{% block two_col_media %}
<style>
.organization-row {
display: block;
padding: 0.5em;
border-bottom: 1px gray solid;
border-top: none;
color: black;
font-weight: 500;
display: flex;
align-items: center;
}
.organization-row:hover {
background-color: #f3f3f3;
}
.org-logo {
vertical-align: middle;
height: 2em;
@ -29,7 +16,7 @@
{% if recent_organizations %}
<div class="blog-sidebox sidebox">
<h3>{{ _('Recent groups') }} <i class="fa fa-users"></i></h3>
<div class="organization-container toggled">
<div class="toggled">
{% for organization in recent_organizations %}
<a href="{{ url('organization_home', organization.organization.pk, organization.organization.slug) }}" class="sidebox-content organization-row" title="{{organization.organization.about}}">
<img class="org-logo" data-src="{{ organization.organization.logo_override_image or static('icons/icon.png') }}">

View file

@ -1,39 +1,5 @@
{% extends "base.html" %}
{% block media %}
<style>
#login-panel {
display: inline-block;
position: relative;
margin: 5em auto auto -10em;
top: 40%;
left: 50%;
}
h4 {
padding-top: 1em;
}
.social {
display: inline;
font-size: 2.3em;
float: none;
}
.google-icon i {
color: #DD4B38;
}
.facebook-icon i {
color: #133783;
}
.github-icon i {
color: black;
}
</style>
{% endblock %}
{% block body %}
<div id="login-panel">
<form action="" method="post" class="form-area">

View file

@ -1,6 +1,6 @@
<span style="display:block;margin: 0 2px;padding: 1em;border: 3px solid #FFDE05;background-color: #000;border-radius: 6px;font-size: .95em;color: #444;margin-bottom:0.75em">
<div style="display:table;margin-left:2em"><img src="https://avatars1.githubusercontent.com/u/6934864?v=3&s=101" style="display:inline;vertical-align: middle">
<h1 style="font-size:4em;display:inline;vertical-align: middle"><a href="//{{ domain }}" style="text-decoration:none;color:gray"><span style="color: #FFDE05">DM::</span>OJ</a>
<h1 style="font-size:4em;display:inline;vertical-align: middle"><a href="//{{ domain }}" style="text-decoration:none;color:gray"><span style="color: #FFDE05">LQD</span>OJ</a>
</h1>
</div>
</span>

View file

@ -4,114 +4,9 @@
{% include "timezone/media-css.html" %}
{{ form.media.css }}
<style>
.sortedm2m-container, .sortedm2m-container p.selector-filter {
width: 300px;
}
.sortedm2m-container p.selector-filter input {
width: 262px;
}
ul.sortedm2m {
width: 284px;
min-height: 100px;
max-height: 200px;
}
.sortedm2m-container, .sortedm2m-container p.selector-filter {
width: 300px;
}
.sortedm2m-container p.selector-filter input {
width: 262px;
}
ul.sortedm2m {
width: 284px;
min-height: 70px;
max-height: 200px;
height: 70px
}
.grayed {
color: #666;
}
.inline-header {
float: left;
font-size: 1.1em;
padding: 4px 8px;
padding-left: 0;
}
.block-header {
color: #555;
font-size: 1.1em;
font-weight: 600;
padding-bottom: 0.2em;
padding-left: 2px;
margin-top: 0.75em
}
.fullwidth {
display: block;
overflow: hidden;
}
.fullwidth input {
width: 100%;
}
.fullwidth-error input {
width: 100%;
border-color: red;
}
.form-field-error {
color: red;
}
small {
font-size: 0.7em;
padding-left: 0.6em;
}
#edit-form {
border: unset;
background: unset;
max-width: 450px;
width: 450px;
}
#content-body {
text-align: center;
}
#center-float {
display: inline-block;
text-align: initial;
max-width: 450px;
width: 450px;
}
ul.errorlist {
margin: 0px;
text-align: right;
list-style: none;
}
.full-textfield {
padding-top: 0.5em;
}
.tos-section {
display: inline-block;
padding-right: 1em;
}
.pass-req {
padding: 0;
}
</style>
{% endblock %}
@ -132,7 +27,7 @@
{% endblock %}
{% block body %}
<div id="center-float">
<div id="center-float" class="registration-form">
<form id="edit-form" action="" method="post" class="form-area">
{% csrf_token %}
@ -214,7 +109,7 @@
</form>
</div>
<div class="map-wrap">
<div class="map-wrap registration-form">
<div class="map-inset">
<div class="map-axis-x"></div>
<div class="map-axis-y"></div>

View file

@ -21,9 +21,9 @@
{% if see_all_judges %}
<td>
{% if judge.online %}
<i style="color:#44AD41" class="fa fa-check-circle"></i>
<i class="fa fa-check-circle judge-online"></i>
{% else %}
<i style="color:#DE2121" class="fa fa-minus-circle"></i>
<i class="fa fa-minus-circle judge-offline"></i>
{% endif %}
</td>
{% endif %}

View file

@ -1,4 +1,4 @@
<h3 style="color:red;font-weight:bold">
<h3 style="font-weight:bold" class="red">
{% if request.user == submission.user.user %}
{% trans trimmed %}
An internal error occurred while grading, and the {{ SITE_NAME }} administrators have been notified.<br>

View file

@ -84,7 +84,7 @@
{% for batch in batches %}
{% if batch.id %}
{% set batch_AC = (batch.points == batch.total) %}
<tr class="case-row" style="background-color: {{ '#d6e8f7' if batch.points == batch.total else 'bisque'}}">
<tr class="case-row" class= "background-{{ 'd6e8f7' if batch.points == batch.total else 'bisque'}}">
<td>
<b>{{ _('Batch ') }}#{{ batch.id }}</b>
</td>

View file

@ -1,182 +1,6 @@
{% extends "base.html" %}
{% block media %}
{{ form.media.css }}
<style>
#content > h2:first-child small {
color: #999;
font-size: 0.9em;
margin-left: 0.3em;
}
#content > h2:first-child .status, #content > h2:first-child .title {
display: inline;
}
#content > h2:first-child .fa-check-circle-o {
color: #00a900;
}
#content > h2:first-child .fa-exclamation-circle {
color: darkred;
}
.container {
width: 100%;
margin: 0 auto;
display: flex;
flex-direction: row;
flex-wrap: wrap-reverse;
max-width: 1000px;
}
.ticket-sidebar {
flex: 1;
padding: 10px 0 0 10px;
min-width: 150px;
max-width: 200px;
}
.ticket-info {
position: sticky;
top: 60px;
}
.ticket-messages {
flex: 1;
}
.info-box {
margin: 5px 0 10px;
border: 1px #999 solid;
border-radius: 5px;
}
.info-title {
padding: 2px 5px;
font-weight: 600;
border-bottom: 1px #999 solid;
background: #eee;
border-radius: 5px 5px 0 0;
}
.info-data {
padding: 2px 5px;
}
.info-empty {
color: #999;
font-style: italic;
}
.close-ticket {
display: block;
width: 100%;
background: linear-gradient(to bottom, #4bad00 0%, #278811 100%);
border-color: #24710e;
font-weight: 600;
}
.close-ticket:hover {
background: #24710e;
}
.open-ticket {
display: block;
width: 100%;
background: linear-gradient(to bottom, #ff130f, #b03d17);
border-color: #853011;
font-weight: 600;
}
.open-ticket:hover {
background: #853011;
}
a.edit-notes {
float: right;
}
#ticket-notes .info-real :first-child {
margin-top: 0;
}
#ticket-notes .info-real :last-child {
margin-bottom: 0;
}
.message {
margin-top: -40px;
padding-top: 55px;
}
.message .info {
}
.message .username {
text-align: center;
}
.message .gravatar {
width: 40px;
border-radius: 4px;
display: block;
margin: 0 auto;
}
.message .message-date, .message .message-time {
display: inline-block;
}
.message .detail {
border: 1px #999 solid;
border-radius: 5px;
flex: 1;
min-width: 200px;
}
.message .header {
background: #eee;
color: #777;
border-bottom: 1px solid #999;
border-radius: 5px 5px 0 0;
padding: 2px 7px;
display: inline-flex;
width: -webkit-fill-available;
}
.message .send-time {
text-align: right;
}
.message .content {
padding: 7px;
}
.message .content :first-child {
margin-top: 0;
}
.message .content :last-child {
margin-bottom: 0;
}
.new-message .detail {
padding: 8px 10px;
}
.new-message .submit, #edit-notes .submit {
margin: 10px 0 0 auto;
}
.user-container {
display: inline-flex;
}
.user-container .username {
padding-left: 0.5em;
padding-top: 1.65em;
}
</style>
{% endblock %}
{% block js_media %}
@ -327,7 +151,7 @@
{% endblock %}
{% block body %}
<div class="container">
<div class="ticket-container">
<div class="ticket-messages">
<main id="messages" class="messages">
{% for message in ticket_messages %}

View file

@ -19,10 +19,6 @@
height: 70px
}
.grayed {
color: #666;
}
.inline-header {
float: left;
font-size: 1.1em;
@ -31,7 +27,6 @@
}
.block-header {
color: #666;
font-size: 1.1em;
}
@ -94,7 +89,7 @@
{% csrf_token %}
<table class="block-header">
<table class="block-header grayed">
<tr>
<td> {{ _('Fullname') }}: </td>
<td> {{ form_user.first_name }} </td>

View file

@ -25,7 +25,7 @@
{% pluralize %}
{{ counter }} problems solved
{% endtrans -%}"
><i style="color: darkcyan;" class="fa fa-slack"></i> {{_('Problems')}}</div>
><i class="fa fa-slack darkcyan"></i> {{_('Problems')}}</div>
<div class="user-info-body">{{user.problem_count}}</div>
</div>
</div>
@ -33,7 +33,7 @@
<div class="user-info">
<div class="user-info-header"
title="{{_('Total points')}}"
><i style="color:green" class="icofont-tick-mark"></i> {{_('Points')}}</div>
><i class="green icofont-tick-mark"></i> {{_('Points')}}</div>
<div class="user-info-body"><span title="{{ user.performance_points|floatformat(2) }}">
{{ user.performance_points|floatformat(0) }}
</span></div>
@ -42,14 +42,14 @@
{% if not user.is_unlisted %}
<div class="user-info-card">
<div class="user-info">
<div class="user-info-header" title="{{_('Rank by rating')}}"><i style="color: peru" class="fa fa-globe" ></i> {{_('Rating')}}</div>
<div class="user-info-header" title="{{_('Rank by rating')}}"><i class="fa fa-globe peru" ></i> {{_('Rating')}}</div>
<div class="user-info-body">{{rating_rank if rating_rank else '-'}}</div>
</div>
</div>
{% endif %}
<div class="user-info-card">
<div class="user-info">
<div class="user-info-header" title="{{_('Rank by points')}}"><i style="color: blue" class="fa fa-globe" ></i> {{_('Points')}}</div>
<div class="user-info-header" title="{{_('Rank by points')}}"><i class="fa fa-globe blue" ></i> {{_('Points')}}</div>
<div class="user-info-body">{{rank}}</div>
</div>
</div>

View file

@ -30,10 +30,6 @@
font-weight: 500;
}
.user-info-header {
color: gray;
}
.user-info-container {
display: grid;
grid-column-gap: .5rem;
@ -70,10 +66,6 @@
margin-bottom: 0.5em;
}
.user-stat-header {
color: gray;
}
#awards img {
height: 105px;
margin-right: 1em;

View file

@ -10,7 +10,7 @@
{% block user_footer %}
<span style="margin-left: 0.5em">{% if user.rating %}{{ rating_number(user) }}{% endif %}</span>
<div style="color: gray; font-weight: 600; margin-top: 0.2em">{{ user.user.first_name if user.user.first_name else ''}}</div>
<div class="gray" style="font-weight: 600; margin-top: 0.2em">{{ user.user.first_name if user.user.first_name else ''}}</div>
{% endblock %}
{% block after_point_head %}