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

459 lines
7.7 KiB
SCSS
Raw Normal View History

2020-11-04 20:08:40 +08:00
// scss-lint:disable ImportantRule PropertyUnits NestingDepth SelectorDepth
.attachment-container {
@include md-card-style;
2023-09-18 21:32:53 +08:00
grid-row: span 5;
height: 15.875rem;
padding: 1rem;
2020-11-04 20:08:40 +08:00
position: relative;
width: var(--attachment-column-width);
.file-preview-link,
.shareable-file-preview-link {
2020-11-04 20:08:40 +08:00
display: block;
height: 100%;
width: 100%;
}
.attachment-preview {
border-radius: $border-radius-default;
color: $color-volcano;
2023-09-18 21:32:53 +08:00
height: 11.625rem;
2020-11-04 20:08:40 +08:00
position: relative;
text-align: center;
width: 100%;
&.processing {
2020-11-23 21:12:29 +08:00
background-image: url("/images/medium/loading.svg");
2020-11-04 20:08:40 +08:00
background-position: center;
background-repeat: no-repeat;
}
img {
max-height: 100%;
max-width: 100%;
}
.fas {
font-size: 100px;
2023-06-23 21:01:04 +08:00
height: 240px;
2020-11-04 20:08:40 +08:00
}
}
.no-shadow {
box-shadow: none;
}
.attachment-label,
.attachment-metadata {
background: $color-white;
overflow: hidden;
padding-top: 1em;
position: relative;
text-overflow: ellipsis;
transition: $md-transaction;
white-space: nowrap;
}
.thumbnail-action-btn {
border: 1px solid var(--sn-light-grey);
&:hover {
background-color: var(--sn-white);
border-color: var(--sn-blue);
}
}
2020-11-04 20:08:40 +08:00
.attachment-label {
@include font-main;
z-index: 2;
}
.attachment-metadata {
@include font-small;
color: $color-silver-chalice;
margin-top: -4em;
}
.remove-icon {
bottom: .5em;
cursor: pointer;
display: none;
position: absolute;
right: .5em;
}
&:hover {
.file-preview-link,
.shareable-file-preview-link {
2020-11-04 20:08:40 +08:00
text-decoration: none;
}
.remove-icon {
display: inline-block;
}
.attachment-label,
.attachment-metadata {
margin-top: 0;
}
}
&.new {
border: 1px solid $brand-primary;
.dnd-error {
bottom: 15px;
float: left;
padding-left: 5px;
position: relative;
}
&::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;
}
}
.asset-context-menu {
position: absolute;
2023-09-18 21:32:53 +08:00
right: 1rem;
top: 1rem;
2020-11-04 20:08:40 +08:00
}
}
.inline-attachment-container {
@include md-card-style;
grid-column: 1/-1;
grid-row: span 12;
height: 47em;
.active-iframe-preview {
border: 0;
height: calc(100% - 4em);
width: 100%;
}
.file-info {
line-height: 1.5em;
}
2020-11-04 20:08:40 +08:00
.image-container,
.general-file-container {
align-items: center;
background: $color-concrete;
display: flex;
height: calc(100% - 4em);
justify-content: center;
padding: .5em;
width: 100%;
&.processing {
background-image: url("/images/medium/loading.svg");
background-position: center;
background-repeat: no-repeat;
}
2020-11-04 20:08:40 +08:00
img {
max-height: 100%;
max-width: 100%;
}
.fas {
font-size: 10em;
}
}
.pdf-viewer {
align-items: center;
background: $color-silver-chalice;
display: flex;
height: calc(100% - 4em);
justify-content: center;
margin: unset;
width: 100%;
}
2020-11-04 20:08:40 +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;
}
.asset-context-menu {
margin-left: auto;
}
}
.empty-office-file {
padding: 5em 1em 1em;
text-align: center;
}
2020-11-04 20:08:40 +08:00
}
.list-attachment-container {
@include md-card-style;
align-items: center;
display: flex;
grid-column: 1/-1;
height: 3em;
padding: .5em;
.file-icon {
@include font-main;
}
.attachment-image-tooltip {
2023-08-22 10:02:30 +08:00
bottom: 90px;
display: none;
position: relative;
right: 110px;
2023-08-22 10:02:30 +08:00
z-index: 9999;
img {
height: 150px;
}
}
.file-preview-link:hover + .attachment-image-tooltip {
display: block;
}
2020-11-04 20:08:40 +08:00
.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;
margin-left: auto;
2020-11-04 20:08:40 +08:00
}
.asset-context-menu {
2023-09-14 18:12:15 +08:00
margin-left: 1rem;
2020-11-04 20:08:40 +08:00
}
}
.asset-context-menu {
display: inline-block;
#dropdownAssetContextMenu {
background: $color-white;
&:active {
box-shadow: none;
}
&:hover {
background: $color-concrete;
}
}
.dropdown-menu {
@include font-button;
min-width: 200px;
2020-11-05 15:44:48 +08:00
padding: .5em 0;
z-index: 102;
2020-11-04 20:08:40 +08:00
.divider-label {
@include font-small;
color: $color-silver-chalice;
2020-11-04 20:08:40 +08:00
padding-left: 1em;
}
a {
2020-11-25 23:25:17 +08:00
border-radius: unset;
2020-11-04 20:08:40 +08:00
cursor: pointer;
padding: .5em 1em;
text-align: left;
2020-11-25 23:25:17 +08:00
&:hover {
background: $color-concrete;
}
2020-11-04 20:08:40 +08:00
.fas {
width: 1.5em;
}
&.selected::after {
@include font-awesome;
content: $font-fas-check;
margin-left: auto;
position: absolute;
right: 1em;
}
}
}
}
2020-11-24 22:37:45 +08:00
.uploading-attachment-container {
align-items: center;
background-color: $color-concrete;
display: flex;
flex-direction: column;
justify-content: center;
position: relative;
.icon {
font-size: 2em;
}
.file-name {
2022-08-02 17:00:13 +08:00
&:not(.one-line) div {
margin-bottom: .5em;
}
2022-08-02 17:00:13 +08:00
&.one-line {
align-items: center;
display: flex;
.file-name-text {
margin-left: .25em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.remove-button {
color: $color-silver-chalice;
cursor: pointer;
margin: .75em 1em;
position: absolute;
right: 0;
top: 0;
}
.progress-container {
background-color: $color-white;
flex-basis: 4px;
margin-top: 1em;
position: relative;
width: 60%;
.progress-bar {
background-color: $brand-primary;
height: 100%;
position: relative;
transition: 1s $timing-function-sharp;
}
}
&.list-attachment-container {
flex-direction: row;
.icon {
font-size: 1em;
}
.progress-container {
border-radius: 50%;
flex-basis: 30%;
height: 4px;
margin-left: auto;
margin-top: 0;
}
}
&.error {
background: $color-white;
border-color: $brand-danger;
.icon {
color: $brand-danger;
}
.error-container {
color: $brand-danger;
margin-top: 1em;
padding: 0 1em;
text-align: center;
}
&.list-attachment-container {
.error-container {
margin-left: auto;
margin-top: 0;
}
}
}
}
2020-11-24 22:37:45 +08:00
.asset-icon {
display: inline-block;
font-size: $font-size-h2;
text-align: center;
width: 24px;
&.fa-file-pdf {
color: $pdf-color;
}
&.fa-image {
color: $brand-primary;
}
}
.attachment-label-new {
align-items: center;
background-color: $brand-primary;
border-radius: 2px;
color: $color-concrete;
font-size: 12px;
margin-left: .25em;
margin-right: 1em;
padding: 4px 8px;
white-space: nowrap;
}
.sn-file-ove {
height: 1.5rem;
width: 1.5rem;
&::before {
content: url("icon_small/sequence-editor.svg");
display: inline-block;
margin: auto;
width: 100%;
}
}