ui: 修复一些显示问题

This commit is contained in:
undefined committed 2021-08-29 23:40:31 +08:00
1 parent dfe60b5890
commit 66c618adda
7 files changed
+23 -11

No files matched your search

@@ -29,6 +29,13 @@ $downvote-color = red
border-top: 0 border-top: 0
.dczcomments__reply .dczcomments__reply
>.media
// FIXME doesn't work on IE 11
display: flex
>.media__body
width: calc(100% - (50px + 0.625rem))
&:last-child &:last-child
>.media >.media
padding-bottom: 0 padding-bottom: 0
@@ -36,7 +43,7 @@ $downvote-color = red
.dczcomments__item > .media .dczcomments__item > .media
display: flex display: flex
>.media__body >.media__body
max-width: calc(100% - 6.5em); max-width: calc(100% - 6.5em)
.dczcomments__supplementary .dczcomments__supplementary
float: left float: left
@@ -4,6 +4,8 @@
list-style: none !important list-style: none !important
font-size: 0 font-size: 0
word-break: keep-all word-break: keep-all
display: flex
flex-wrap: wrap
.problem__tag .problem__tag
display: inline-block display: inline-block
@@ -13,11 +15,15 @@
padding: 0 !important padding: 0 !important
.problem__tag-item .problem__tag-item
padding: rem(0px) padding: 0 10px !important
margin-left: rem(3px) margin-left: rem(3px)
margin-bottom: rem(5px) margin-bottom: rem(5px)
line-height: 30px !important
&:hover &:hover
text-decoration: none text-decoration: none
> span
display: flex
align-items: center
.problem__tag-link .problem__tag-link
display: inline-block display: inline-block
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@hydrooj/ui-default", "name": "@hydrooj/ui-default",
"version": "4.18.10", "version": "4.18.11",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "hydro.js", "main": "hydro.js",
@@ -108,7 +108,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
await $('#scratchpad') await $('#scratchpad')
.transition( .transition(
{ opacity: 1 }, { opacity: 1 },
{ duration: 200, easing: 'easeOutCubic' } { duration: 200, easing: 'easeOutCubic' },
) )
.promise(); .promise();
} }
@@ -117,7 +117,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
await $('#scratchpad') await $('#scratchpad')
.transition( .transition(
{ opacity: 0 }, { opacity: 0 },
{ duration: 200, easing: 'easeOutCubic' } { duration: 200, easing: 'easeOutCubic' },
) )
.promise(); .promise();
} }
@@ -262,7 +262,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
}); });
$(document).on('click', '[name="show_tags"]', (ev) => { $(document).on('click', '[name="show_tags"]', (ev) => {
$(ev.currentTarget).hide(); $(ev.currentTarget).hide();
$('span.tags').show(); $('span.tags').css('display', 'inline-block');
}); });
$('[name="problem-sidebar__download').on('click', handleClickDownloadProblem); $('[name="problem-sidebar__download').on('click', handleClickDownloadProblem);
if (UiContext.pdoc.config?.type === 'objective') loadObjective(); if (UiContext.pdoc.config?.type === 'objective') loadObjective();
@@ -200,8 +200,7 @@ async function handleDownload(ev) {
} }
const page = new NamedPage(['problem_main', 'problem_category'], () => { const page = new NamedPage(['problem_main', 'problem_category'], () => {
const doc = document.documentElement; const doc = document.getElementById('listSection');
doc.className += ' display-mode';
buildCategoryFilter(); buildCategoryFilter();
parseCategorySelection(); parseCategorySelection();
$('[name="leave-edit-mode"]').on('click', () => { $('[name="leave-edit-mode"]').on('click', () => {
@@ -101,7 +101,7 @@
{% include "partials/problem-sidebar-information.html" %} {% include "partials/problem-sidebar-information.html" %}
</div> </div>
{% elif page_name != 'contest_detail_problem' %} {% elif page_name != 'contest_detail_problem' %}
<div class="section side nojs-hide"> <div class="section side nojs--hide">
<div class="section__header"> <div class="section__header">
<h1 class="section__title">{{ _('Statistics') }}</h1> <h1 class="section__title">{{ _('Statistics') }}</h1>
</div> </div>
@@ -9,7 +9,7 @@
}) }} }) }}
<div class="row"> <div class="row">
<div class="medium-9 columns"> <div class="medium-9 columns">
<div class="section"> <div class="section display-mode" id="listSection">
<div class="section__body no-padding"> <div class="section__body no-padding">
<form method="get" id="searchForm" action="{{ url('problem_main') }}"> <form method="get" id="searchForm" action="{{ url('problem_main') }}">
<div class="search"> <div class="search">
@@ -26,7 +26,7 @@
</div> </div>
<div class="medium-3 columns"> <div class="medium-3 columns">
{% if handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) %} {% if handler.user.hasPerm(perm.PERM_EDIT_PROBLEM) %}
<div class="section side"> <div class="section side nojs--hide">
<ol class="menu"> <ol class="menu">
<a href="javascript:;" class="menu__link edit-mode-hide" name="enter-edit-mode"> <a href="javascript:;" class="menu__link edit-mode-hide" name="enter-edit-mode">
<span class="icon icon-edit"></span> <span class="icon icon-edit"></span>