diff --git a/judge/jinja2/datetime.py b/judge/jinja2/datetime.py index eb0ec41..ce7cf32 100644 --- a/judge/jinja2/datetime.py +++ b/judge/jinja2/datetime.py @@ -23,5 +23,5 @@ registry.filter(localtime_wrapper(time)) @registry.function @registry.render_with("widgets/relative-time.html") -def relative_time(time, format=_("N j, Y, g:i a"), rel=_("{time}"), abs=_("on {time}")): +def relative_time(time, format=_("N j, Y, g:i a"), rel=_("{time}"), abs=_("{time}")): return {"time": time, "format": format, "rel_format": rel, "abs_format": abs} diff --git a/judge/jinja2/gravatar.py b/judge/jinja2/gravatar.py index b6e8a83..8d32a11 100644 --- a/judge/jinja2/gravatar.py +++ b/judge/jinja2/gravatar.py @@ -10,10 +10,11 @@ from . import registry @registry.function def gravatar(profile, size=80, default=None, profile_image=None, email=None): - if profile_image: - return profile_image - if profile and profile.profile_image_url: - return profile.profile_image_url + if not profile.is_muted: + if profile_image: + return profile_image + if profile and profile.profile_image_url: + return profile.profile_image_url if profile: email = email or profile.email if default is None: diff --git a/resources/darkmode.css b/resources/darkmode.css index ab7da55..695adcf 100644 --- a/resources/darkmode.css +++ b/resources/darkmode.css @@ -1,3 +1,5 @@ +/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/main/LICENSE */ + /* User-Agent Style */ html { background-color: #181a1b !important; @@ -2535,7 +2537,6 @@ ul.pagination a:hover { color: rgb(232, 230, 227); background-image: initial; background-color: rgb(163, 62, 18); - border-color: initial; } ul.pagination > li > a, ul.pagination > li > span { @@ -2818,36 +2819,22 @@ a.voted { .actionbar .bookmarked { color: rgb(248, 248, 80); } -#submissions-table { +.submission-row { + box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px; background-image: initial; background-color: rgb(24, 26, 27); } -.submission-row { - border-left-color: rgb(62, 68, 70); - border-right-color: rgb(62, 68, 70); +.submission-row .sub-result .language { + background-color: rgb(41, 44, 46); } -.submission-row:hover { - background-image: initial; - background-color: rgb(31, 34, 35); -} -.submission-row:first-of-type { - border-top-color: rgb(62, 68, 70); -} -.submission-row > div { - border-bottom-color: rgb(62, 68, 70); -} -.submission-row .sub-result { - border-bottom-color: rgb(48, 52, 54); - border-right-color: rgb(62, 68, 70); -} -.submission-row .sub-result .score { - color: rgb(232, 230, 227); +.submission-row .sub-info .name:hover { + text-decoration-color: initial; } .submission-row .sub-testcase { color: rgb(178, 172, 162); } -.submission-row .sub-usage { - border-left-color: rgb(62, 68, 70); +.submission-row .sub-user-img { + background-color: rgb(43, 47, 49); } #statistics-table tr:not(:first-child) td { border-top-color: rgb(48, 52, 54) !important; @@ -3778,3 +3765,6 @@ div.mermaid .actor { .google-symbols { font-family: 'Google Symbols' !important; } +.material-icons-extended { + font-family: 'Material Icons Extended' !important; +} diff --git a/resources/submission.scss b/resources/submission.scss index 52e945a..4958bdf 100644 --- a/resources/submission.scss +++ b/resources/submission.scss @@ -5,64 +5,58 @@ width: 20%; } -#submissions-table { - background: white; -} - .submission-row { display: flex; - border-left: #ccc 1px solid; - border-right: #ccc 1px solid; transition: background-color linear 0.2s; - - &:hover { - background: #F2F2F2; - } - - &:first-of-type { - border-top: #ccc 1px solid; - border-top-left-radius: $widget_border_radius; - border-top-right-radius: $widget_border_radius; - .sub-result { - border-top-left-radius: $widget_border_radius; - } - } - - > div { - padding: 7px 5px; - vertical-align: middle; - border-bottom: #ccc 1px solid; - display: flex; - flex-direction: column; - justify-content: center; - } + margin-bottom: 15px; + border-radius: 8px; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); + align-items: center; + padding: 10px; + background: white; .sub-result { - min-width: 80px; - width: 80px; - text-align: center; - border-bottom-color: white; - border-right: #ccc 1px solid; + display: flex; + align-items: center; + font-size: 0.9em; + font-weight: 600; + gap: 10px; .state { - font-size: 0.7em; - font-weight: bold; - padding-top: 0.5em; + font-size: 0.9em; + padding: 5px 10px; + border-radius: 15px; + } + + .language { + background-color: #e1e1e1; + border-radius: 5px; + padding: 2px 8px; } .score { - font-size: 1.3em; - color: #000; + font-size: 1.2em; } } + .sub-details { + flex-grow: 1; + overflow: hidden; + } + .sub-info { flex: 1; - padding-left: 20px !important; + display: flex; + gap: 5px; + font-size: 1.2em; + margin-bottom: 5px; .name { font-weight: 700; - font-size: 1.2em; + } + + .name:hover { + text-decoration: underline; } } @@ -78,16 +72,31 @@ } .sub-usage { - min-width: 70px; - width: 70px; + margin-left: auto; white-space: nowrap; - text-align: center; - border-left: #ccc 1px solid; + text-align: right; + display: flex; + flex-direction: column; + gap: 4px; .time { font-weight: bold; } } + .sub-user-img { + flex-shrink: 0; + width: 50px; + height: 50px; + background-color: #ddd; + border-radius: 50%; + overflow: hidden; + margin-right: 15px; + + img { + width: 100%; + height: auto; + } + } } .sub-prop .fa { diff --git a/templates/blog/content.html b/templates/blog/content.html index 535866b..d06fe83 100644 --- a/templates/blog/content.html +++ b/templates/blog/content.html @@ -9,7 +9,7 @@ {%- endif -%} {% endwith %} • - {{ relative_time(post.publish_on, abs=_('on {time}'), rel=_('{time}')) -}} + {{ relative_time(post.publish_on) }} {%- if post.sticky %} • {% endif -%} {% if post.is_organization_private and show_organization_private_icon %} diff --git a/templates/submission/row.html b/templates/submission/row.html index 73523f6..9f3f2da 100644 --- a/templates/submission/row.html +++ b/templates/submission/row.html @@ -1,45 +1,58 @@ {% set can_view = submission.is_accessible_by(profile) %} -