pdf.less 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. .pdf .toolbar.toolbar-pdf when (@is-overleaf = true) {
  2. .toolbar-small-mixin;
  3. .toolbar-alt-mixin;
  4. border-bottom: 0;
  5. padding-right: 5px;
  6. }
  7. .pdf .toolbar.toolbar-pdf when (@is-overleaf = false) {
  8. .toolbar-tall-mixin;
  9. padding: 0 (@line-height-computed / 2);
  10. }
  11. .pdf-viewer, .pdf-logs, .pdf-errors, .pdf-uncompiled {
  12. .full-size;
  13. top: 58px;
  14. }
  15. .pdf-logs, .pdf-errors, .pdf-uncompiled, .pdf-validation-problems{
  16. padding: @line-height-computed / 2;
  17. }
  18. .pdf-uncompiled {
  19. .fa {
  20. color: @blue;
  21. }
  22. }
  23. .btn-recompile-group when (@is-overleaf = true) {
  24. align-self: stretch;
  25. margin-right: 5px;
  26. }
  27. .btn-recompile-group when (@is-overleaf = false) {
  28. margin-right: (@line-height-computed / 2);
  29. }
  30. .btn-recompile when (@is-overleaf = true) {
  31. height: 100%;
  32. .btn-primary;
  33. padding-top: 3px;
  34. padding-bottom: 3px;
  35. &:first-child {
  36. border-top-left-radius: 0;
  37. border-bottom-left-radius: 0;
  38. }
  39. }
  40. .btn-recompile when (@is-overleaf = false) {
  41. .btn-info;
  42. }
  43. .btn-split-screen when (@is-overleaf = false) {
  44. .fa {
  45. display: none;
  46. }
  47. }
  48. .btn-split-screen when (@is-overleaf = true) {
  49. .fa {
  50. display: none;
  51. }
  52. }
  53. .pdf-viewer {
  54. iframe {
  55. width: 100%;
  56. height: 100%;
  57. border: none;
  58. }
  59. .pdfjs-viewer {
  60. .full-size;
  61. background-color: @gray-lighter;
  62. overflow: scroll;
  63. canvas, div.pdf-canvas {
  64. background: white;
  65. box-shadow: black 0px 0px 10px;
  66. }
  67. div.pdf-canvas.pdfng-empty {
  68. background-color: white;
  69. }
  70. div.pdf-canvas.pdfng-loading {
  71. background-color: white;
  72. }
  73. .page-container {
  74. margin: 10px auto;
  75. padding: 0 10px;
  76. box-sizing: content-box;
  77. user-select: none;
  78. }
  79. }
  80. .progress-thin {
  81. position: absolute;
  82. top: -2px;
  83. height: 3px;
  84. left: 0;
  85. right: 0;
  86. .progress-bar {
  87. height: 100%;
  88. background-color: @link-color;
  89. }
  90. }
  91. .pdfjs-controls {
  92. position: absolute;
  93. padding: @line-height-computed / 2;
  94. top: 0;
  95. left: 0;
  96. display: inline-block;
  97. .btn-group {
  98. transition: opacity 0.5s ease, visibility 0 linear 0.5s;
  99. visibility: hidden;
  100. opacity: 0;
  101. }
  102. &:hover, &.flash {
  103. .btn-group {
  104. transition: none;
  105. visibility: visible;
  106. opacity: 1;
  107. }
  108. }
  109. i.fa-arrows-h {
  110. border-right: 2px solid white;
  111. border-left: 2px solid white;
  112. }
  113. i.fa-arrows-v {
  114. border-top: 2px solid white;
  115. border-bottom: 2px solid white;
  116. }
  117. }
  118. }
  119. .pdf .toolbar {
  120. .toolbar-right {
  121. a {
  122. &:hover {
  123. i when (@is-overleaf = false) {
  124. box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.25);
  125. border-color: @gray-dark;
  126. }
  127. }
  128. i when (@is-overleaf = false) {
  129. display: inline-block;
  130. width: 16px;
  131. height: 16px;
  132. border: 1px solid @gray-light;
  133. margin-top: 5px;
  134. }
  135. i.full-screen {
  136. border-top-width: 3px;
  137. border-radius: 2px;
  138. }
  139. i.full-screen when (@is-overleaf = true) {
  140. display: none;
  141. }
  142. i.split-screen {
  143. width: 7px;
  144. border-top-width: 3px;
  145. border-radius: 2px;
  146. margin-left: 2px;
  147. }
  148. i.split-screen when (@is-overleaf = true) {
  149. display: none;
  150. }
  151. i.fa when (@is-overleaf = false) {
  152. display: none;
  153. }
  154. }
  155. }
  156. }
  157. .pdf-logs {
  158. overflow: auto;
  159. .alert {
  160. font-size: 0.9rem;
  161. margin-bottom: @line-height-computed / 2;
  162. cursor: pointer;
  163. .line-no {
  164. float: right;
  165. color: @gray;
  166. font-weight: 700;
  167. .fa {
  168. opacity: 0;
  169. }
  170. }
  171. .entry-message {
  172. font-weight: 700;
  173. //font-family: @font-family-monospace;
  174. }
  175. .entry-content {
  176. white-space: pre-wrap;
  177. font-size: 0.8rem;
  178. //font-family: @font-family-monospace;
  179. }
  180. &:hover .line-no {
  181. color: inherit;
  182. .fa {
  183. opacity: 1;
  184. }
  185. }
  186. &.alert-danger:hover {
  187. background-color: darken(@alert-danger-bg, 5%);
  188. }
  189. &.alert-warning:hover {
  190. background-color: darken(@alert-warning-bg, 5%);
  191. }
  192. &.alert-info:hover {
  193. background-color: darken(@alert-info-bg, 5%);
  194. }
  195. }
  196. pre {
  197. font-size: 12px;
  198. }
  199. .dropdown {
  200. position: relative;
  201. }
  202. .force-recompile {
  203. margin-top: 10px;
  204. text-align: right;
  205. }
  206. }
  207. .synctex-controls {
  208. position: absolute;
  209. z-index: @synctex-controls-z-index;
  210. padding: @synctex-controls-padding;
  211. top: 68px;
  212. }
  213. .synctex-controls when (@is-overleaf = true) {
  214. margin-right: -11px;
  215. }
  216. .synctex-control {
  217. display: block;
  218. margin-bottom: 3px;
  219. > .synctex-control-icon {
  220. display: inline-block;
  221. font: normal normal normal 14px/1 FontAwesome;
  222. font-size: inherit;
  223. text-rendering: auto;
  224. -webkit-font-smoothing: antialiased;
  225. -moz-osx-font-smoothing: grayscale;
  226. }
  227. }
  228. .synctex-control when (@is-overleaf = true) {
  229. @ol-synctex-control-size: 24px;
  230. display: flex;
  231. align-items: center;
  232. justify-content: center;
  233. font-size: 1em;
  234. width: @ol-synctex-control-size;
  235. height: @ol-synctex-control-size;
  236. border-radius: @ol-synctex-control-size / 2;
  237. padding: 0 0 2px;
  238. background-color: fade(@btn-default-bg, 80%);
  239. transition: background 0.15s ease;
  240. margin-bottom: @ol-synctex-control-size / 2;
  241. }
  242. .synctex-control when (@is-overleaf = false) {
  243. line-height: 1.3;
  244. padding: 0 2px;
  245. }
  246. .synctex-control-goto-pdf > .synctex-control-icon when (@is-overleaf = true) {
  247. text-indent: 1px; // "Optical" adjustment.
  248. &::before {
  249. content: "\f061";
  250. }
  251. }
  252. .synctex-control-goto-code > .synctex-control-icon when (@is-overleaf = true) {
  253. text-indent: -1px; // "Optical" adjustment.
  254. &::before {
  255. content: "\f060";
  256. }
  257. }
  258. .synctex-control-goto-pdf > .synctex-control-icon::before when (@is-overleaf = false) {
  259. content: "\f178";
  260. }
  261. .synctex-control-goto-code > .synctex-control-icon::before when (@is-overleaf = false) {
  262. content: "\f177";
  263. }
  264. .editor-dark {
  265. .pdf-logs {
  266. background-color: lighten(@editor-dark-background-color, 10%);
  267. }
  268. .pdfjs-viewer {
  269. background-color: lighten(@editor-dark-background-color, 10%);
  270. }
  271. .pdf .toolbar {
  272. .toolbar-right a {
  273. i {
  274. border-color: @gray;
  275. }
  276. &:hover {
  277. i {
  278. border-color: @gray-light;
  279. }
  280. }
  281. }
  282. }
  283. }
  284. .keyboard-tooltip {
  285. .tooltip-inner {
  286. max-width: none;
  287. }
  288. }
  289. .keyboard-shortcut {
  290. white-space: nowrap;
  291. }
  292. @keyframes expand-feedback-area {
  293. from {
  294. max-height: 0;
  295. }
  296. to {
  297. max-height: 500px;
  298. }
  299. }
  300. .card-hint:extend(.card-thin) {
  301. margin-top: 10px;
  302. padding-bottom: 7px;
  303. cursor: default;
  304. &-icon-container {
  305. background: currentColor;
  306. width: 2.5rem;
  307. height: 2.5rem;
  308. font-size: 1.5rem;
  309. text-align: center;
  310. border-radius: 50%;
  311. float: left;
  312. margin-right: 10px;
  313. .fa {
  314. color: #FFF;
  315. }
  316. .alert-danger & {
  317. color: @alert-danger-border;
  318. }
  319. .alert-warning & {
  320. color: @alert-warning-border;
  321. }
  322. .alert-info & {
  323. color: @alert-info-border;
  324. }
  325. }
  326. &-text,
  327. &-feedback-label {
  328. color: @gray-dark;
  329. font-size: 0.9rem;
  330. margin-bottom: 20px;
  331. }
  332. &-text {
  333. min-height: 35px;
  334. }
  335. &-feedback-label {
  336. font-size: inherit;
  337. margin-right: 0.5em;
  338. margin-bottom: 0;
  339. font-weight: normal;
  340. }
  341. &-ext-link,
  342. &-feedback {
  343. display: inline-block;
  344. font-size: 0.8rem;
  345. }
  346. &-actions a,
  347. &-text a {
  348. .alert-danger & {
  349. color: @alert-danger-text;
  350. }
  351. .alert-warning & {
  352. color: @alert-warning-text;
  353. }
  354. .alert-info & {
  355. color: @alert-info-text;
  356. }
  357. }
  358. &-feedback {
  359. color: @gray-dark;
  360. float: right;
  361. }
  362. &-extra-feedback {
  363. color: @gray-dark;
  364. font-size: 0.8rem;
  365. margin-top: 10px;
  366. padding-bottom: 5px;
  367. animation: 0.5s ease-out expand-feedback-area;
  368. overflow: hidden;
  369. &-label {
  370. margin: 5px 0 10px;
  371. padding-top: 5px;
  372. border-top: solid 1px @gray-lighter;
  373. }
  374. .radio {
  375. margin: 5px;
  376. }
  377. textarea {
  378. font-size: 0.8rem;
  379. margin-bottom: 10px;
  380. padding: 5px;
  381. }
  382. input[type="radio"] {
  383. margin-top: 2px;
  384. }
  385. }
  386. & + p {
  387. margin-top: 20px;
  388. }
  389. }
  390. .files-dropdown-container {
  391. .pull-right();
  392. position: relative;
  393. }
  394. .files-dropdown {
  395. display: inline-block;
  396. }
  397. .plv-text-layer {
  398. display: none;
  399. user-select: text;
  400. .pdf-page-container:hover &,
  401. .pdfjs-viewer-show-text & {
  402. display: block;
  403. }
  404. }