overleaf/services/web/frontend/stylesheets/app/editor/file-view.less
Antoine Clausse d6de6da781 [web] Migrate the file view to Bootstrap 5 (#20765)
* [web] Remove unnecessary divs around `fileInfo`

* [web] Add file-view SCSS style

* [web] Simplify `TPRFileViewInfo`

* [web] Add div for action buttons

* [web] Misc. simplifications

* [web] Add Overleaf logo in bg when selecting multiple files

* [web] Add message when multiple files are selected

* [web] Add .full-size class

* [web] Import styles from LESS file

* [web] Update icons, use MaterialIcon

* [web] Use OLButton

* [web] Add missing space between icons and text

* [web] Adjust margins

* [web] Fix alert button

* [web] Update Alerts

* [web] Update `FileViewLoadingIndicator`

* [web] Fix test "shows a loading indicator..."

This was failing because `LoadingSpinner` is shown after a setTimeout.
Maybe we can skip this setTimeout when delay==0 ?

* [web] Remove Row/Col around error notifications

* [web] Replace `!!` by `Boolean`

Co-authored-by: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com>

* [web] Use `alert` class in BS3 only

Co-authored-by: Ilkin Ismailov <ilkin.ismailov@overleaf.com>

* [web] Update "Go to settings" to OLButton

Co-authored-by: Ilkin Ismailov <ilkin.ismailov@overleaf.com>

* [web] Use `BootstrapVersionSwitcher` instead of `isBootstrap5`

Co-authored-by: Ilkin Ismailov <ilkin.ismailov@overleaf.com>

* [web] Align Alert content to the left in BS5

* [web] Remove `leadingIcon` on Refresh buttons

* [web] Make the download link be an OLButton

* [web] Set `tpr-refresh-error` in BS3 only

Co-authored-by: Rebeka Dekany <50901361+rebekadekany@users.noreply.github.com>

* [web] Use `var(--white);` instead of `white`

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>

* [web] Update OLButton size (small -> sm)

---------

Co-authored-by: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com>
Co-authored-by: Ilkin Ismailov <ilkin.ismailov@overleaf.com>
Co-authored-by: Rebeka Dekany <50901361+rebekadekany@users.noreply.github.com>
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
GitOrigin-RevId: 04f369c0f1a53d47619a1570648ee58de5050751
2024-10-14 11:07:55 +00:00

82 lines
1.6 KiB
Text

.file-view,
.binary-file {
padding: @line-height-computed / 2;
background-color: @gray-lightest;
text-align: center;
overflow: auto;
.file-view-buttons {
display: flex;
flex-wrap: wrap;
gap: @spacing-03;
justify-content: center;
}
.file-view-error {
margin: @spacing-08 -15px auto;
> .alert {
max-width: 400px;
margin: 0 auto;
}
}
.tpr-refresh-error {
.btn {
color: @neutral-90;
background-color: @white;
&:hover {
background-color: @neutral-20;
}
}
}
img,
.file-view-pdf {
max-width: 100%;
max-height: 90%;
display: block;
margin: auto;
margin-top: @line-height-computed / 2;
border: 1px solid @gray;
.box-shadow(0 2px 3px @gray;);
background-color: white;
}
.file-view-pdf {
overflow: auto;
width: max-content;
display: flex;
flex-direction: column;
align-items: center;
.pdf-page:not(:last-of-type) {
border-bottom: 1px solid @gray;
}
}
p.no-preview {
margin-top: @line-height-computed / 2;
font-size: 24px;
color: @gray;
}
.text-loading {
margin-top: @line-height-computed / 2;
font-size: 24px;
color: @gray;
}
.text-preview {
margin-top: @line-height-computed / 2;
.scroll-container {
background-color: white;
font-size: 0.8em;
line-height: 1.1em;
overflow: auto;
border: 1px solid @gray-lighter;
padding: 8px 12px;
text-align: left;
white-space: pre;
font-family: monospace;
}
}
.linked-file-icon {
color: @blue;
}
}