Skip to content

Commit

Permalink
Design right sidebar of problem and organization home page (#117)
Browse files Browse the repository at this point in the history
* Design right sidebar of problem and organization home page

* Change button small and message button
  • Loading branch information
anhkha2003 authored Jun 10, 2024
1 parent d7cc620 commit 45c1f40
Show file tree
Hide file tree
Showing 9 changed files with 506 additions and 441 deletions.
461 changes: 235 additions & 226 deletions locale/vi/LC_MESSAGES/django.po

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions resources/darkmode.css

Large diffs are not rendered by default.

30 changes: 27 additions & 3 deletions resources/widgets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -792,10 +792,34 @@ ul.errorlist {
align-self: center !important;
}

.a-problem {
font-size: 15px;
line-height: 1.8;
.link-row {
display: flex;
align-items: center;
padding: 6px;
font-weight: normal;
cursor: pointer;
transition: background-color 0.3s;

a {
color: inherit;
display: flex;
align-items: center;
width: 100%;
text-decoration: none;

i {
width: 1.5em;
}
}

span {
flex-grow: 1;
}

&:hover {
color: $theme_color;
background-color: #f8f8f2;
}
}

a {
Expand Down
2 changes: 1 addition & 1 deletion templates/actionbar/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{% if actionbar_report_url %}
<span class="actionbar-block">
<a class="actionbar-button black" href="{{actionbar_report_url}}">
<i class="fa fa-flag-o" style="font-size: large;"></i>
<i class="fa fa-flag" style="font-size: large;"></i>
<span class="actionbar-text">{{_("Report")}}</span>
</a>
</span>
Expand Down
3 changes: 2 additions & 1 deletion templates/organization/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ <h2><img src="{{logo_override_image}}" style="height: 3rem; vertical-align: midd
</form>
{% else %}
<a href="{{ url('request_organization', organization.id, organization.slug) }}"
class="unselectable button">{{ _('Request membership') }}</a>
class="unselectable button">
{{ _('Request membership') }}</a>
{% endif %}
{% endif %}
</div>
Expand Down
93 changes: 43 additions & 50 deletions templates/organization/org-right-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,64 @@
<h3><i class="fa fa-cog"></i>{{ _('Controls') }}</h3>
<ul id="control-list" class="sidebox-content" style="margin: 0;">
{% if can_edit %}
<li>
<div>
<a href="{{ url('edit_organization', organization.id, organization.slug) }}">{{ _('Edit group') }}</a>
</div>
</li>
<div class="link-row">
<a href="{{ url('edit_organization', organization.id, organization.slug) }}">
<i class="fa fa-edit"></i>{{ _('Edit group') }}</a>
</div>
{% endif %}
{% if can_edit and not organization.is_open %}
<li>
<div>
<a href="{{ url('organization_requests_pending', organization.id, organization.slug) }}">{{ _('View requests') }}</a>
{% if pending_count > 0 %}
<span id="pending-count-box">
{{pending_count}}
</span>
{% endif %}
</div>
</li>
<div class="link-row">
<a href="{{ url('organization_requests_pending', organization.id, organization.slug) }}">
<i class="fa fa-inbox"></i>{{ _('View requests') }}</a>
{% if pending_count > 0 %}
<span id="pending-count-box">
{{pending_count}}
</span>
{% endif %}
</div>
{% endif %}
{% if can_edit %}
<li>
<div>
<a href="{{ url('add_organization_member', organization.id, organization.slug) }}">{{ _('Add members') }}</a>
</div>
</li>
<div class="link-row">
<a href="{{ url('add_organization_member', organization.id, organization.slug) }}">
<i class="fa fa-user-plus"></i>{{ _('Add members') }}</a>
</div>
{% endif %}
{% if is_member %}
<li>
<div>
<a href="{{ url('add_organization_blog', organization.id, organization.slug) }}">{{ _('Add blog') }}</a>
</div>
</li>
{% endif %}
<li>
<div>
<a href="{{ url('organization_pending_blogs', organization.id, organization.slug) }}">{{ _('Pending blogs') }}</a>
{% if pending_blog_count > 0 %}
<span id="pending-count-box">
{{pending_blog_count}}
</span>
{% endif %}
<div class="link-row">
<a href="{{ url('add_organization_blog', organization.id, organization.slug) }}">
<i class="fa fa-pencil"></i>{{ _('Add blog') }}</a>
</div>
</li>
{% endif %}
<div class="link-row">
<a href="{{ url('organization_pending_blogs', organization.id, organization.slug) }}">
<i class="fa fa-clipboard-list"></i>{{ _('Pending blogs') }}</a>
{% if pending_blog_count > 0 %}
<span id="pending-count-box">
{{pending_blog_count}}
</span>
{% endif %}
</div>
{% if can_edit %}
<li>
<div>
<a href="{{ url('organization_contest_add', organization.id, organization.slug) }}">{{ _('Add contest') }}</a>
</div>
</li>
<div class="link-row">
<a href="{{ url('organization_contest_add', organization.id, organization.slug) }}">
<i class="fa fa-calendar-plus"></i>{{ _('Add contest') }}</a>
</div>
{% endif %}
{% if is_member %}
<li>
<div>
<a href="{{ organization_subdomain }}" target="_blank">
{{_('Subdomain')}}
</a>
</div>
</li>
<div class="link-row">
<a href="{{ organization_subdomain }}" target="_blank">
<i class="fa fa-globe"></i>{{_('Subdomain')}}
</a>
</div>
{% endif %}
{% if is_member and not is_admin %}
<li>
<div class="link-row" style="color: red;">
<form method="post" action="{{ url('leave_organization', organization.id, organization.slug) }}">
{% csrf_token %}
<a href="#" class="leave-organization">{{ _('Leave group') }}</a>
<a href="#" class="leave-organization">
<i class="fa fa-sign-out-alt"></i>{{ _('Leave group') }}</a>
</form>
</li>
</div>
{% endif %}
</ul>
</div>
Expand Down
Loading

0 comments on commit 45c1f40

Please sign in to comment.