Customize buttons; make button borders configurable.

This commit is contained in:
Paulo Reis 2017-09-25 15:40:44 +01:00
parent e68b367f3f
commit 66654e4a14
4 changed files with 98 additions and 53 deletions

View file

@ -15,59 +15,58 @@ block content
}
};
.content.content-alt.project-list-page(ng-controller="ProjectPageController")
.container
.announcements(
ng-controller="AnnouncementsController"
ng-class="{ 'announcements-open': ui.isOpen }"
ng-cloak
.container-fluid.content.content-alt.project-list-page(ng-controller="ProjectPageController")
.announcements(
ng-controller="AnnouncementsController"
ng-class="{ 'announcements-open': ui.isOpen }"
ng-cloak
)
.announcements-backdrop(
ng-if="ui.isOpen"
ng-click="toggleAnnouncementsUI();"
)
.announcements-backdrop(
ng-if="ui.isOpen"
ng-click="toggleAnnouncementsUI();"
)
a.announcements-btn(
href
ng-if="announcements.length"
ng-click="toggleAnnouncementsUI();"
ng-class="{ 'announcements-btn-open': ui.isOpen, 'announcements-btn-has-new': ui.newItems }"
)
span.announcements-badge(ng-if="ui.newItems") {{ ui.newItems }}
.announcements-body(
ng-if="ui.isOpen"
)
.announcements-scroller
.announcement(
ng-repeat="announcement in announcements | filter:(ui.newItems ? { read: false } : '') track by announcement.id"
)
h2.announcement-header {{ announcement.title }}
p.announcement-description(ng-bind-html="announcement.excerpt")
.announcement-meta
p.announcement-date {{ announcement.date | date:"longDate" }}
a.announcement-link(
ng-href="{{ announcement.url }}"
ng-click="logAnnouncementClick()",
target="_blank"
) Read more
div.text-center(
ng-if="ui.newItems > 0 && ui.newItems < announcements.length"
)
a.btn.btn-default.btn-sm(
href
ng-click="showAll();"
) Show all
a.announcements-btn(
href
ng-if="announcements.length"
ng-click="toggleAnnouncementsUI();"
ng-class="{ 'announcements-btn-open': ui.isOpen, 'announcements-btn-has-new': ui.newItems }"
)
span.announcements-badge(ng-if="ui.newItems") {{ ui.newItems }}
.announcements-body(
ng-if="ui.isOpen"
)
.announcements-scroller
.announcement(
ng-repeat="announcement in announcements | filter:(ui.newItems ? { read: false } : '') track by announcement.id"
)
h2.announcement-header {{ announcement.title }}
p.announcement-description(ng-bind-html="announcement.excerpt")
.announcement-meta
p.announcement-date {{ announcement.date | date:"longDate" }}
a.announcement-link(
ng-href="{{ announcement.url }}"
ng-click="logAnnouncementClick()",
target="_blank"
) Read more
div.text-center(
ng-if="ui.newItems > 0 && ui.newItems < announcements.length"
)
a.btn.btn-default.btn-sm(
href
ng-click="showAll();"
) Show all
.row(ng-cloak)
span(ng-if="projects.length > 0")
aside.col-md-2.col-xs-3
include ./list/side-bar
.row(ng-cloak)
span(ng-if="projects.length > 0")
aside.col-md-2.col-xs-3
include ./list/side-bar
.col-md-10.col-xs-9
include ./list/notifications
include ./list/project-list
.col-md-10.col-xs-9
include ./list/notifications
include ./list/project-list
span(ng-if="projects.length === 0")
.col-md-offset-2.col-md-8.col-md-offset-2.col-xs-8
include ./list/empty-project-list
span(ng-if="projects.length === 0")
.col-md-offset-2.col-md-8.col-md-offset-2.col-xs-8
include ./list/empty-project-list
include ./list/modals

View file

@ -14,8 +14,8 @@
vertical-align: middle;
cursor: pointer;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
border-bottom: 2px solid transparent;
border: @btn-border-width solid transparent;
border-bottom: @btn-border-bottom-width solid transparent;
white-space: nowrap;
.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
.user-select(none);

View file

@ -796,6 +796,9 @@
// Custom
@content-alt-bg-color: lighten(@gray-lightest, 2.5%);
@btn-border-width: 1px;
@btn-border-bottom-width: 2px;
@left-menu-width: 260px;
@left-menu-animation-duration: 0.35s;

View file

@ -37,6 +37,49 @@
@card-border-radius-base: 3px;
// Button colors and sizing
@btn-border-width : 0;
@btn-border-bottom-width : 0;
@btn-default-color : #FFF;
@btn-default-bg : @ol-blue-gray-4;
@btn-default-border : transparent;
@btn-primary-color : #FFF;
@btn-primary-bg : @ol-green;
@btn-primary-border : transparent;
@btn-success-color : #FFF;
@btn-success-bg : @ol-green;
@btn-success-border : transparent;
@btn-info-color : #FFF;
@btn-info-bg : @ol-blue;
@btn-info-border : transparent;
// TODO Warning color-orange?
@btn-warning-color : #FFF;
@btn-warning-bg : @ol-red;
@btn-warning-border : transparent;
@btn-danger-color : #FFF;
@btn-danger-bg : @ol-red;
@btn-danger-border : transparent;
.btn-info {
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
}
// Warning appears as orange
.btn-warning {
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
}
// Danger and error appear as red
.btn-danger {
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
}
//== Colors
//
//## Gray and brand colors for use across Bootstrap.