mirror of
https://github.com/flarum/core.git
synced 2025-07-31 21:50:50 +02:00
Big front-end asset/filestructure refactor
- Extract shared Ember components into a “flarum-common” ember-cli addon. This can be used by both the forum + admin Ember apps, keeping things DRY - Move LESS styles into their own top-level directory and do a similar thing (extract common styles) - Add LESS/JS compilation and versioning to PHP (AssetManager) - Set up admin entry point (Theoretical) upgrade instructions: - Delete everything in [app_root]/public - Set up tooling in forum/admin Ember apps (npm install/update, bower install/update) and then build them (ember build) - php artisan vendor:publish - Upgrade flarum/flarum repo (slight change in a config file) - If you need to trigger a LESS/JS recompile, delete the .css/.js files in [app_root]/public/flarum. I set up LiveReload to do this for me when I change files in less/ or ember/ Todo: - Start writing admin app! - Remove bootstrap/font-awesome from repo and instead depend on their composer packages? Maybe? (Bower is not an option here)
This commit is contained in:
34
less/forum/app.less
Normal file
34
less/forum/app.less
Normal file
@@ -0,0 +1,34 @@
|
||||
@import "@{common-path}/config.less";
|
||||
|
||||
@common-path: "../common";
|
||||
|
||||
@import "@{common-path}/bootstrap.less";
|
||||
|
||||
// We want to specify the @fa-font-path variable AFTER we import font awesome
|
||||
// so that it overrides the default definition.
|
||||
@import "@{common-path}/font-awesome/font-awesome.less";
|
||||
@fa-font-path: "/flarum/fonts";
|
||||
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,300);
|
||||
|
||||
// Finally, with our vendor CSS loaded, we can import Flarum-specific stuff.
|
||||
@import "@{common-path}/components.less";
|
||||
@import "@{common-path}/buttons.less";
|
||||
@import "@{common-path}/badges.less";
|
||||
@import "@{common-path}/dropdowns.less";
|
||||
@import "@{common-path}/avatars.less";
|
||||
@import "@{common-path}/forms.less";
|
||||
@import "@{common-path}/alerts.less";
|
||||
@import "@{common-path}/modals.less";
|
||||
@import "@{common-path}/layout.less";
|
||||
|
||||
@import "composer.less";
|
||||
@import "notifications.less";
|
||||
@import "hero.less";
|
||||
|
||||
@import "index.less";
|
||||
@import "discussion.less";
|
||||
@import "user.less";
|
||||
@import "settings.less";
|
||||
@import "login.less";
|
||||
@import "signup.less";
|
238
less/forum/composer.less
Normal file
238
less/forum/composer.less
Normal file
@@ -0,0 +1,238 @@
|
||||
// ------------------------------------
|
||||
// Composer
|
||||
|
||||
.composer {
|
||||
pointer-events: auto;
|
||||
.box-shadow(0 2px 6px @fl-shadow-color);
|
||||
}
|
||||
.composer-controls {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.composer-header {
|
||||
list-style: none;
|
||||
padding: 1px 0;
|
||||
margin: 0;
|
||||
|
||||
& h3 {
|
||||
margin: 0 0 10px;
|
||||
line-height: 1.5em;
|
||||
|
||||
&, & input {
|
||||
color: @fl-body-muted-color;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
}
|
||||
& input {
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.composer-loading {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
border-radius: @border-radius-base @border-radius-base 0 0;
|
||||
.transition(opacity 0.2s);
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// On phones, show the composer as a fixed overlay that covers the whole
|
||||
// screen. The controls are hidden (except for the 'x', which is the back-
|
||||
// control), and the avatar hidden.
|
||||
@media @phone {
|
||||
.composer-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
.composer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: @zindex-composer;
|
||||
background: @fl-body-bg;
|
||||
height: 100vh !important;
|
||||
padding-top: @mobile-header-height;
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
.toolbar();
|
||||
opacity: 0;
|
||||
|
||||
.visible& {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.composer-content {
|
||||
padding: 15px;
|
||||
}
|
||||
.composer-controls {
|
||||
& li:not(.back-control) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.composer-avatar {
|
||||
display: none;
|
||||
}
|
||||
.composer-body {
|
||||
& h3 input {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// On larger screens, show the composer as a window at the bottom of the
|
||||
// content area. We hide a lot of the content when the composer is minimized.
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.composer-container {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: @zindex-composer;
|
||||
pointer-events: none;
|
||||
.transition(left 0.2s);
|
||||
|
||||
.with-pane & {
|
||||
left: @index-pane-width;
|
||||
}
|
||||
}
|
||||
.composer {
|
||||
margin-left: -20px;
|
||||
margin-right: 180px;
|
||||
border-radius: @border-radius-base @border-radius-base 0 0;
|
||||
background: fade(@fl-body-bg, 95%);
|
||||
transform: translateZ(0); // Fix for Chrome bug where a transparent white background is actually gray
|
||||
position: relative;
|
||||
height: 300px;
|
||||
.transition(~"background 0.2s");
|
||||
|
||||
.index-index & {
|
||||
margin-left: 205px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
&.active, &.fullscreen {
|
||||
background: @fl-body-bg;
|
||||
}
|
||||
&.minimized {
|
||||
height: 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
&.fullscreen {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.composer-content {
|
||||
padding: 20px 20px 15px;
|
||||
|
||||
.minimized & {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.fullscreen & {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
padding: 30px;
|
||||
}
|
||||
}
|
||||
.composer-handle {
|
||||
height: 20px;
|
||||
margin-bottom: -20px;
|
||||
position: relative;
|
||||
|
||||
.minimized &, .fullscreen & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.composer-controls {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
|
||||
& li {
|
||||
display: inline-block;
|
||||
}
|
||||
.minimized & {
|
||||
top: 7px;
|
||||
}
|
||||
}
|
||||
.fa-minus.minimize {
|
||||
vertical-align: -5px;
|
||||
}
|
||||
.composer-avatar {
|
||||
float: left;
|
||||
.avatar-size(64px);
|
||||
|
||||
.minimized & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.composer-body {
|
||||
margin-left: 90px;
|
||||
|
||||
.minimized & {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
.composer-editor {
|
||||
.minimized & {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------
|
||||
// Text Editor
|
||||
|
||||
.text-editor {
|
||||
& textarea {
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
resize: none;
|
||||
color: @fl-body-color;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
|
||||
&, &:focus, &[disabled] {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.text-editor-controls {
|
||||
margin: 10px 0 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
& li {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
// On phones, since one of the text editor controls will probably be the
|
||||
// primary-control, we shouldn't hide it completely when it's "disabled".
|
||||
@media @phone {
|
||||
.text-editor-controls {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
483
less/forum/discussion.less
Normal file
483
less/forum/discussion.less
Normal file
@@ -0,0 +1,483 @@
|
||||
// ------------------------------------
|
||||
// Hero
|
||||
|
||||
.discussion-hero {
|
||||
& .badges {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.discussion-title {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Sidebar
|
||||
|
||||
.discussion-nav {
|
||||
& > ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.discussion-nav {
|
||||
float: right;
|
||||
|
||||
&, & > ul {
|
||||
width: 150px;
|
||||
}
|
||||
& > ul {
|
||||
position: fixed;
|
||||
margin-top: 30px;
|
||||
|
||||
& > li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
& .btn-group, & .btn {
|
||||
width: 100%;
|
||||
}
|
||||
& .btn-group:not(.item-count-1) {
|
||||
& .btn {
|
||||
width: 77%;
|
||||
}
|
||||
& .dropdown-toggle {
|
||||
width: 22%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Stream
|
||||
|
||||
.discussion-posts {
|
||||
margin-top: 40px;
|
||||
|
||||
& .item {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
}
|
||||
.gap {
|
||||
padding: 30px 0;
|
||||
text-align: center;
|
||||
color: #aaa;
|
||||
cursor: pointer;
|
||||
border: 2px dashed @fl-body-bg;
|
||||
background: #f2f2f2;
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.transition(padding 0.2s);
|
||||
|
||||
&:hover, &.loading, &.active {
|
||||
padding: 50px 0;
|
||||
|
||||
&.up:before, &.down:after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
&.loading {
|
||||
.transition(none);
|
||||
}
|
||||
&:before, &:after {
|
||||
font-family: 'FontAwesome';
|
||||
display: block;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
height: 15px;
|
||||
color: #aaa;
|
||||
}
|
||||
&.up:before {
|
||||
content: '\f077';
|
||||
margin-top: -25px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
&.down:after {
|
||||
content: '\f078';
|
||||
margin-bottom: -25px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
&:only-child {
|
||||
background: none;
|
||||
border: 0;
|
||||
color: @fl-primary-color;
|
||||
&:before, &:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media @phone {
|
||||
.gap {
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.discussion-posts {
|
||||
margin-right: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Posts
|
||||
|
||||
.post {
|
||||
padding-bottom: 1px;
|
||||
transition: 0.2s box-shadow;
|
||||
position: relative;
|
||||
|
||||
& .contextual-controls {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.item.highlight .post {
|
||||
border: 8px solid rgba(255, 255, 0, 0.2);
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
margin: -23px;
|
||||
}
|
||||
.post-header {
|
||||
margin-bottom: 10px;
|
||||
color: @fl-body-muted-color;
|
||||
|
||||
&, & a {
|
||||
color: @fl-body-muted-color;
|
||||
}
|
||||
& > ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
& > li {
|
||||
display: inline;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
& .post-user {
|
||||
margin: 0;
|
||||
display: inline;
|
||||
font-weight: normal;
|
||||
position: relative;
|
||||
|
||||
& h3 {
|
||||
display: inline;
|
||||
}
|
||||
& h3, & h3 a {
|
||||
color: @fl-body-heading-color;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
& .badges {
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
|
||||
& .badge {
|
||||
margin-left: -15px;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
& .user-card {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
z-index: @zindex-popover;
|
||||
.transition(~"opacity 0.2s, margin-top 0.2s");
|
||||
|
||||
&.in {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.post-body {
|
||||
font-size: 14px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
.post.is-hidden {
|
||||
& .post-user h3, & .post-user h3 a, & .post-header, & .post-header > ul > li > a {
|
||||
color: @fl-body-muted-more-color;
|
||||
}
|
||||
& .post-body, & .post-footer, & h3 .avatar {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
height: 0;
|
||||
opacity: 0;
|
||||
margin-top: -5px;
|
||||
.transition(~"margin-top 0.2s, opacity 0.2s");
|
||||
}
|
||||
&.reveal-content {
|
||||
& .post-body, & .post-footer, & h3 .avatar {
|
||||
position: static;
|
||||
height: auto;
|
||||
opacity: 0.5;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
& .post-header .btn-more {
|
||||
background: #eee;
|
||||
color: @fl-body-muted-more-color;
|
||||
}
|
||||
}
|
||||
.post-meta {
|
||||
width: 400px;
|
||||
padding: 10px;
|
||||
color: @fl-body-muted-color;
|
||||
|
||||
& .number {
|
||||
color: @fl-body-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
& .time {
|
||||
margin-left: 5px;
|
||||
}
|
||||
& .permalink {
|
||||
margin-top: 10px;
|
||||
}
|
||||
& a.permalink {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.post-icon {
|
||||
float: left;
|
||||
}
|
||||
.post-activity {
|
||||
&, & a {
|
||||
color: @fl-body-muted-color;
|
||||
}
|
||||
& a {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.post-activity-info {
|
||||
font-size: 15px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.post-discussion-renamed {
|
||||
& .old-title, & .new-title {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
.post-footer, .post-actions {
|
||||
& > ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
&, & a {
|
||||
color: @fl-body-muted-color;
|
||||
}
|
||||
}
|
||||
.post-footer {
|
||||
& > ul {
|
||||
& > li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
& .fa {
|
||||
font-size: 14px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.post-actions {
|
||||
margin-top: 10px;
|
||||
opacity: 0;
|
||||
.transition(opacity 0.2s);
|
||||
|
||||
& > ul {
|
||||
& > li {
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.post:hover & {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media @phone {
|
||||
.post-header {
|
||||
& .avatar {
|
||||
.avatar-size(32px);
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.post-user {
|
||||
position: relative;
|
||||
|
||||
& .badges {
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 5px;
|
||||
width: 32px;
|
||||
|
||||
& .badge {
|
||||
.badge-size(20px);
|
||||
margin-left: -13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.post-activity {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.post-icon {
|
||||
font-size: 18px;
|
||||
margin-left: -30px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.post {
|
||||
padding-left: 90px;
|
||||
|
||||
& .contextual-controls {
|
||||
visibility: hidden;
|
||||
}
|
||||
&:hover .contextual-controls, & .contextual-controls.open {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
.item.highlight .post {
|
||||
padding-left: 90px + 15px;
|
||||
}
|
||||
.post-header {
|
||||
& .avatar {
|
||||
margin-left: -90px;
|
||||
float: left;
|
||||
.avatar-size(64px);
|
||||
}
|
||||
}
|
||||
.post-user {
|
||||
& .badges {
|
||||
float: left;
|
||||
margin-left: -85px;
|
||||
margin-top: -3px;
|
||||
width: 64px;
|
||||
}
|
||||
}
|
||||
.post-icon {
|
||||
text-align: right;
|
||||
margin-left: -90px;
|
||||
width: 64px;
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Scrubber
|
||||
|
||||
.scrubber {
|
||||
& a {
|
||||
margin-left: -5px;
|
||||
color: @fl-body-muted-color;
|
||||
& .fa {
|
||||
font-size: 14px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
&:hover, &:focus {
|
||||
text-decoration: none;
|
||||
color: @link-hover-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scrubber-scrollbar {
|
||||
margin: 8px 0 8px 3px;
|
||||
height: 300px;
|
||||
min-height: 50px; // JavaScript sets a max-height
|
||||
position: relative;
|
||||
}
|
||||
.scrubber-before, .scrubber-after {
|
||||
border-left: 1px solid @fl-body-secondary-color;
|
||||
}
|
||||
.scrubber-slider {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.scrubber-handle {
|
||||
height: 100%;
|
||||
width: 5px;
|
||||
background: @fl-body-primary-color;
|
||||
border-radius: 4px;
|
||||
float: left;
|
||||
margin-left: -2px;
|
||||
transition: background 0.2s;
|
||||
.disabled & {
|
||||
background: @fl-body-secondary-color;
|
||||
}
|
||||
}
|
||||
.scrubber-info {
|
||||
height: (2em * @line-height-base);
|
||||
margin-top: (-1em * @line-height-base);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
left: 15px;
|
||||
& strong {
|
||||
display: block;
|
||||
}
|
||||
& .description {
|
||||
color: @fl-body-muted-color;
|
||||
}
|
||||
}
|
||||
.scrubber-highlights {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
list-style-type: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
.scrubber-highlights li {
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
background: #fc0;
|
||||
height: 8px;
|
||||
width: 13px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
|
||||
opacity: 0.99;
|
||||
}
|
||||
|
||||
@media @phone {
|
||||
.stream-scrubber {
|
||||
& .dropdown-toggle {
|
||||
font-size: 14px;
|
||||
}
|
||||
& .dropdown-menu {
|
||||
padding: 30px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.scrubber-scrollbar {
|
||||
height: 40vh !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.stream-scrubber {
|
||||
margin: 30px 0 0 0;
|
||||
|
||||
.expand-dropdown();
|
||||
}
|
||||
}
|
45
less/forum/hero.less
Normal file
45
less/forum/hero.less
Normal file
@@ -0,0 +1,45 @@
|
||||
.hero {
|
||||
margin-top: -1px;
|
||||
background: @fl-body-hero-bg;
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
|
||||
&, & a, & .close {
|
||||
color: @fl-body-hero-color;
|
||||
}
|
||||
& h2 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
.welcome-hero {
|
||||
& a, & .close {
|
||||
opacity: 0.5;
|
||||
}
|
||||
& .close {
|
||||
float: right;
|
||||
margin-top: -10px;
|
||||
}
|
||||
& p {
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
}
|
||||
@media @phone {
|
||||
.hero {
|
||||
& .close {
|
||||
margin-right: -10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.hero {
|
||||
padding: 30px 0;
|
||||
font-size: 14px;
|
||||
|
||||
& h2 {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
}
|
394
less/forum/index.less
Normal file
394
less/forum/index.less
Normal file
@@ -0,0 +1,394 @@
|
||||
// ------------------------------------
|
||||
// Sidebar
|
||||
|
||||
.side-nav > ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
// On phones, the index sidebar will pretty much take care of itself. The
|
||||
// navigation list is a .dropdown-select and will be shown as the title-
|
||||
// control; the new discussion button is the primary-control. On anything
|
||||
// larger than a phone, however, we need to affix the sidebar and expand the
|
||||
// .dropdown-select into a plain list.
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.side-nav {
|
||||
// Expand the dropdown-select component into a normal nav list.
|
||||
& .dropdown-select {
|
||||
display: block;
|
||||
|
||||
.expand-dropdown();
|
||||
|
||||
& .dropdown-menu {
|
||||
.nav-list();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet {
|
||||
.side-nav {
|
||||
padding: 15px 0;
|
||||
white-space: nowrap;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
&:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin-top: 15px;
|
||||
border-bottom: 1px solid @fl-body-secondary-color;
|
||||
}
|
||||
|
||||
& > ul > li, & .dropdown-menu > li {
|
||||
display: inline-block;
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
& .dropdown-select .dropdown-menu > li > a .fa {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
& .affix {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media @desktop, @desktop-hd {
|
||||
.side-nav {
|
||||
float: left;
|
||||
|
||||
&, & > ul {
|
||||
width: 175px;
|
||||
}
|
||||
& > ul {
|
||||
margin-top: 30px;
|
||||
|
||||
&.affix {
|
||||
top: 56px;
|
||||
}
|
||||
& > li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.index-nav {
|
||||
& .new-discussion {
|
||||
display: block;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Results
|
||||
|
||||
.index-toolbar {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.index-toolbar-view {
|
||||
display: inline-block;
|
||||
|
||||
& .control-show {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.index-toolbar-action {
|
||||
float: right;
|
||||
}
|
||||
.index-results .loading-indicator {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
@media @phone, @tablet {
|
||||
.offset-content {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media @desktop, @desktop-hd {
|
||||
.offset-content {
|
||||
margin-top: 30px;
|
||||
margin-left: 225px;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Discussions Pane
|
||||
|
||||
@media @phone {
|
||||
.index-area.paned {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.index-area {
|
||||
left: -@index-pane-width;
|
||||
width: 100%;
|
||||
|
||||
&.paned {
|
||||
position: fixed;
|
||||
z-index: @zindex-pane;
|
||||
overflow: auto;
|
||||
top: @header-height;
|
||||
bottom: 0;
|
||||
width: @index-pane-width;
|
||||
background: @fl-body-bg;
|
||||
padding-bottom: 200px;
|
||||
border-top: 1px solid @fl-body-control-bg;
|
||||
.box-shadow(2px 2px 6px -2px @fl-shadow-color);
|
||||
.transition(left 0.2s);
|
||||
|
||||
&.showing {
|
||||
left: 0;
|
||||
}
|
||||
& .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-body-control-bg;
|
||||
}
|
||||
}
|
||||
& .discussion-summary {
|
||||
& .title {
|
||||
font-size: 14px;
|
||||
}
|
||||
& .count strong {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media @desktop-hd {
|
||||
.index-area.paned {
|
||||
.with-pane & {
|
||||
left: 0;
|
||||
z-index: @zindex-composer - 1;
|
||||
.transition(none);
|
||||
}
|
||||
}
|
||||
// When the pane is pinned, move the other page content inwards
|
||||
.global-content, .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;
|
||||
}
|
||||
|
||||
@media @phone {
|
||||
.discussions-list > li {
|
||||
padding-right: 45px;
|
||||
|
||||
& .contextual-controls {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.discussions-list {
|
||||
& > li {
|
||||
margin-right: -25px;
|
||||
padding-right: 65px + 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.discussion-summary {
|
||||
position: relative;
|
||||
|
||||
&, & .main {
|
||||
color: @fl-body-muted-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
& .contextual-controls {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 18px;
|
||||
}
|
||||
&:hover .contextual-controls, & .contextual-controls.open {
|
||||
visibility: visible;
|
||||
}
|
||||
& .author {
|
||||
float: left;
|
||||
margin-top: 18px;
|
||||
}
|
||||
& .badges {
|
||||
float: left;
|
||||
margin-top: 17px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
|
||||
& .badge {
|
||||
margin-left: -15px;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
& .main {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
padding: 20px 0;
|
||||
}
|
||||
&:hover .title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
& .title {
|
||||
margin: 0 0 5px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
&.unread .title {
|
||||
color: @fl-body-heading-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
& .info {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
& > li {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
& .username {
|
||||
font-weight: bold;
|
||||
}
|
||||
& .count {
|
||||
float: right;
|
||||
margin-top: 18px;
|
||||
text-decoration: none;
|
||||
|
||||
.unread& {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.load-more {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@media @phone {
|
||||
.discussion-summary {
|
||||
padding-left: 45px;
|
||||
padding-right: 45px;
|
||||
|
||||
& .author {
|
||||
margin-left: -45px;
|
||||
}
|
||||
& .badges {
|
||||
margin-left: -45px;
|
||||
width: 38px;
|
||||
|
||||
& .badge {
|
||||
.badge-size(20px);
|
||||
margin-left: -13px;
|
||||
}
|
||||
}
|
||||
& .avatar {
|
||||
.avatar-size(32px);
|
||||
}
|
||||
& .main {
|
||||
margin-right: -45px;
|
||||
}
|
||||
& .title {
|
||||
font-size: 14px;
|
||||
}
|
||||
& .count {
|
||||
margin-right: -45px;
|
||||
background: @fl-body-control-bg;
|
||||
color: @fl-body-control-color;
|
||||
border-radius: @border-radius-base;
|
||||
font-size: 12px;
|
||||
padding: 1px 6px;
|
||||
|
||||
.unread& {
|
||||
background: @fl-body-primary-color;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
& .label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.discussion-summary {
|
||||
padding-left: 65px;
|
||||
padding-right: 65px;
|
||||
|
||||
& .author {
|
||||
margin-left: -65px;
|
||||
}
|
||||
& .badges {
|
||||
margin-left: -65px;
|
||||
width: 58px;
|
||||
}
|
||||
& .main {
|
||||
margin-right: -65px;
|
||||
}
|
||||
& .title {
|
||||
font-size: 15px;
|
||||
}
|
||||
& .count {
|
||||
margin-right: -65px;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
color: @fl-body-muted-color;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
|
||||
& .label {
|
||||
font-size: 11px;
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
}
|
||||
.unread& {
|
||||
color: @fl-body-heading-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
0
less/forum/login.less
Normal file
0
less/forum/login.less
Normal file
114
less/forum/notifications.less
Normal file
114
less/forum/notifications.less
Normal file
@@ -0,0 +1,114 @@
|
||||
.notifications {
|
||||
& .dropdown-menu {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
& .loading-indicator {
|
||||
height: 100px;
|
||||
}
|
||||
& .dropdown-toggle .label {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
@media @tablet, @desktop, @desktop-hd {
|
||||
.notifications {
|
||||
& .dropdown-menu {
|
||||
width: 400px;
|
||||
}
|
||||
& .dropdown-toggle .label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.notifications-icon {
|
||||
display: inline-block;
|
||||
border-radius: 12px;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
padding: 2px 0;
|
||||
font-weight: bold;
|
||||
margin: -2px -3px;
|
||||
}
|
||||
&.unread .notifications-icon {
|
||||
background: #e7562e;
|
||||
color: #fff;
|
||||
}
|
||||
.notifications-header {
|
||||
padding: 12px 15px;
|
||||
border-bottom: 1px solid @fl-body-secondary-color;
|
||||
|
||||
& h4 {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
& .btn {
|
||||
float: right;
|
||||
margin-top: -5px;
|
||||
margin-right: -5px;
|
||||
}
|
||||
}
|
||||
.notifications-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
max-height: 600px;
|
||||
overflow: auto;
|
||||
}
|
||||
.no-notifications {
|
||||
color: @fl-body-muted-color;
|
||||
text-align: center;
|
||||
padding: 50px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
.notification {
|
||||
& > a {
|
||||
display: block;
|
||||
padding: 15px 15px 15px 75px;
|
||||
color: @fl-body-muted-color;
|
||||
overflow: hidden;
|
||||
|
||||
.unread& {
|
||||
background: @fl-body-secondary-color;
|
||||
}
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
background: @fl-body-secondary-color;
|
||||
}
|
||||
}
|
||||
& .avatar {
|
||||
float: left;
|
||||
margin-left: -60px;
|
||||
}
|
||||
}
|
||||
.notification-title {
|
||||
color: @fl-body-heading-color;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
margin: 0 0 6px;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
.notification-info {
|
||||
font-size: 12px;
|
||||
|
||||
& .fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
& .username {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@media @phone {
|
||||
.notification {
|
||||
& > a {
|
||||
padding-left: 60px;
|
||||
}
|
||||
& .avatar {
|
||||
margin-left: -45px;
|
||||
.avatar-size(32px);
|
||||
}
|
||||
}
|
||||
}
|
67
less/forum/settings.less
Normal file
67
less/forum/settings.less
Normal file
@@ -0,0 +1,67 @@
|
||||
.settings {
|
||||
margin-top: 5px;
|
||||
|
||||
& > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
& > li {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
}
|
||||
& fieldset > ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.settings-account {
|
||||
& li {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.notification-grid {
|
||||
& table {
|
||||
background: @fl-body-control-bg;
|
||||
border-radius: @border-radius-base;
|
||||
}
|
||||
& table td, & table th {
|
||||
border-bottom: 1px solid @fl-body-bg;
|
||||
color: @fl-body-control-color;
|
||||
}
|
||||
& td, & th, & .yesno {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
& thead {
|
||||
& th {
|
||||
text-align: center;
|
||||
padding: 15px 25px;
|
||||
}
|
||||
& .fa {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
width: auto;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
& .yesno-cell {
|
||||
padding: 0;
|
||||
}
|
||||
& .yesno-control {
|
||||
display: block;
|
||||
}
|
||||
& .yesno {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
& .yesno-cell.highlighted .yesno, & .yesno:hover {
|
||||
&:not(.disabled) {
|
||||
background: darken(@fl-body-control-bg, 4%);
|
||||
}
|
||||
}
|
||||
& .toggle-group {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
29
less/forum/signup.less
Normal file
29
less/forum/signup.less
Normal file
@@ -0,0 +1,29 @@
|
||||
.signup-welcome {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: @border-radius-base - 1px;
|
||||
padding: 60px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
|
||||
& .avatar {
|
||||
.avatar-size(64px);
|
||||
.box-shadow(0 0 0 4px #fff);
|
||||
}
|
||||
& h3, & p {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
& .btn-default {
|
||||
background: fade(#000, 10%);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media @phone {
|
||||
.signup-welcome {
|
||||
padding-top: 56px + 60px;
|
||||
}
|
||||
}
|
215
less/forum/user.less
Normal file
215
less/forum/user.less
Normal file
@@ -0,0 +1,215 @@
|
||||
.user-card {
|
||||
.drawer-components();
|
||||
background-size: 100% 100%;
|
||||
|
||||
&, & .container {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.darken-overlay {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.user-hero {
|
||||
& .contextual-controls {
|
||||
float: right;
|
||||
|
||||
& .dropdown-toggle .icon-glyph {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-card-popover {
|
||||
width: 500px;
|
||||
padding: 20px;
|
||||
.box-shadow(0 2px 6px @fl-shadow-color);
|
||||
|
||||
&, & .darken-overlay {
|
||||
border-radius: @border-radius-base;
|
||||
}
|
||||
& .container {
|
||||
width: auto !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
& .user-identity {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
.user-profile {
|
||||
text-align: left;
|
||||
padding-left: 130px;
|
||||
max-width: 800px;
|
||||
|
||||
& .user-identity {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
& .user-avatar {
|
||||
float: left;
|
||||
margin-left: -130px;
|
||||
}
|
||||
& .avatar-editor .dropdown-toggle {
|
||||
margin: 4px;
|
||||
line-height: 96px;
|
||||
font-size: 26px;
|
||||
}
|
||||
& .avatar {
|
||||
.avatar-size(96px);
|
||||
border: 4px solid #fff;
|
||||
.box-shadow(0 2px 6px @fl-shadow-color);
|
||||
}
|
||||
& .badges {
|
||||
margin-left: 10px;
|
||||
}
|
||||
& .user-info {
|
||||
margin: 15px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
font-size: 12px;
|
||||
|
||||
& > li {
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
}
|
||||
& .block-item {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
& .user-bio {
|
||||
margin: -10px -10px 10px;
|
||||
border: 1px dashed transparent;
|
||||
border-radius: @border-radius-base;
|
||||
|
||||
&.editable:not(.editing) {
|
||||
cursor: text;
|
||||
|
||||
&:hover {
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.bio-content {
|
||||
padding: 10px 10px 1px;
|
||||
}
|
||||
|
||||
&, & textarea {
|
||||
font-size: 14px;
|
||||
}
|
||||
& textarea {
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
& .user-last-seen {
|
||||
& .fa {
|
||||
font-size: 14px;
|
||||
}
|
||||
&.online .fa {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-activity .loading-indicator {
|
||||
height: 46px;
|
||||
}
|
||||
.activity-list {
|
||||
border-left: 3px solid @fl-body-secondary-color;
|
||||
list-style: none;
|
||||
margin: 0 0 0 16px;
|
||||
padding: 0;
|
||||
|
||||
& > li {
|
||||
margin-bottom: 30px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
& .activity-icon {
|
||||
.avatar-size(32px);
|
||||
float: left;
|
||||
margin-left: -50px;
|
||||
.box-shadow(0 0 0 3px #fff);
|
||||
margin-top: -5px;
|
||||
}
|
||||
}
|
||||
.activity-info {
|
||||
color: @fl-body-muted-color;
|
||||
margin-bottom: 10px;
|
||||
|
||||
& strong {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.activity-content {
|
||||
display: block;
|
||||
padding: 20px;
|
||||
background: @fl-body-secondary-color;
|
||||
border-radius: @border-radius-base;
|
||||
color: @fl-body-muted-color;
|
||||
|
||||
&, &:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
& .discussion-summary {
|
||||
margin: -20px 0;
|
||||
padding-left: 0;
|
||||
|
||||
& .author {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.activity-post {
|
||||
overflow: hidden;
|
||||
|
||||
& .title {
|
||||
margin: 0 0 10px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
|
||||
&, & a {
|
||||
color: @fl-body-heading-color;
|
||||
}
|
||||
}
|
||||
&:hover .title {
|
||||
text-decoration: underline;
|
||||
}
|
||||
& .body {
|
||||
color: @fl-body-muted-color;
|
||||
line-height: 1.7em;
|
||||
|
||||
& :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-editor {
|
||||
position: relative;
|
||||
|
||||
& .dropdown-toggle {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
&:hover .dropdown-toggle, &.open .dropdown-toggle, &.loading .dropdown-toggle {
|
||||
opacity: 1;
|
||||
}
|
||||
& .loading-indicator {
|
||||
color: #fff;
|
||||
}
|
||||
& .dropdown-menu {
|
||||
left: 35%;
|
||||
top: 65%;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user