Browse Source

initial commit

og-master
Kris 1 year ago
commit
05ad93bd51
4 changed files with 196 additions and 0 deletions
  1. +2
    -0
      .gitignore
  2. +5
    -0
      about.json
  3. +183
    -0
      common/common.scss
  4. +6
    -0
      settings.yml

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
.discourse-site
HELP

+ 5
- 0
about.json View File

@@ -0,0 +1,5 @@
{
"name": "discourse-sidebar-nav",
"about_url": "",
"license_url": ""
}

+ 183
- 0
common/common.scss View File

@@ -0,0 +1,183 @@
// Only applying to main topic lists over 768px wide
@media screen and (min-width: 768px) {
.navigation-topics,
.categories-list,
body[class*="category-"]:not(.archetype-regular):not(.archetype-banner) {

#main-outlet {
padding-top: 6.8572em;
}
// Structuring the main grid layout
.container:first-of-type {
grid-area: alerts;
}
.container:nth-of-type(2) {
grid-area: pins;
}
.list-controls {
grid-area: nav;
}
.list-container {
grid-area: topic-list;
}
.category-breadcrumb {
font-size: 1.1487em;
.badge-wrapper.bullet .badge-category-parent-bg,
.badge-wrapper.bullet .badge-category-bg {
width: 10px;
height: 10px;
}
.select-kit.combo-box.category-drop .select-kit-row .badge-wrapper.box {
font-weight: normal;
padding: 4px 6px;
}
}
#main-outlet {
display: grid;
grid-column-gap: 1.5em;
@if $sidebar-alignment == "left" {
grid-template-columns: 2fr 10fr; // 12 column grid
grid-template-areas:
"alerts alerts"
"pins pins"
"nav topic-list";
} @else {
grid-template-columns: 10fr 2fr;
grid-template-areas:
"alerts alerts"
"pins pins"
"topic-list nav";

}
}



// Changing the layout to fit the grid
.list-container {
min-width: 70%; // Don't let the topic list get too narrow
.topic-list,
.category-list, {
th {
padding-top: 0; // Align to top of nav
}
}
}
.latest-topic-list .table-heading,
.top-topic-list .table-heading {
padding-top: 0;
}
.list-controls {
z-index: 100; // Above topic list content
.container {
position: -webkit-sticky; // required for Safari
position: sticky;
top: 5.8572em; // required for sticky
}
.btn {
margin: 0;
}
#create-topic {
flex: 1 1 auto;
order: 5;
margin-bottom: .5em;
}
button {
order: 6;
}
.notifications-button {
order: 7;
button {
height: 2em;
}
}
.edit-category {
flex: 1 1 auto;
margin-right: .5em;
}
.categories-admin-dropdown {
order: 8;
margin-bottom: .5em;
margin-left: .5em;
margin-top: -1px;
button {
height: 2em;
}
}
.nav-pills {
display: flex;
flex: 1 1 auto;
flex-direction: column;
margin: .5em 0;
li {
margin: 0;
&:empty {
display: none;
}
}
&>li>a {
padding: .5em .714em;
}
@if $sidebar-alignment == left {
&>li.active>a {
&:after {
content: "\f178";
font-family: fontawesome;
display: inline;
float: right;
}
}
}
}
.select-kit-header {
span.category-name {
max-width: 8.5em;
}
}
.category-navigation,
.navigation-container {
display: flex;
flex-wrap: wrap;
ol {
display: flex;
flex-wrap: wrap;
flex: 1 1 auto;
margin: 0;
li.category-drop {
margin: 0;
flex: 1 1 auto;
&:not(:first-of-type) {
margin: .5em 0 0 0;
}
}
}
}
.select-kit .select-kit-header .caret-icon {
&:before {
content: "\f0d7";
}
}
}
}
}

+ 6
- 0
settings.yml View File

@@ -0,0 +1,6 @@
sidebar-alignment:
default: left
type: enum
choices:
- left
- right

Loading…
Cancel
Save