Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/eventyay/control/templates/pretixcontrol/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
<li class="testmode">
<a href="{% url "control:event.live" event=request.event.slug organizer=request.organizer.slug %}">
<i class="fa fa-warning fa-fw"></i>
{% trans "TEST MODE" %}
<span class="sidebar-text">{% trans "TEST MODE" %}</span>
</a>
</li>
{% endif %}
Expand All @@ -289,7 +289,7 @@
<span class="fa fa-fw fa-{{ nav.icon }}"></span>
{% endif %}
{% endif %}
{{ nav.label }}
<span class="sidebar-text">{{ nav.label }}</span>
</a>
{% if nav.children %}
<a href="#" class="arrow">
Expand All @@ -301,7 +301,7 @@
<a href="{{ item.url }}"
{% if item.external %}target="_blank"{% endif %}
{% if item.active %}class="active"{% endif %}>
{{ item.label }}
<span class="sidebar-text">{{ item.label }}</span>
</a>
</li>
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
<span class="fa fa-fw fa-{{ nav.icon }}"></span>
{% endif %}
{% endif %}
{{ nav.label }}
<span class="sidebar-text">{{ nav.label }}</span>
</a>
{% if nav.children %}
<a href="#" class="arrow">
Expand All @@ -240,7 +240,7 @@
<a href="{{ item.url }}"
{% if item.external %}target="_blank"{% endif %}
{% if item.active %}class="active"{% endif %}>
{{ item.label }}
<span class="sidebar-text">{{ item.label }}</span>
</a>
</li>
{% endfor %}
Expand Down
215 changes: 79 additions & 136 deletions app/eventyay/static/pretixcontrol/scss/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
padding-right: 0;
z-index: 1;

&:hover, &:focus {
&:hover,
&:focus {
background-color: transparent !important;
color: rgba(255, 255, 255, 0.8);
outline: none;
Expand All @@ -27,102 +28,54 @@
}
}

.navbar-header > .navbar-toggle[data-toggle="collapse"] {
.navbar-header>.navbar-toggle[data-toggle="collapse"] {
display: none !important;
}

body.sidebar-minimized {
.sidebar {
width: 45px;
overflow: hidden;
transition: none;

.nav > li > a {
display: flex;
align-items: center;
justify-content: center;
font-size: 0;
padding: 12px 0;
text-align: center;
width: 100%;
height: 45px;
box-sizing: border-box;

span {
display: none;
}

.fa, svg {
font-size: 1.5rem;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
width: 100%;
height: 100%;
position: relative;
left: 0;
}
.nav>li {
>a {
padding: 10px 15px;

.fa.fa-fw {
width: 100%;
text-align: center;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
.fa,
svg {
margin-right: 5px;
}

&::after, &::before {
display: none;
.sidebar-text {
display: none;
}
}
}

.nav > li > a.arrow {
.nav>li>a.arrow {
display: none;
}

.sidebar-nav .nav-second-level {
display: none;
}

.context-selector .context-indicator .context-name,
.context-selector .context-indicator .context-meta {
display: none;
}

// Style the context-selector dropdown-toggle to match expanded state alignment
.context-selector {
.dropdown-toggle {
padding: 10px 0;
padding: 8px 0 8px 4px;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
position: relative;
width: 100%;

span.caret {
display: none;
}

.context-icon {
width: 2.5em;
height: 2.5em;
line-height: 2.5em;
margin: 0;
}

.context-icon .fa-circle {
font-size: 2em;
}

.context-icon .fa-dashboard,
.context-icon .fa-group {
font-size: 1em;
visibility: visible;
opacity: 1;
min-width: 38px;
flex-shrink: 0;
}

.context-indicator {
Expand Down Expand Up @@ -152,17 +105,39 @@ body.sidebar-minimized {
z-index: 12;
transform: translateX(-100%);
overflow-y: auto;
box-shadow: 2px 0 5px rgba(0,0,0,0.2);
transition: transform 0.3s ease;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
height: calc(100vh - var(--navbar-height, 50px));

.nav > li > a {
display: block;
font-size: inherit;
padding: 10px 15px;
.nav>li {
height: 41px;

>a {
display: flex;
align-items: center;
font-size: 14px;
padding: 10px 15px;
height: 41px;

span {
display: inline;
span {
display: inline;
}

.fa,
svg {
font-size: 14px;
margin: 0;
margin-right: 10px;
display: inline-block;
width: 1.28571429em;
text-align: center;
line-height: 1;
flex-shrink: 0;
}

.fa.fa-fw {
width: 1.28571429em;
text-align: center;
}
}
}

Expand Down Expand Up @@ -197,42 +172,24 @@ body.sidebar-minimized {
width: 250px;
overflow-y: auto;
overflow-x: visible;
transition: none;

.nav > li > a {
display: block;
align-items: normal;
justify-content: normal;
font-size: inherit;
padding: 10px 15px;
text-align: left;
width: auto;

span {
display: inline;
}

.fa, svg {
font-size: inherit;
margin: 0;
padding: 0;
display: inline;
text-align: inherit;
width: auto;
position: static;
left: auto;
}
.nav>li {
>a {
padding: 10px 15px;

.fa.fa-fw {
width: 1.25em;
text-align: center;
}
.sidebar-text {
display: inline-block;
}

&::after, &::before {
display: block;
.fa,
svg {
margin-right: 5px;
}
}
}

.nav > li > a.arrow {
.nav>li>a.arrow {
display: block;
position: absolute;
right: 0;
Expand All @@ -249,11 +206,11 @@ body.sidebar-minimized {
}
}

.nav > li.active > a > .fa.arrow:before {
.nav>li.active>a>.fa.arrow:before {
content: "\f107";
}

.nav > li > a.has-children {
.nav>li>a.has-children {
margin-right: 40px;
}

Expand Down Expand Up @@ -305,15 +262,17 @@ body.sidebar-minimized {
}

li.active {
> ul.nav-second-level {
>ul.nav-second-level {
display: block;
}
}

.context-selector {
.dropdown-toggle {
padding: 10px 20px 9px 7px;
display: block;
padding: 8px 0 8px 4px;
display: flex;
flex-direction: row;
align-items: center;
text-decoration: none;
position: relative;

Expand All @@ -325,60 +284,44 @@ body.sidebar-minimized {
}

.context-icon {
width: 2.5em;
height: 2.5em;
line-height: 2.5em;
}

.context-icon .fa-circle {
font-size: 2em;
}

.context-icon .fa-dashboard, .context-icon .fa-group {
font-size: 1em;
visibility: visible;
opacity: 1;
min-width: 38px;
flex-shrink: 0;
}
}

border-bottom: 2px solid darken($gray-lightest, 6.5%);

.context-indicator {
display: inline-block;
padding-left: 5px;
padding-right: 2px;
line-height: 15px;
vertical-align: middle;
display: flex;
flex-direction: column;
flex-grow: 1;
overflow: hidden;
margin-left: 6px;

span {
display: block;
width: 170px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

span.context-name {
font-weight: bold;
vertical-align: middle;
font-size: 15px;
display: block;
}

span.context-meta {
opacity: 0.7;
font-size: 11px;
display: block;
}
}
}
}

body.sidebar-minimized:has(.sidebar:hover) #page-wrapper {
margin-left: 250px;
}
}

body.sidebar-minimized .sidebar {
min-height: 100vh;
}
}