discourse/app/assets/stylesheets/common/base/menu-panel.scss

353 lines
6.3 KiB
SCSS
Raw Normal View History

.menu-panel.slide-in {
position: fixed;
right: 0;
box-shadow: shadow("header");
2015-09-11 00:49:54 +08:00
.panel-body {
position: absolute;
top: 3px;
bottom: 37px;
width: 97%;
}
}
.menu-panel.drop-down {
position: absolute;
// positions are relative to the .d-header .panel div
top: 100%; // directly underneath .panel
right: -10px; // 10px to the right of .panel - adjust as needed
}
.menu-panel {
border: 1px solid $primary-low;
box-shadow: shadow("menu-panel");
background-color: $secondary;
z-index: z("header");
2015-08-30 07:26:02 +08:00
padding: 0.5em;
width: 300px;
2015-08-30 07:26:02 +08:00
hr {
margin: 3px 0;
}
.panel-header {
position: absolute;
right: 20px;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.panel-body {
overflow-y: auto;
overflow-x: hidden;
}
}
2015-09-04 03:57:00 +08:00
.menu-links.columned {
li {
width: 50%;
float: left;
}
}
.menu-panel {
ul.menu-links li, ul li.heading {
a {
2015-08-30 07:26:02 +08:00
padding: 0.25em 0.5em;
display: block;
&:hover {
2017-06-12 10:20:14 +08:00
background-color: $highlight-medium;
}
}
.new {
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
margin-left: 0.5em;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
}
}
li.category-link {
float: left;
background-color: transparent;
display: inline-flex;
margin: 0.25em 0.5em;
width: 43%;
.badge-notification {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
background-color: transparent;
display: inline;
padding: 0;
font-size: $font-down-1;
line-height: $line-height-large;
}
.badge-wrapper {
overflow: hidden;
text-overflow: ellipsis;
&.bar, &.bullet {
color: $primary;
}
&.box {
color: $secondary;
+ a.badge.badge-notification {
padding-top: 2px;
}
span {
z-index: z("base") * -1;
}
}
}
}
// note these topic counts only appear for anons in the category hamburger drop down
b.topics-count {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
font-weight: normal;
font-size: $font-down-1;
}
.box + b.topics-count {
padding-top: 2px;
}
span.badge-category {
max-width: 90px;
overflow: hidden;
text-overflow: ellipsis;
}
}
.search-menu {
.search-input {
position: relative;
}
.search-context .show-help {
float: right;
}
.heading {
padding: 5px 0 5px 5px;
.filter {
padding: 0 5px;
}
}
input[type='text'] {
margin: 0.5em 3px;
2015-09-01 04:27:36 +08:00
box-sizing: border-box;
width: calc(100% - 6px);
2015-09-01 04:27:36 +08:00
height: 32px;
}
.search-context {
padding: 0 5px;
label { margin-bottom: 0; }
}
.searching {
position: absolute;
top: 1.15em;
right: 1em;
.spinner {
width: 10px;
height: 10px;
border-width: 2px;
margin: 0;
}
}
// I am ghetto using this to display "Show More".. be warned
.no-results {
padding: 5px;
text-align: center;
}
.filter {
padding: 0;
&:hover {background: transparent;}
}
.search-link {
.badge-category-parent {
2018-01-13 06:27:38 +08:00
line-height: $line-height-small;
}
.topic-title {
margin-right: 6px;
}
.topic-statuses {
float: none;
display: inline-block;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
margin: 0;
.fa {
margin: 0;
}
}
}
li:not(.category):not(.heading) {
2018-01-13 06:27:38 +08:00
font-size: $font-0;
line-height: $line-height-medium;
.fa {
font-size: inherit;
}
a {
&:not(.discourse-tag) {
display: block;
padding: 5px;
}
transition: all linear .15s;
.user-results {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-high, $secondary-low);
}
}
&:hover a:not(.badge-notification) {
2017-06-12 10:20:14 +08:00
background-color: $highlight-medium;
}
button {margin-left: 5px;}
}
}
.user-menu {
.notifications {
h3 {
padding: 0 0.4em;
font-weight: bold;
margin: 0.5em 0;
}
2017-10-11 04:07:46 +08:00
.fa { color: dark-light-choose($primary-medium, $secondary-medium); }
.icon { color: dark-light-choose($primary-high, $secondary-low); }
li {
2017-06-12 10:20:14 +08:00
background-color: $tertiary-low;
// This is until other languages remove the HTML from within
// notifications. It can then be removed
div i.fa {
display: none;
}
span { color: $primary; }
2017-06-12 10:20:14 +08:00
&:hover { background-color: $highlight-medium; }
a { padding: 0; }
p {
margin: 0;
overflow: hidden;
}
}
li:not(.show-all) {
padding: 0.25em 0.5em;
i {
float: left;
margin-right: 5px;
padding-top: 2px;
}
}
.is-warning {
.d-icon-envelope-o {
&:before {
content: "\f0e0";
}
color: $danger;
}
}
.read {
background-color: $secondary;
}
.none {
padding-top: 5px;
}
.spinner-container.visible {
min-height: 30px;
}
.spinner {
width: 20px;
height: 20px;
border-width: 2px;
margin: 0 auto;
}
.show-all .btn {
width: 100%;
padding: 2px 0;
color: dark-light-choose($primary-medium, $secondary-high);
background: blend-primary-secondary(5%);
&:hover {
color: $primary;
background: dark-light-diff($primary, $secondary, 90%, -80%);
}
}
/* as a big ol' click target, don't let text inside be selected */
@include unselectable;
}
.logout-link, .dismiss-link {
display: inline-block;
}
.dismiss-link {
float: right;
}
}
2015-08-30 07:26:02 +08:00
.notifications .logout {
padding: 0.25em;
&:hover {
2017-06-12 10:20:14 +08:00
background-color: $highlight-medium;
}
}
div.menu-links-header {
2015-08-30 07:26:02 +08:00
width: 100%;
display: table;
border-collapse: separate;
border-spacing: 0 0.5em;
.menu-links-row {
display: table-row;
}
a:hover {
2017-06-12 10:20:14 +08:00
background-color: $highlight-medium;
2015-08-30 07:26:02 +08:00
}
a {
padding: 0.5em;
}
a.user-activity-link {
max-width: 150px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: -0.5em 0;
}
2015-08-30 07:26:02 +08:00
li {
display: table-cell;
width: auto;
text-align: center;
}
li:first-child {
text-align: left;
}
li:last-child {
text-align: right;
}
2015-08-31 10:07:30 +08:00
.fa, a {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2015-08-31 10:07:30 +08:00
}
.d-icon-user {
margin-right: 0.2em;
2015-08-30 07:26:02 +08:00
}
}