yunohost-admin/src/css/style.less
Alexandre Aubin cbfc532c6f Magikarp ftw!
2020-03-30 18:39:06 +02:00

1008 lines
18 KiB
Text

@font-path: "../fonts/";
/*
* Bootstrap
*/
@import "../bower_components/bootstrap/less/bootstrap.less";
// Bootstrap variables override
@font-family-sans-serif: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-family-monospace: "Source Code Pro", "Inconsolata", Menlo, Monaco, Consolas, "Courier New", monospace;
@font-size-h1: floor((@font-size-base * 2.15)); // ~30px
@font-size-h2: ceil((@font-size-base * 1.7)); // ~24px
@font-size-h3: ceil((@font-size-base * 1.25)); // ~18px
@font-size-h4: @font-size-base;
@font-size-h5: ceil((@font-size-base * 0.85)); // ~12px
@font-size-h6: ceil((@font-size-base * 0.7)); // ~10px
@border-radius-base: 0;
@btn-border-radius-base: 1px;
@btn-border-radius-small: @btn-border-radius-base;
@btn-border-radius-large: @btn-border-radius-base;
/*
* FontAwesome
*/
@import "../bower_components/fork-awesome/less/fork-awesome.less";
// Fixes
[class*="fa-"] {.fa;}
a[class*="fa-"]:hover {text-decoration:none;}
/*
* YNH Fonts
*/
@import "fonts.less";
/* Comments:
*
* 1. we need to rationalise the use of width and max widths. they seem to be
* completely arbitrarily chosen. May not allow for a lot of flexibility…
* especially on different screens size.
*
*/
/* Fix bootstrap use of width. We prefer max-width. */
.container {
@media (min-width: @screen-sm-min) {
width: auto;
max-width: @container-sm;
}
@media (min-width: @screen-md-min) {
width: auto;
max-width: @container-md;
}
@media (min-width: @screen-lg-min) {
width: auto;
max-width: @container-lg;
}
}
html, body {
width:100%;
}
html {
/* Force vertical scrollbar to prevent centering jumps. */
overflow-y: scroll;
}
body {
&:extend(.container all);
margin: auto;
padding: 0 10px;
@media (min-width: @screen-sm-min) {
padding: 0 20px;
}
}
.btn {
& + .btn {margin-left: 8px;}
}
button {
&:extend(.btn all);
}
.block {
float:left;
height: 100%;
/*max-width: 750px;*/
width: 50%;
height: 100%;
padding: 5px;
}
.placehold {
font-size: 0.0001em;
color: transparent;
}
/*
* The top heading of the doc
*
*/
/*#masthead {
.hidden-xs;
}*/
.page-header {
.clearfix;
.make-row(12);
margin: 0 0 20px;
padding-bottom: 20px;
.homelink {
margin-top: 20px;
}
.homelink {
.make-xs-column(2);
position: relative;
display: block;
&:before {
.fa;
/*.fa-chevron-left;*/
content: "\f053";
display: block;
height: 1em;
width: 1em;
position: absolute;
top: 50%;
margin-top: -0.4em;
left: 5px;
opacity: 0;
font-size: 1em;
line-height: 1;
color: @gray-light;
transition: all 0.1s ease;
}
&:hover {
&:before {
opacity: 1;
left: 0px;
}
}
}
.buttons {
.pull-right;
.make-sm-column(2);
.make-sm-column-offset(8);
padding: 17px 0 0;
a {
.btn;
.btn-sm;
display: block;
margin: 3px 0;
}
.user-interface-btn {
.btn-primary;
}
.logout-btn {
.btn-default;
}
}
}
/*
* The “slider”
*
*/
#slider {
.center-block;
padding: 5px 5px 30px;
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
text-align: left;
}
#slider-container {
.clearfix;
width: 200%;
height: 100%;
min-height: 150px;
transition: margin-left 0.15s ease-in-out;
}
#slideBack, #slideTo, #main {
.block;
}
#slideTo, #slideBack {
// Force left & right pane height to 1px (prevent empty space before footer).
height: 1px;
}
/*
* The main part of the app
*
*/
#main {
/*float: left;*/
/*overflow: hidden;*/
padding-left: 0;
padding-right: 0;
}
/*
* Page footer
*
*/
#page-footer {
.clearfix;
.make-row(12);
margin: 20px 0;
padding-top: 20px;
margin-top: 40px;
border-top: 1px solid #eee;
color: #999;
font-size: 0.9em;
a {
color: #666;
&:hover,
&:focus {text-decoration: underline;}
}
}
#page-footer-links {
text-align: left;
float: left;
a {
display: inline-block;
}
a::before {
content: "•";
display: inline-block;
vertical-align: top;
padding: 0 0.5em 0 0.25em;
}
a:first-child:before {content: none;}
}
#yunohost-version {
text-align: right;
float: right;
}
@media screen and (max-width: @screen-xs-min) {
#yunohost-version {
text-align: center;
float: none;
}
#page-footer-links {
text-align: center;
float: none;
}
}
/*
* The pop up dialog
*
*/
#modal {
.modal;
.fade;
z-index: 2001; // more than pacman
overflow-y: auto;
& > div {
.modal-dialog;
& > div {
.modal-content;
}
}
header {
.modal-header;
.title {
.modal-title;
font-weight: bold;
text-transform: uppercase;
margin: 0;
}
}
&.no-title header {display: none;}
.content {
.modal-body;
.danger {
color: red;
}
}
footer {
.modal-footer;
button {
.btn;
&#modal-cancel {.btn-link;}
&#modal-confirm {.btn-primary;}
}
}
}
@media (min-width: 768px) {
#modal > div > div {
width: 600px;
margin: 30px auto;
}
}
/*
* Various styles
*
*/
body .form-control {
padding: 6px;
}
.view-title {
text-align: center;
margin: 20px auto 0;
@media (min-width: @screen-xs-min) {
margin: -35px 120px 0 120px;
}
}
// Preserve font-size in panel titles.
h1.panel-title {font-size: @font-size-h1;}
h2.panel-title {font-size: @font-size-h2;}
h3.panel-title {font-size: @font-size-h3;}
h4.panel-title {font-size: @font-size-h4;}
h5.panel-title {font-size: @font-size-h5;}
h6.panel-title {font-size: @font-size-h6;}
div.br {
height: 30px;
}
@-webkit-keyframes pacmanlinearmove {
from { background-position: 30% 15%; }
to { background-position: 70% 15%; }
}
@-moz-keyframes pacmanlinearmove {
from { background-position: 30% 15%; }
to { background-position: 70% 15%; }
}
@-o-keyframes pacmanlinearmove {
from { background-position: 30% 15%; }
to { background-position: 70% 15%; }
}
@keyframes pacmanlinearmove {
from { background-position: 30% 15%; }
to { background-position: 70% 15%; }
}
.loader {
display: block;
z-index: 2000;
text-align: center;
background: rgba(255, 255, 255, 0.5) url(../img/ajax-loader.gif) center 15% no-repeat;
animation: pacmanlinearmove 5s linear infinite;
}
.loader-content {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 2000;
}
.magikarp {
.loader{
background: rgba(255, 255, 255, 0.5) url(../img/magikarp.gif) center 15% no-repeat;
}
}
.with-nyancat {
.loader{
background: rgba(255, 255, 255, 0.5) url(../img/nyancat.gif) center 15% no-repeat;
animation: pacmanlinearmove 6s linear infinite;
}
.loader-content {
left: -20%;
right: -20%;
}
}
.loader-popup {
margin: auto;
height: 24px;
width: 24px;
background-position: center top;
}
.help-block--link {
float: right;
margin-left: 2em;
}
.help-block--help {
margin: 0 0 5px 0;
}
.help-block--example {}
.quota-help-block {
text-align: left;
line-height: 1.2;
}
th h3,
th h4 {
margin-bottom: 5px;
font-weight: bold;
}
th h4 {font-size: 16px;}
th h4 small {font-size: 12px;}
select option[default] {
color: #999;
font-style: italic;
}
a.list-group-item,
a.list-group-item-heading,
.list-group-item-heading a {
color: #333;
}
.list-group-item .pull-right.fa-chevron-right {
position: absolute;
right: 1em;
top: 50%;
margin-top: -0.5em;
}
.panel > .list-group + .panel-footer {
border-top: 0;
}
@dl-horizontal-offset: 220px;
.dl-horizontal {
dt,
dd {
min-height: 1.5em;
}
dd {
ul {padding-left: 20px;}
}
}
.table-firewall .btn {visibility: hidden;}
.table-firewall td:hover .btn {visibility: visible;}
@media screen and (max-width: 767px) {
.table-responsive {border: none;}
}
.actions-group {
.pull-right;
}
.separator {
.clearfix();
margin-bottom: 25px;
}
label .list-group-item-text {
font-weight:normal;
}
/* Paste buttons */
button[data-paste-content] {
&:extend(.btn all);
&:extend(.btn-default all);
& + pre {
margin-top: 10px;
}
}
.full-width {
width: 100%;
}
.overflow-auto {
overflow: auto;
}
/** Breadcrumb **/
@breadcrumb-bg: none;
.btn-breadcrumb {
.pull-left;
&:extend(.breadcrumb all);
// Bootstrap uses ul>li structure, we simply use <a>
a {
display: inline-block;
color: @gray-light;
& + a {
&:before {
display: inline-block;
content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
padding: 0 5px;
color: @breadcrumb-color;
}
}
&:hover,
&:focus {
color: @link-hover-color;
}
}
}
/** Beautiful checkbox/radio **/
input[type='checkbox'].nice-checkbox,
input[type='radio'].nice-radio {
position: absolute;
left: -9999px;
& + label {cursor: pointer;}
& + label:before {
.fa;
content: @fa-var-square-o;
display: inline-block;
width: 1em;
height: 1em;
line-height: 1;
font-size: 1.5em;
text-align: left;
vertical-align: middle;
position: relative;
}
&:hover + label:before {
content: @fa-var-plus-square-o;
}
&:checked + label:before {
content: @fa-var-check-square-o;
}
&:checked:hover + label:before {
content: @fa-var-minus-square-o;
}
&[type='radio'] {
& + label:before {
content: @fa-var-circle-o;
}
&:checked + label:before {
content: @fa-var-check-circle-o;
}
}
}
/** App install form **/
.form-app-install {
.form-group {
margin-bottom: 25px;
label {cursor: pointer;}
}
.form-control {
&[type="checkbox"] {
height: auto;
width: auto;
}
}
}
.messages .progress {
display:inline-block;
height:0.8em;
margin-bottom: 0;
width: 200px;
border-radius: 5px;
}
.messages div:not(:first-child) .progress {
display: none;
}
.messages .progress-bar-striped {
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.5) 75%, transparent 75%, transparent);
}
.messages .progress-bar.active {
animation-direction: reverse;
}
/** custom badges **/
.badge {
&.badge-default {
background-color: @label-default-bg;
}
&.badge-primary {
background-color: @label-primary-bg;
}
&.badge-success {
background-color: @label-success-bg;
}
&.badge-info {
background-color: @label-info-bg;
}
&.badge-warning {
background-color: @label-warning-bg;
}
&.badge-danger {
background-color: @label-danger-bg;
}
}
.label-best {
background-color: darkorchid;
}
.app-category-card {
text-align: center;
}
// only one card for small screens
.app-card, .app-category-card {
width: 100%;
.btn-group {
width: 100%;
.btn{
margin-left: 0;
}
}
}
#app-filter-input{
.dropdown-menu{
min-width: 120px;
right: 0;
left: auto;
}
.menu-item{
padding: 3px 10px;
}
}
.app-state {
font-size: 10px;
}
.app-title, .app-category-title {
margin-top: 5px;
font-weight: 600;
}
.app-card-desc, .app-category-card-desc {
height: 6rem;
overflow: hidden;
}
.app-card-date-maintainer {
text-align: right;
max-height: 18px;
margin-bottom: 3px;
margin-right: 7px;
margin-top: -5px;
height: 18px;
}
.auto-width {
width: auto;
}
.input-hidden {
display: none;
}
.alert-debug {
background-color: white;
}
.app-card .panel-body {
padding: 1.5rem;
padding-bottom: 0.5rem;
h3 {
margin-top: 0;
margin-bottom: .5rem;
}
.category {
margin-bottom: .5rem;
}
}
.app-category-card .panel-body {
padding: 2em;
height: 10em;
color: #333 !important;
}
.subtag-selector {
text-align: center;
}
.app-category-card {
text-decoration: none !important;
}
.app-category-card:hover {
border-color: #777;
}
.app-category-title {
line-height: 1em;
white-space: normal;
}
.app-category-card-desc {
white-space: normal;
}
/** Groups View **/
#view-groups {
.panel-heading a {
text-decoration: none;
}
.group-delete {
font-size: 24px;
line-height: 24px;
padding: 0;
float:right;
color:lighten(@label-danger-bg, 20%);
:hover {
color:@label-danger-bg;
}
}
.panel-body {
h3 {
margin-top:0;
}
button.dropdown-toggle {
line-height: 15.666px;
top: -1.666px;
}
.dropdown-menu {
max-height: 200px;
overflow-y: auto;
button {
background: none;
}
}
.label-removable {
// The following match properties from regular btn's
display:inline-block;
font-size:14px;
color:#333;
background-color:#f8f8f8;
border: #ccc 1px solid;
font-weight: normal;
margin-bottom:0;
position: relative;
top: -1.666px;
height: 29.666px;
vertical-align: middle;
padding: 6px 12px;
margin-right:7px; // Spacing between labels
> button {
line-height: 12px;
margin-left:6px;
padding: 0;
padding-left:6px;
border-left: #ccc 1px solid;
color:lighten(@label-info-bg,20);
text-decoration: none;
}
> button:hover {
color:@label-info-bg;
}
}
}
}
/** Flash messages **/
#flashMessage {
max-height: 120px;
overflow-y: auto;
margin-bottom: 20px;
&:empty {margin-bottom: 0;}
button {display: none;}
.alert-error,
.alert-fail {
.alert-danger();
}
.alert {
margin-bottom: 0;
& + .alert {margin-top: 15px;}
p {
margin: 0 auto;
& + p {margin-top: 0.5em;}
}
}
.alert-log {
background-color: #eee;
color: #333;
// YNH custom
font-family: Consolas,"Liberation Mono",Menlo,Courier,monospace;
font-size: 12px;
}
}
@media screen and (min-width: 640px) {
#slider {
#toggle-btn {display: none;}
&.with-flashMessage {
padding-top: 30px;
#toggle-btn {display: block;}
}
}
// display 2 cards between 640 and 992px
.app-card, .app-category-card {
width: 47.9%;
margin: 1%;
}
.grid {
background: #f5f5f5;
border: 1px solid #ddd;
}
#flashMessage {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 2001; // above pacman
max-height: 30px;
opacity: 0.9;
overflow: hidden;
box-shadow: 0 0 1px rgba(0,0,0, 0.2);
.transition(max-height 0.15s);
.messages {
max-height: 30px;
}
&:hover,
&:active,
&:focus,
&.open {
opacity: 1;
overflow-y: auto;
height: auto;
min-height: 30px;
max-height: 70%;
box-shadow: 0px 0 1px rgba(0,0,0, 0.5);
.messages {
max-height: none;
}
}
p {
padding: 4px 10px;
min-height: 30px;
line-height: 22px;
}
.alert {
// Override bootstrap defaults
padding: 0 0 0 40px; // Space for buttons
margin: 0;
border: 0;
border-radius: 0;
& + .alert {margin-top: 0;}
}
button {
.btn-xs;
.btn-link;
padding: 1px;
margin: 4px;
max-height: 22px;
color: @text-color;
opacity: 0.7;
&:hover,
&:active,
&:focus {
color: @text-color;
opacity: 1;
text-decoration: none;
}
}
#toggle-btn {
float: left;
[class*="fa-"] {
.rotate(-45deg);
.transition(all 0.15s);
}
}
&.open #toggle-btn {
opacity: 1;
[class*="fa-"] {.rotate(0deg);}
}
#clear-btn {
float: left;
display: none;
}
&:hover,
&:active,
&:focus,
&.open {
#clear-btn {
display: block
}
}
}
}
// bootstrap breakpoint for large screen is 992px
@media screen and (min-width: 992px) {
.app-card, .app-category-card {
// display 3 cards by row
width: 31.3%;
margin: 1%;
}
}
/* Inline button in panel headers or in list group items */
.list-group-item > .btn.pull-right {
line-height: 1em;
margin-top: -2px;
}
@media screen and (max-width: @screen-xs-min) {
.btn.pull-right, .btn-toolbar.pull-right, .btn-toolbar.pull-right > .btn {
margin: 0;
margin-top: 5px;
display: block;
float: none !important;
}
}
.notransition {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
transition: none !important;
}
/* Just to be able to override list-group-item with alert-success's background and border colors */
.alert-success-yo {
background-color: #dff0d8;
border-color: #d6e9c6;
}
.alert-warning-yo {
background-color: #fcf8e3;
border-color: #faebcc;
}
.alert-danger-yo {
background-color: #f2dede;
border-color: #ebccd1;
}
.alert-info-yo {
background-color: #d9edf7;
border-color: #bce8f1;
}
.alert-ignored-yo {
background-color: ghostwhite;
border-color: lightgrey;
color: grey;
}