ui: remove no-heading mark & pdoc-inline-render

This commit is contained in:
undefined committed 2021-09-04 03:38:33 +08:00
1 parent ff7adf0937
commit e2bbaec0e3
8 files changed
+22 -16

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.33.16",
"version": "2.33.17",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
@@ -44,6 +44,8 @@ $downvote-color = red
display: flex
>.media__body
max-width: calc(100% - 6.5em)
+mobile()
max-width: 100%
.dczcomments__supplementary
float: left
+4
View File
@@ -458,3 +458,7 @@ h1, h2, h3, h4, h5, h6
textarea
font-family: Consolas, monospace !important
:focus
outline: 0px;
outline-offset: 2px;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.19.2",
"version": "4.19.3",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -33,7 +33,7 @@
<div class="media__left top">
<img src="{{ avatarUrl(handler.user.avatar, 60) }}" width="60" height="60" class="medium user-profile-avatar">
</div>
<div class="media__body top no-heading">
<div class="media__body top">
<div class="hasjs--hide">
<form method="post" class="dczcomments__box" name="dczcomments__box__form" data-hotkey="ctrl+enter:submit,esc:vjCommentBoxCancel">
<div>
@@ -57,7 +57,7 @@
<div class="media__left top">
<img src="{{ avatarUrl(handler.user.avatar, 50) }}" width="50" height="50" class="medium user-profile-avatar">
</div>
<div class="media__body top no-heading">
<div class="media__body top">
<div class="commentbox-placeholder"></div>
</div>
</div>
@@ -74,7 +74,7 @@
<div class="media__left top">
<img src="{{ avatarUrl(udoc.avatar, 60) }}" width="60" height="60" class="medium user-profile-avatar">
</div>
<div class="media__body top no-heading">
<div class="media__body top">
<div class="clearfix">
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(udoc, avatar=false) }}
@@ -110,7 +110,7 @@
<div class="media__left top">
<img src="{{ avatarUrl(udoc.avatar, 50) }}" width="50" height="50" class="medium user-profile-avatar">
</div>
<div class="media__body top no-heading">
<div class="media__body top">
<div class="clearfix">
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(udoc, avatar=false) }}
@@ -38,7 +38,7 @@
<div class="vote-number">0</div>
</div>
</div>
<div class="media__body top no-heading">
<div class="media__body top">
<div class="clearfix">
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(handler.user) }}
@@ -64,7 +64,7 @@
<ul style="display:none">
<li class="dczcomments__reply commentbox-container">
<div class="media">
<div class="media__body top no-heading">
<div class="media__body top">
<div class="clearfix">
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(handler.user, badge=false) }}
@@ -106,7 +106,7 @@
{% endif %}
</div>
</div>
<div class="media__body top no-heading">
<div class="media__body top">
<div class="clearfix">
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(udoc) }}
@@ -139,7 +139,7 @@
{% set udoc = udict[rdoc['owner']] %}
<li class="dczcomments__reply{% if mode_create %} commentbox-container{% endif %}">
<div class="media">
<div class="media__body top no-heading">
<div class="media__body top">
<div class="clearfix">
<div class="supplementary dczcomments__supplementary">
{{ user.render_inline(udoc, badge=false) }} @ {{ datetimeSpan(rdoc['_id'])|safe }}
@@ -1,4 +1,4 @@
{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, invalid=false) %}
{% macro render_problem_title(pdoc, tdoc=none, show_tags=true, show_invisible_flag=true, invalid=false, inline=false) %}
{%- if not invalid %}
<a
{% if tdoc -%}
@@ -19,17 +19,17 @@
<span class="text-orange">({{ _('Hidden') }})</span>
{%- endif %}
{%- if show_tags %}
{{ render_problem_tags(pdoc) }}
{{ render_problem_tags(pdoc, inline=inline) }}
{%- endif %}
{% endmacro %}
{% macro render_problem_tags(pdoc, show_none_label=false) %}
{% macro render_problem_tags(pdoc, show_none_label=false, inline=false) %}
{%- if pdoc.tag|length > 0 %}
<ul class="problem__tags">
{%- if inline %}<ul class="problem__tags">{% endif -%}
{%- for tag in pdoc['tag'] %}
<li class="problem__tag"><a class="problem__tag-link" href="{{ url('problem_category', category=tag) }}">{{ tag }}</a></li>
{%- endfor %}
</ul>
{%- if inline %}</ul>{% endif -%}
{%- else %}
{%- if show_none_label %}
{{ _('(None)') }}
@@ -1,2 +1,2 @@
{% import "components/problem.html" as problem with context %}
{{ problem.render_problem_title(pdoc) }}
{{ problem.render_problem_title(pdoc, inline=true) }}