scinote-web/app/assets/stylesheets/steps.scss

438 lines
7.4 KiB
SCSS
Raw Normal View History

2016-02-12 23:52:43 +08:00
// Place all the styles related to the Steps controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
2019-04-25 17:14:55 +08:00
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
// scss-lint:disable SelectorFormat
// scss-lint:disable ImportantRule
2020-09-25 21:06:09 +08:00
// scss-lint:disable Unknown
2019-04-25 17:14:55 +08:00
@import "constants";
2019-04-26 21:20:39 +08:00
@import "mixins";
2016-02-12 23:52:43 +08:00
:root {
2020-10-16 17:00:57 +08:00
--attachment-column-width: 16em;
2020-10-16 17:27:23 +08:00
--attachment-row-height: 3em;
}
2016-02-12 23:52:43 +08:00
#new_step,
.panel-step-attachment {
ul {
list-style: none;
li {
2019-04-29 01:11:41 +08:00
> div > span.pull-left {
margin-top: 10px;
2016-02-12 23:52:43 +08:00
}
}
}
.checklist-name-container,
.table-name-container {
align-items: center;
display: flex;
.remove-container {
padding-top: 10px;
}
}
2016-02-12 23:52:43 +08:00
}
2018-05-30 19:58:16 +08:00
#steps {
// hack only for firefox
@-moz-document url-prefix() {
ul > li {
padding-top: 1px;
a > p:first-child {
margin-top: -17px;
}
}
}
.step {
.panel {
margin-left: 0;
}
}
.step-panel-collapse-link {
padding-left: 5px;
&:not(.collapsed) .fas {
@include rotate(90deg);
}
}
2020-05-15 17:04:17 +08:00
.step-heading {
align-items: center;
border: 0;
2020-05-13 16:58:40 +08:00
display: flex;
min-height: 46px;
2019-04-09 18:28:42 +08:00
padding-bottom: 0;
padding-top: 0;
.panel-options {
bottom: 0;
2020-05-13 16:58:40 +08:00
flex-grow: 1;
flex-shrink: 0;
line-height: 46px;
2020-05-13 16:58:40 +08:00
text-align: right;
}
span.step-number {
2020-07-13 20:51:51 +08:00
font-size: 16px;
font-weight: bold;
2020-07-13 20:51:51 +08:00
margin: 0 5px 0 10px;
2019-05-29 19:56:55 +08:00
min-width: fit-content;
}
.left-floats {
align-items: center;
display: flex;
2020-05-13 16:58:40 +08:00
max-width: 100%;
min-height: inherit;
overflow: hidden;
2019-05-29 19:56:55 +08:00
padding-right: 15px;
.step-name-link {
display: flex;
flex-shrink: 1;
overflow: hidden;
.name-block {
2019-05-20 17:20:08 +08:00
display: flex;
flex-shrink: 1;
height: 100%;
overflow: hidden;
2019-06-10 17:23:40 +08:00
@media (max-width: 1188px) {
min-width: 100px;
}
strong {
2019-05-14 15:43:02 +08:00
font-size: 16px;
white-space: nowrap;
}
}
.delimiter {
padding: 0 5px;
}
.author-block {
2019-05-14 15:43:02 +08:00
display: inline-block;
2019-05-20 17:20:08 +08:00
flex-shrink: 0;
2019-05-14 15:43:02 +08:00
font-size: 16px;
overflow: hidden;
white-space: nowrap;
}
}
}
}
2018-05-30 19:58:16 +08:00
}
.attachments {
2019-04-26 21:20:39 +08:00
display: grid;
2020-10-16 17:00:57 +08:00
grid-auto-rows: var(--attachment-row-height);
grid-column-gap: 1em;
grid-row-gap: 1em;
2020-10-16 17:00:57 +08:00
grid-template-columns: repeat(auto-fill, minmax(var(--attachment-column-width), 1fr));
2020-09-25 21:06:09 +08:00
justify-content: center;
margin: 1em 0;
2020-10-16 17:00:57 +08:00
.nested_fields {
display: contents;
}
}
.attachment-container {
2019-04-26 21:20:39 +08:00
@include md-card-style;
2020-10-16 17:00:57 +08:00
grid-row: span 6;
2020-09-25 21:06:09 +08:00
justify-self: center;
overflow: hidden;
padding: 1em;
position: relative;
2020-10-16 17:00:57 +08:00
width: var(--attachment-column-width);
.file-preview-link {
display: block;
height: 100%;
width: 100%;
}
2020-09-24 23:10:36 +08:00
.show-inline {
background: $color-white;
border-radius: $border-radius-default;
line-height: 1em;
padding: .5em;
position: absolute;
right: 0;
text-align: center;
top: 0;
width: 2em;
z-index: 10;
2019-04-09 18:28:42 +08:00
}
.attachment-preview {
border-radius: $border-radius-default;
2020-10-16 17:00:57 +08:00
height: 14em;
position: relative;
2019-04-09 18:28:42 +08:00
text-align: center;
width: 100%;
2020-10-22 19:41:17 +08:00
&.processing {
background-image: url("/images/medium/processing.gif");
background-position: center;
background-repeat: no-repeat;
}
img {
max-height: 100%;
2019-04-26 21:20:39 +08:00
max-width: 100%;
}
&.marvinjs {
&::before,
&::after {
border-radius: 1em 0 0 1em;
2020-09-25 21:06:09 +08:00
bottom: 1em;
content: "";
display: block;
2020-09-25 21:06:09 +08:00
height: 2em;
line-height: 2em;
position: absolute;
2020-09-25 21:06:09 +08:00
right: -1em;
width: 2.25em;
}
&::before {
background: $marvinjs-color;
}
&::after {
background-image: url("/images/icon_small/marvinjs-white.svg");
height: 2.25em;
right: -.75em;
width: 2em;
}
}
2019-04-25 17:14:55 +08:00
i.fas {
font-size: 100px;
line-height: 160px;
}
}
.no-shadow {
box-shadow: none;
}
.attachment-label,
.attachment-metadata {
background: $color-white;
overflow: hidden;
padding-top: 1em;
position: relative;
2019-04-09 18:28:42 +08:00
text-align: center;
2020-09-25 21:06:09 +08:00
text-overflow: ellipsis;
transition: $md-transaction;
white-space: nowrap;
}
2020-09-25 21:06:09 +08:00
.attachment-label {
@include font-main;
margin-top: 1.5em;
z-index: 2;
}
.attachment-metadata {
@include font-small;
color: $color-silver-chalice;
2020-09-25 21:06:09 +08:00
margin-top: -4em;
2019-04-09 18:28:42 +08:00
}
.remove-icon {
bottom: .5em;
2019-04-27 19:51:35 +08:00
cursor: pointer;
display: none;
position: absolute;
right: .5em;
}
&:hover {
box-shadow: $md-shadow;
.file-preview-link {
text-decoration: none;
}
.remove-icon {
display: inline-block;
}
.attachment-label,
.attachment-metadata {
margin-top: 0;
}
}
&.new {
2020-09-25 21:06:09 +08:00
border: 1px solid $brand-primary;
.dnd-error {
bottom: 15px;
float: left;
padding-left: 5px;
position: relative;
}
2020-09-25 21:06:09 +08:00
&::before {
background: $brand-primary;
border-radius: 0 $border-radius-default;
bottom: 0;
color: $color-white;
content: "NEW";
left: 0;
line-height: 20px;
position: absolute;
text-align: center;
width: 50px;
z-index: 2;
}
}
}
2019-04-09 18:28:42 +08:00
.attachments-order {
display: inline-block;
}
2019-04-09 18:28:42 +08:00
.attachments-actions {
align-items: center;
display: flex;
2020-05-13 16:58:40 +08:00
flex-wrap: wrap;
.title {
flex-grow: 1;
2020-05-13 16:58:40 +08:00
flex-shrink: 0;
}
.attachments-order {
color: $color-silver-chalice;
min-width: 140px;
}
2019-04-09 18:28:42 +08:00
.btn-default {
border: 0;
color: inherit;
2019-04-09 18:28:42 +08:00
margin-left: 10px;
2019-04-09 18:28:42 +08:00
&:hover {
background: inherit;
}
}
}
.step .textarea-sm {
border-radius: 0;
}
.comments-title {
color: $color-emperor;
}
2020-04-24 17:50:03 +08:00
.expand-all-steps {
margin: 0 0 15px 15px;
}
.inline-attachment-container {
@include md-card-style;
grid-column: 1/-1;
2020-10-16 17:00:57 +08:00
grid-row: span 12;
.active-iframe-preview {
border: 0;
2020-09-24 23:10:36 +08:00
height: calc(100% - 4em);
width: 100%;
}
2020-09-24 23:10:36 +08:00
2020-10-16 17:00:57 +08:00
.image-container,
.general-file-container {
align-items: center;
2020-10-16 17:27:23 +08:00
background: $color-concrete;
2020-10-16 17:00:57 +08:00
display: flex;
height: calc(100% - 4em);
justify-content: center;
padding: .5em;
width: 100%;
img {
max-height: 100%;
2020-10-16 17:27:23 +08:00
max-width: 100%;
2020-10-16 17:00:57 +08:00
}
.fas {
font-size: 10em;
}
}
2020-09-24 23:10:36 +08:00
.header {
align-items: center;
display: flex;
height: 4em;
padding: 0 1em;
.show-as-thumbnail {
cursor: pointer;
margin-left: auto;
}
.file-name {
@include font-main;
color: $brand-primary;
}
.file-metadata {
@include font-small;
color: $color-silver-chalice;
display: grid;
grid-column-gap: 1em;
grid-template-columns: max-content max-content;
}
}
}
2020-10-16 17:00:57 +08:00
.list-attachment-container {
@include md-card-style;
align-items: center;
display: flex;
grid-column: 1/-1;
padding: .5em;
2020-10-16 17:27:23 +08:00
.file-icon {
2020-10-16 17:00:57 +08:00
@include font-main;
}
.file-name {
@include font-main;
color: $brand-primary;
margin: 0 .5em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-metadata {
@include font-small;
color: $color-silver-chalice;
display: grid;
grid-column-gap: 1em;
grid-template-columns: max-content max-content;
}
}