framework/ember/app/styles/flarum/index.less
Toby Zerner c28307903b Upgrade to Ember 1.11-beta.1
HTMLBars goodness! Since there was some breakage and a lot of fiddling
around to get some things working, I took this opportunity to do a big
cleanup of the whole Ember app. I accidentally worked on some new
features too :3

Note that the app is still broken right now, pending on
https://github.com/emberjs/ember.js/issues/10401

Cleanup:
- Restructuring of components
- Consolidation of some stuff into mixins, cleanup of some APIs that
will be public
- Change all instances of .property() / .observes() / .on() to
Ember.computed() / Ember.observer() / Ember.on() respectively (I think
it is more readable)
- More comments
- Start conforming to a code style (2 spaces for indentation)

New features:
- Post hiding/restoring
- Mark individual discussions as read by clicking
- Clicking on a read discussion jumps to the end
- Mark all discussions as read
- Progressively mark the discussion as read as the page is scrolled
- Unordered list post formatting
- Post permalink popup

Demo once that Ember regression is fixed!
2015-02-10 18:05:40 +10:30

254 lines
4.4 KiB
Plaintext

// ------------------------------------
// Sidebar
.index-nav {
float: left;
&, & > ul {
width: 175px;
}
& > ul {
margin: 30px 0 0;
padding: 0;
list-style-type: none;
&.affix {
top: 56px;
}
& > li {
margin-bottom: 10px;
}
}
& .new-discussion {
display: block;
margin-bottom: 20px;
}
// Expand the dropdown-select component into a normal nav list
// @todo Extract this into a mixin as we'll need to do it elsewhere.
& .dropdown-select {
display: block;
& .dropdown-toggle {
display: none;
}
& .dropdown-menu {
display: block;
border: 0;
width: auto;
margin: 0;
padding: 0;
min-width: 0;
float: none;
position: static;
background: none;
.box-shadow(none);
& > li > a {
padding: 8px 0;
color: @fl-body-muted-color;
& .fa {
margin-right: 8px;
font-size: 15px;
}
&:hover {
background: none;
color: @link-hover-color;
}
}
& > li.active > a {
background: none;
color: @fl-primary-color;
font-weight: bold;
}
}
}
}
// ------------------------------------
// Results
.index-results {
margin-top: 30px;
margin-left: 225px;
& .loading-indicator {
height: 46px;
}
}
.index-toolbar {
margin-bottom: 15px;
}
.index-toolbar-view {
display: inline-block;
& .control-show {
margin-right: 10px;
}
}
.index-toolbar-action {
float: right;
}
// ------------------------------------
// Discussions Pane
@index-pane-width: 400px;
.index-area {
left: -@index-pane-width;
width: 100%;
&.paned {
position: fixed;
z-index: @zindex-pane;
overflow: auto;
top: 56px;
bottom: 0;
width: @index-pane-width;
background: #fff;
padding-bottom: 200px;
.box-shadow(2px 2px 6px -2px rgba(0, 0, 0, 0.25));
.transition(left 0.2s);
&.showing, .with-pane & {
left: 0;
}
.with-pane & {
z-index: @zindex-composer - 1;
.transition(none);
}
& .container {
width: auto;
margin: 0;
padding: 0 !important;
}
& .index-results {
margin: 0;
}
& .hero, & .index-nav, & .index-toolbar {
display: none;
}
& .discussions-list > li {
margin: 0;
padding-left: 65px + 15px;
padding-right: 65px + 15px;
&.active {
background: @fl-secondary-color;
}
}
& .discussion-summary {
& .title {
font-size: 14px;
}
& .count strong {
font-size: 18px;
}
}
}
}
// When the pane is pinned, move the other page content inwards
.global-main, .global-footer {
.with-pane & {
margin-left: @index-pane-width;
& .container {
max-width: 100%;
padding: 0 30px;
}
}
}
.global-header .container {
.with-pane & {
width: 100%;
}
}
// ------------------------------------
// Discussions List
.discussions-list {
margin: 0;
padding: 0;
list-style-type: none;
position: relative;
& > li {
margin-right: -25px;
padding-right: 65px + 25px;
& .contextual-controls {
position: absolute;
right: 0;
top: 18px;
visibility: hidden;
}
&:hover .contextual-controls, & .contextual-controls.open {
visibility: visible;
}
}
}
.discussion-summary {
padding-left: 65px;
padding-right: 65px;
position: relative;
&, & a {
color: @fl-body-muted-color;
}
& .author {
float: left;
margin-left: -65px;
margin-top: 18px;
}
& .main {
display: inline-block;
width: 100%;
padding: 20px 0;
margin-right: -65px;
&.active {
text-decoration: none;
}
}
& .title {
margin: 0 0 5px;
font-size: 15px;
line-height: 1.3;
}
& .info {
list-style-type: none;
padding: 0;
margin: 0;
& > li {
display: inline-block;
}
}
& .count {
float: right;
margin-top: 18px;
margin-right: -65px;
width: 60px;
text-align: center;
text-transform: uppercase;
color: @fl-body-muted-color;
font-size: 11px;
text-decoration: none;
& strong {
font-size: 20px;
display: block;
font-weight: 300;
}
.unread& {
cursor: pointer;
}
.unread&, .unread& strong {
color: @fl-body-heading-color;
font-weight: bold;
}
}
}
.load-more {
text-align: center;
margin-top: 10px;
}