Change UI

This commit is contained in:
cuom1999 2022-06-02 17:09:24 -05:00
parent 5e963c6494
commit ba69ec2ffc
4 changed files with 96 additions and 91 deletions

View file

@ -39,6 +39,8 @@
.left-sidebar-item.active { .left-sidebar-item.active {
color: green; color: green;
font-weight: bold;
background-color: lightgreen;
.sidebar-icon { .sidebar-icon {
color: green; color: green;
} }
@ -101,67 +103,6 @@
color: #555; color: #555;
} }
@media (max-width: 799px) {
.left-sidebar-header {
display: none;
}
.left-sidebar-item {
display: inline-block;
flex: 1;
}
.left-sidebar {
text-align: right;
margin-bottom: 1em;
border-radius: 7px;
display: flex;
}
}
@media (min-width: 800px) {
.middle-content, .blog-sidebar, .right-sidebar {
display: block !important;
}
.middle-content {
margin-right: 1em !important;
}
#mobile.tabs {
display: none;
}
#three-col-container {
display: flex;
}
.middle-content {
max-width: 71.5%;
margin-left: 10%;
}
.blog-sidebar, .right-sidebar {
width: 18%;
}
.left-sidebar {
width: 8%;
margin-right: 1em;
position: fixed;
height: 100%;
margin-top: -4em;
padding-top: 4em;
border-right: 3px solid black;
}
.feed-table {
font-size: small;
}
.blog-box {
border-left: 2px solid black;
border-right: 2px solid black;
border-radius: 8px;
}
}
#mobile.tabs { #mobile.tabs {
margin: 0; margin: 0;
@ -194,9 +135,9 @@
} }
.blog-box { .blog-box {
border-bottom: 1px solid black; border-bottom: 1.4px solid lightgray;
border-top: 2px solid black; border-top: 1.4px solid lightgray;
margin-bottom: 1em; margin-bottom: 1.5em;
width: 90%; width: 90%;
padding: 1em 1.25em 0.5em 1.25em; padding: 1em 1.25em 0.5em 1.25em;
background-color: white; background-color: white;
@ -230,22 +171,21 @@
color: gray; color: gray;
} }
.left-sidebar {
background-color: #f0f1f3;
color: #616161;
}
.left-sidebar-item { .left-sidebar-item {
padding: 1em 0.5em; padding: 0.8em 0.2em 0.8em 1em;
text-align: center; .sidebar-icon {
width: 1.2em;
display: inline-block;
}
} }
.left-sidebar-item:hover { .left-sidebar-item:hover {
background-color: lightgray; background-color: #e3e3e3;
cursor: pointer; cursor: pointer;
} }
.left-sidebar-item.active:hover {
background-color: lightgreen;
}
.sidebar-icon { .sidebar-icon {
font-size: x-large;
margin-bottom: 0.1em;
color: black; color: black;
} }
.left-sidebar-header { .left-sidebar-header {
@ -257,4 +197,72 @@
} }
.feed-table { .feed-table {
margin: 0; margin: 0;
}
.pre-expand-blog {
background-image: -webkit-linear-gradient(bottom, gray, lightgray 3%, transparent 8%, transparent 100%);
padding-bottom: 0;
}
@media (max-width: 799px) {
.left-sidebar-header {
display: none;
}
.left-sidebar-item {
display: inline-block;
flex: 1;
border-radius: 8px;
}
.left-sidebar {
text-align: center;
margin-bottom: 1em;
border-radius: 7px;
display: flex;
}
}
@media (min-width: 800px) {
.middle-content, .blog-sidebar, .right-sidebar {
display: block !important;
}
.middle-content {
margin-right: 1em !important;
}
#mobile.tabs {
display: none;
}
#three-col-container {
display: flex;
}
.middle-content {
max-width: 65%;
margin-left: 13%;
}
.blog-sidebar, .right-sidebar {
width: 20%;
}
.left-sidebar {
width: 11%;
position: fixed;
height: 100%;
margin-top: -4em;
padding-top: 4em;
}
.left-sidebar-item {
border-radius: 0 2em 2em 0;
}
.feed-table {
font-size: small;
}
.blog-box {
border-left: 1.4px solid lightgray;
border-right: 1.4px solid lightgray;
border-radius: 8px;
}
} }

View file

@ -318,7 +318,7 @@ ul.problem-list {
} }
.problem-feed-option-item.active { .problem-feed-option-item.active {
background: goldenrod; background: lightblue;
color: darkblue; color: darkblue;
} }

View file

@ -2,18 +2,6 @@
{% if (is_member or can_edit) %} {% if (is_member or can_edit) %}
{% include 'contests-countdown.html' %} {% include 'contests-countdown.html' %}
{% endif %} {% endif %}
{% if is_member or can_edit %}
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown('organization-about', MATH_ENGINE)|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% endif %}
{% if can_edit or is_member %} {% if can_edit or is_member %}
<div id="control-panel" class="blog-sidebox sidebox no-dot-blog-sidebox"> <div id="control-panel" class="blog-sidebox sidebox no-dot-blog-sidebox">
<h3>{{ _('Controls') }} <i class="fa fa-cog"></i></h3> <h3>{{ _('Controls') }} <i class="fa fa-cog"></i></h3>
@ -71,6 +59,16 @@
{% endif %} {% endif %}
</ul> </ul>
</div> </div>
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown('organization-about', MATH_ENGINE)|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% endif %} {% endif %}
{% include 'top-users.html' %} {% include 'top-users.html' %}
</div> </div>

View file

@ -31,8 +31,7 @@
}) })
$('.blog-description').each(function() { $('.blog-description').each(function() {
if ($(this).prop('scrollHeight') > $(this).height() ) { if ($(this).prop('scrollHeight') > $(this).height() ) {
$(this).parent().css('background-image', '-webkit-linear-gradient(bottom, gray, lightgray 3%, transparent 8%, transparent 100%)'); $(this).parent().addClass('pre-expand-blog');
$(this).parent().css('padding-bottom', '0');
$(this).css('cursor', 'pointer'); $(this).css('cursor', 'pointer');
} }
}); });
@ -43,8 +42,8 @@
{% macro make_tab_item(name, fa, url, text) %} {% macro make_tab_item(name, fa, url, text) %}
<div class="left-sidebar-item {% if page_type == name %}active{% endif %}" data-href="{{ url }}" id="{{ name }}-tab"> <div class="left-sidebar-item {% if page_type == name %}active{% endif %}" data-href="{{ url }}" id="{{ name }}-tab">
<div class="sidebar-icon"><i class="{{ fa }}"></i></div> <span class="sidebar-icon"><i class="{{ fa }}"></i></span>
{{ text }} <span>{{ text }}</span>
</div> </div>
{% endmacro %} {% endmacro %}