diff --git a/app/assets/stylesheets/admin/shared/forms.scss b/app/assets/stylesheets/admin/shared/forms.scss new file mode 100644 index 0000000000..133ae9ce2f --- /dev/null +++ b/app/assets/stylesheets/admin/shared/forms.scss @@ -0,0 +1,267 @@ +input[type="text"], +input[type="password"], +input[type="email"], +input[type="date"], +input[type="datetime"], +input[type="time"], +input[type="url"], +input[type="number"], +input[type="tel"], +textarea, fieldset { + @include border-radius($border-radius); + padding: 7px 10px; + border: 1px solid $color-txt-brd; + color: $color-txt-text; + font-size: 90%; + + &:focus { + outline: none; + border-color: $color-txt-hover-brd; + } + + &[disabled] { + opacity: 0.7; + } +} + +textarea { + line-height: 19px; +} + +.fullwidth { + width: 100%; +} + +label { + font-weight: 600; + text-transform: uppercase; + font-size: 85%; + display: inline; + margin-bottom: 5px; + color: $color-4; + + &.inline { + display: inline-block !important; + } + + &.block { + display: block !important; + } +} + +.label-block label { display: block } + +input[type="submit"], +input[type="button"], +button, .button { + @include border-radius($border-radius); + display: inline-block; + padding: 8px 15px; + border: none; + background-color: $color-btn-bg; + color: $color-btn-text; + text-transform: uppercase; + font-weight: 600 !important; + + &:before { + font-weight: normal !important; + } + + &:visited, &:active, &:focus { color: $color-btn-text } + + &:hover { + background-color: $color-btn-hover-bg; + color: $color-btn-hover-text; + } + + &:active:focus { + box-shadow: 0 0 8px 0 darken($color-btn-hover-bg, 5) inset; + } + + &.fullwidth { + width: 100%; + text-align: center; + } +} + +span.info { + font-style: italic; + font-size: 85%; + color: lighten($color-body-text, 15); + display: block; + line-height: 20px; + margin: 5px 0; +} + +.field { + padding: 10px 0; + + &.checkbox { + min-height: 73px; + + input[type="checkbox"] { + display: inline-block; + width: auto; + } + + label { + cursor: pointer; + display: block; + } + } + + ul { + border-top: 1px solid $color-border; + list-style: none; + padding-top: 5px; + + li { + display: inline-block; + padding-right: 10px; + + + label { + font-weight: normal; + text-transform: none; + } + &.white-space-nowrap { + white-space: nowrap; + } + } + } + + &.withError { + .field_with_errors { + label { + color: very-light($color-error, 30); + } + + input { + border-color: very-light($color-error, 15); + } + } + .formError { + color: very-light($color-error, 30); + font-style: italic; + font-size: 85%; + } + } +} + +fieldset { + box-shadow: none; + box-sizing: border-box; + border-color: $color-border; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + margin-left: 0; + margin-right: 0; + position: relative; + margin-bottom: 35px; + padding: 10px 0 15px 0; + background-color: transparent; + border-left: none; + border-right: none; + border-radius: 0; + + &.no-border-bottom { + border-bottom: none; + margin-bottom: 0; + } + + &.no-border-top { + border-top: none; + padding-top: 0; + } + + legend { + background-color: $color-1; + color: $color-2; + font-size: 14px; + font-weight: 600; + text-transform: uppercase; + text-align: center; + padding: 8px 15px; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + i { + color: $color-link; + } + } + + label { + color: lighten($color-body-text, 8); + } + + .filter-actions { + margin-bottom: -32px; + margin-top: 15px; + text-align: center; + + form { + display: inline-block; + } + + button, .button, input[type="submit"], input[type="button"], span.or { + @include border-radius($border-radius); + + -webkit-box-shadow: 0 0 0 15px $color-1; + -moz-box-shadow: 0 0 0 15px $color-1; + -ms-box-shadow: 0 0 0 15px $color-1; + -o-box-shadow: 0 0 0 15px $color-1; + box-shadow: 0 0 0 15px $color-1; + + &:hover { + border-color: $color-1; + } + } + + span.or { + background-color: $color-1; + border-width: 5px; + margin-left: 5px; + margin-right: 5px; + position: relative; + + -webkit-box-shadow: 0 0 0 5px $color-1; + -moz-box-shadow: 0 0 0 5px $color-1; + -ms-box-shadow: 0 0 0 5px $color-1; + -o-box-shadow: 0 0 0 5px $color-1; + box-shadow: 0 0 0 5px $color-1; + } + } + + &.labels-inline { + .field { + margin-bottom: 0; + display: table; + width: 100%; + + label, input { + display: table-cell !important; + } + input { + width: 100%; + } + + &.checkbox { + input { + width: auto !important + } + } + } + .actions { + padding: 0; + text-align: right; + } + } +} + +.form-actions { + margin-top: 18px; +} +.form-buttons { + text-align: center; +} diff --git a/app/assets/stylesheets/admin/shared/icons.scss b/app/assets/stylesheets/admin/shared/icons.scss new file mode 100644 index 0000000000..4e0d275ddf --- /dev/null +++ b/app/assets/stylesheets/admin/shared/icons.scss @@ -0,0 +1,23 @@ +// Some fixes for fontwesome stylesheets +[class^="icon-"], [class*=" icon-"] { + &:before { + padding-right: 5px; + } + + &.button, &.icon_link { + width: auto; + + &:before { + padding-top: 3px; + } + } +} + +.icon-email:before { @extend .icon-envelope:before } +.icon-resume:before { @extend .icon-refresh:before } + +.icon-cancel:before, +.icon-void:before { @extend .icon-remove:before } + +.icon-capture:before { @extend .icon-ok:before } +.icon-credit:before { @extend .icon-ok:before } diff --git a/app/assets/stylesheets/admin/shared/layout.scss b/app/assets/stylesheets/admin/shared/layout.scss new file mode 100644 index 0000000000..70df4b98d8 --- /dev/null +++ b/app/assets/stylesheets/admin/shared/layout.scss @@ -0,0 +1,90 @@ +// Basics +//--------------------------------------------------- +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +// Helpers +.block-table { + display: table; + width: 100%; + + .table-cell { + display: table-cell; + vertical-align: middle; + padding: 0 10px; + + &:first-child { + padding-left: 0; + } + &:last-child { + padding-right: 0; + } + } +} + +.hidden { + display: none; +} + +// For block grids +.frameless { + margin-left: -10px; + margin-right: -10px; +} + +// Header +//--------------------------------------------------- +#header { + background-color: $color-1; + padding: 5px 0; +} + +#logo { height: 40px } + +[data-hook="admin-title"] { font-size: 14px } + +.page-title { + i { + color: $color-2; + } +} + +// Content +//--------------------------------------------------- +#content { + background-color: $color-1; + position: relative; + z-index: 0; + padding: 0; + margin-top: 15px; +} + +#content-header { + padding: 15px 0; + background-color: very-light($color-3, 4); + border-bottom: 1px solid $color-border; + + .page-title { + font-size: 20px; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + .page-actions { + text-align: right; + form { + display: inline-block; + } + } +} + +// Footer +//--------------------------------------------------- +#footer { + margin-top: 15px; + border-top: 1px solid $color-border; + padding: 10px 0; +} diff --git a/app/assets/stylesheets/admin/shared/tables.scss b/app/assets/stylesheets/admin/shared/tables.scss new file mode 100644 index 0000000000..8f089f6765 --- /dev/null +++ b/app/assets/stylesheets/admin/shared/tables.scss @@ -0,0 +1,205 @@ +table { + width: 100%; + margin-bottom: 15px; + border-collapse: separate; + + th, td { + padding: 7px 5px; + border-right: 1px solid $color-border; + border-bottom: 1px solid $color-border; + vertical-align: middle; + text-overflow: ellipsis; + + img { + border: 1px solid transparent; + } + + &:first-child { + border-left: 1px solid $color-border; + } + + a { + border-bottom: 1px dotted lighten($color-link, 10); + + &:hover { + border-color: lighten($color-link-hover, 10); + } + } + + .handle { + display: block !important; + text-align: center; + padding-right: 0; + } + + &.actions { + background-color: transparent; + border: none !important; + text-align: center; + + span.text { + font-size: $body-font-size; + } + + [class*='icon-'].no-text { + font-size: 120%; + background-color: very-light($color-3); + border: 1px solid $color-border; + border-radius: 15px; + width: 29px; + height: 29px; + display: inline-block; + padding-top: 2px; + + &:before { + text-align: center !important; + width: 27px; + display: inline-block; + } + + &:hover { + border-color: transparent; + } + } + + button[class*='icon-'] { + color: $color-link; + padding: 0 !important; + } + + .icon-envelope-alt, .icon-eye-open { + color: $color-link; + padding-left: 0px; + + &:hover { + background-color: $color-3; + color: $color-1; + } + } + .icon-trash:hover, .icon-void:hover { + background-color: $color-error; + color: $color-1; + } + .icon-cancel:hover { + background-color: $color-notice; + color: $color-1; + } + .icon-edit:hover, .icon-capture:hover, .icon-ok:hover, .icon-plus:hover { + background-color: $color-success; + color: $color-1; + } + .icon-copy:hover { + background-color: $color-notice; + color: $color-1; + } + } + + input[type="number"], + input[type="text"] { + width: 100%; + } + + &.no-border { + border-right: none; + } + + .handle { + @extend [class^="icon-"]:before; + @extend .icon-reorder; + cursor: move; + } + + } + + &.no-borders { + td, th { + border: none !important; + } + + } + + thead { + th { + padding: 10px; + border-top: 1px solid $color-border; + border-bottom: none; + background-color: $color-tbl-thead; + text-transform: uppercase; + font-size: 85%; + font-weight: $font-weight-bold; + } + } + + tbody { + tr { + &:first-child th, + &:first-child td { + border-top: 1px solid $color-border; + } + &.even td { + background-color: $color-tbl-even; + + img { + border: 1px solid very-light($color-3, 6); + } + } + + &:hover td { + background-color: very-light($color-3, 5); + + img { + border: 1px solid $color-border; + } + } + + &.deleted td { + background-color: very-light($color-error, 6); + border-color: very-light($color-error, 15); + } + + &.ui-sortable-placeholder td { + border: 1px solid $color-2 !important; + visibility: visible !important; + + &.actions { + background-color: transparent; + border-right: none !important; + border-top: none !important; + border-bottom: none !important; + border-left: 1px solid $color-2 !important; + } + } + + &.ui-sortable-helper { + width: 100%; + + td { + background-color: lighten($color-3, 33); + border-bottom: 1px solid $color-border; + + &.actions { + display: none; + } + } + } + } + + &.no-border-top tr:first-child td { + border-top: none; + } + + &.grand-total { + td { + border-color: $color-2 !important; + text-transform: uppercase; + font-size: 110%; + font-weight: 600; + background-color: lighten($color-2, 50); + } + .total { + background-color: $color-2; + color: $color-1; + } + } + } +} diff --git a/app/assets/stylesheets/admin/shared/typography.scss b/app/assets/stylesheets/admin/shared/typography.scss new file mode 100644 index 0000000000..76fc7c1967 --- /dev/null +++ b/app/assets/stylesheets/admin/shared/typography.scss @@ -0,0 +1,132 @@ +// Base +//-------------------------------------------------------------- +body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 13px; } + +body { + font-family: $base-font-family; + font-size: $body-font-size; + font-weight: 400; + color: $color-body-text; + text-rendering: optimizeLegibility; +} + +hr { + border-top: 1px solid $color-border; + border-bottom: 1px solid white; + border-left: none; +} + +strong, b { + font-weight: 600; +} + +// links +//-------------------------------------------------------------- +a { + color: $color-link; + text-decoration: none; + line-height: inherit; + + &, &:hover, &:active, &:visited, &:focus { + outline: none; + } + + &:visited { + color: $color-link-visited; + } + &:focus { + color: $color-link-focus; + } + &:active { + color: $color-link-active; + } + &:hover { + color: $color-link-hover; + } +} + +// Headings +//-------------------------------------------------------------- + +h1,h2,h3,h4,h5,h6 { + font-weight: 600; + color: $color-headers; + line-height: 1.1; +} + +h1 { font-size: $h1-size; line-height: $h1-size + 6 } +h2 { font-size: $h2-size; line-height: $h1-size + 4 } +h3 { font-size: $h3-size; line-height: $h1-size + 2 } +h4 { font-size: $h4-size; line-height: $h1-size } +h5 { font-size: $h5-size; line-height: $h1-size } +h6 { font-size: $h6-size; line-height: $h1-size } + + +// Lists +//-------------------------------------------------------------- +ul { + &.inline-menu { + li { + display: inline-block; + } + } + &.fields { + list-style: none; + padding: 0; + margin: 0; + } +} + +dl { + width: 100%; + overflow: hidden; + margin: 5px 0; + color: lighten($color-body-text, 15); + + dt, dd { + float: left; + line-height: 16px; + padding: 5px; + text-align: justify; + } + + dt { + width: 40%; + font-weight: 600; + padding-left: 0; + text-transform: uppercase; + font-size: 85%; + } + + dd { + width: 60%; + padding-right: 0; + } + + dd:after { + content: ''; + clear: both; + } + +} + +// Helpers +.align-center { text-align: center } +.align-right { text-align: right } +.align-left { text-align: left } +.align-justify { text-align: justify } + +.uppercase { text-transform: uppercase } + +.green { color: $color-2 } +.blue { color: $color-3 } +.red { color: $color-5 } +.yellow { color: $color-6 } + +.no-objects-found { + text-align: center; + font-size: 120%; + text-transform: uppercase; + padding: 40px 0px; + color: lighten($color-body-text, 15); +}