Clean up page tab's css

This commit is contained in:
int-y1 2022-11-14 02:28:05 -05:00 committed by Tudor Brindus
parent e97030a4c1
commit a5ed64dea7
6 changed files with 9 additions and 41 deletions

View File

@ -498,11 +498,6 @@ noscript #noscript {
display: inline-block;
}
.spacer {
display: inline-block;
flex: 1 1 1px;
}
#user-links {
height: 100%;

View File

@ -360,17 +360,3 @@ $.fn.textWidth = function () {
$(this).html(html_org);
return width;
};
$(function () {
$('.tabs').each(function () {
var $this = $(this), $h2 = $(this).find('h2'), $ul = $(this).find('ul');
var cutoff = ($h2.textWidth() || 400) + 20, handler;
$ul.children().each(function () {
cutoff += $(this).width();
});
$(window).resize(handler = function () {
$this.toggleClass('tabs-no-flex', $this.width() < cutoff);
});
handler();
});
});

View File

@ -170,10 +170,8 @@ input {
margin: 0 0 8px;
width: 100%;
display: flex;
&.tabs-no-flex {
display: block;
}
justify-content: space-between;
flex-wrap: wrap;
.tab {
.tab-icon {

View File

@ -15,7 +15,6 @@
{% if prev_month or next_month %}|{% endif %}
<a href="{{ url('contest_ical') }}">{{ _("Export") }}</a>
</div>
<span class="spacer"></span>
{% endif %}
{% endblock %}

View File

@ -6,13 +6,10 @@
</li>
{% endmacro %}
<div class="page-title">
<div class="tabs">
<h2>{{ content_title or title }}</h2>
<span class="spacer"></span>
{% block post_tab_spacer %}{% endblock %}
<ul>
{% block tabs %}{% endblock %}
</ul>
</div>
</div>
<div class="tabs">
<h2>{{ content_title or title }}</h2>
{% block post_tab_spacer %}{% endblock %}
<ul>
{% block tabs %}{% endblock %}
</ul>
</div>

View File

@ -16,13 +16,6 @@
display: block;
border-radius: 6px;
}
.page-title {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
</style>
{% endblock %}