fileinput.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /*!
  2. * bootstrap-fileinput vh.1.0.0 from v5.5.2
  3. * http://plugins.krajee.com/file-input
  4. *
  5. * Krajee default styling for bootstrap-fileinput.
  6. *
  7. * Author: Kartik Visweswaran
  8. * Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com
  9. *
  10. * Licensed under the BSD-3-Clause
  11. * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
  12. */
  13. input[type=file].file-loading, .file-loading input[type=file] {
  14. width: 0;
  15. height: 0;
  16. }
  17. .file-input-ajax-new .no-browse .input-group-btn, .file-input-ajax-new .fileinput-upload-button, .file-input-ajax-new .fileinput-remove-button, .file-input-new .no-browse .input-group-btn, .file-input-new .fileinput-upload-button, .file-input-new .fileinput-remove-button, .file-input-new .glyphicon-file, .file-input-new .close, .file-input-new .file-preview, .file-zoom-dialog .modal-header:after, .file-zoom-dialog .modal-header:before, .file-caption-icon, .hide-content .kv-file-content, .kv-hidden {
  18. display: none;
  19. }
  20. .file-zoom-dialog .floating-buttons, .file-zoom-dialog .btn-navigate, .krajee-default .file-thumb-progress, .file-preview .fileinput-remove, .file-caption-icon, .btn-file input[type=file], .file-no-browse {
  21. position: absolute;
  22. }
  23. .file-zoom-dialog .modal-dialog, .krajee-default .file-thumbnail-footer, .krajee-default.file-preview-frame, .file-preview, .file-caption, .btn-file, .file-loading:before, .file-input {
  24. position: relative;
  25. }
  26. .krajee-default .file-other-error, .krajee-default .file-actions, .file-error-message ul, .file-error-message pre {
  27. text-align: left;
  28. }
  29. .file-error-message ul, .file-error-message pre {
  30. margin: 0;
  31. }
  32. .krajee-default .file-upload-indicator, .krajee-default .file-drag-handle {
  33. float: left;
  34. margin-top: 10px;
  35. width: 16px;
  36. height: 16px;
  37. }
  38. .krajee-default .file-thumb-progress .progress-bar, .krajee-default .file-thumb-progress .progress {
  39. height: 11px;
  40. font-size: 9px;
  41. }
  42. .krajee-default .file-size-info, .krajee-default .file-caption-info {
  43. display: block;
  44. white-space: nowrap;
  45. overflow: hidden;
  46. text-overflow: ellipsis;
  47. width: 160px;
  48. height: 15px;
  49. margin: auto;
  50. }
  51. .file-zoom-content > .file-object.type-image, .file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-video {
  52. max-width: 100%;
  53. max-height: 100%;
  54. width: auto;
  55. }
  56. .file-zoom-content > .file-object.type-flash, .file-zoom-content > .file-object.type-video {
  57. height: 100%;
  58. }
  59. .file-zoom-content > .file-object.type-default, .file-zoom-content > .file-object.type-text, .file-zoom-content > .file-object.type-html, .file-zoom-content > .file-object.type-pdf {
  60. width: 100%;
  61. }
  62. .file-no-browse {
  63. left: 50%;
  64. bottom: 20%;
  65. width: 1px;
  66. height: 1px;
  67. font-size: 0;
  68. opacity: 0;
  69. border: none;
  70. background: none;
  71. outline: none;
  72. box-shadow: none;
  73. }
  74. .file-loading:before {
  75. content: " Loading...";
  76. display: inline-block;
  77. padding-left: 20px;
  78. line-height: 16px;
  79. font-size: 13px;
  80. font-variant: small-caps;
  81. color: #999;
  82. background: transparent url(../img/loading.gif) top left no-repeat;
  83. }
  84. .file-object {
  85. margin: 0 0 -5px 0;
  86. padding: 0;
  87. }
  88. .btn-file {
  89. overflow: hidden;
  90. }
  91. .btn-file input[type=file] {
  92. top: 0;
  93. left: 0;
  94. min-width: 100%;
  95. min-height: 100%;
  96. text-align: right;
  97. opacity: 0;
  98. background: none repeat scroll 0 0 transparent;
  99. cursor: inherit;
  100. display: block;
  101. }
  102. .btn-file ::-ms-browse {
  103. font-size: 10000px;
  104. width: 100%;
  105. height: 100%;
  106. }
  107. .file-caption .input-group {
  108. align-items: center;
  109. }
  110. .file-caption.icon-visible .file-caption-icon {
  111. display: inline-block;
  112. }
  113. .file-caption.icon-visible .file-caption-name {
  114. padding-left: 25px;
  115. }
  116. .file-caption.icon-visible > .input-group-lg .file-caption-name {
  117. padding-left: 30px;
  118. }
  119. .file-caption.icon-visible > .input-group-sm .file-caption-name {
  120. padding-left: 22px;
  121. }
  122. .file-caption-icon {
  123. left: 4px;
  124. padding: 7px 5px;
  125. }
  126. .input-group-lg .file-caption-icon {
  127. font-size: 1.25rem;
  128. }
  129. .input-group-sm .file-caption-icon {
  130. font-size: 0.875rem;
  131. padding: 0.25rem;
  132. }
  133. .file-error-message {
  134. color: #a94442;
  135. background-color: #f2dede;
  136. margin: 5px;
  137. border: 1px solid #ebccd1;
  138. border-radius: 4px;
  139. padding: 15px;
  140. }
  141. .file-error-message pre {
  142. margin: 5px 0;
  143. }
  144. .file-caption-disabled {
  145. background-color: #eee;
  146. cursor: not-allowed;
  147. opacity: 1;
  148. }
  149. .file-preview {
  150. border-radius: 5px;
  151. border: 1px solid #ddd;
  152. padding: 8px;
  153. width: 100%;
  154. margin-bottom: 5px;
  155. }
  156. .file-preview .btn-xs {
  157. padding: 1px 5px;
  158. font-size: 12px;
  159. line-height: 1.5;
  160. border-radius: 3px;
  161. }
  162. .file-preview .fileinput-remove {
  163. top: 1px;
  164. right: 1px;
  165. line-height: 10px;
  166. }
  167. .file-preview .clickable {
  168. cursor: pointer;
  169. }
  170. .file-preview .kv-zoom-cache {
  171. display: none;
  172. }
  173. .file-preview-image {
  174. font: 40px Impact, Charcoal, sans-serif;
  175. color: #008000;
  176. width: auto;
  177. height: auto;
  178. max-width: 100%;
  179. max-height: 100%;
  180. }
  181. .krajee-default.file-preview-frame {
  182. margin: 8px;
  183. border: 1px solid rgba(0, 0, 0, 0.2);
  184. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
  185. padding: 6px;
  186. float: left;
  187. text-align: center;
  188. height: 244px;
  189. }
  190. .krajee-default.file-preview-frame .kv-file-content {
  191. width: 213px;
  192. height: 140px;
  193. }
  194. .krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
  195. width: 400px;
  196. }
  197. .krajee-default.file-preview-frame .file-thumbnail-footer {
  198. height: 70px;
  199. }
  200. .krajee-default.file-preview-frame:not(.file-preview-error):hover {
  201. border: 1px solid rgba(0, 0, 0, 0.3);
  202. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.4);
  203. }
  204. .krajee-default.file-preview-frame[data-template=audio] .kv-file-content {
  205. width: 240px;
  206. height: 55px;
  207. }
  208. .krajee-default .file-preview-text {
  209. color: #428bca;
  210. border: 1px solid #ddd;
  211. outline: none;
  212. resize: none;
  213. }
  214. .krajee-default .file-preview-html {
  215. border: 1px solid #ddd;
  216. }
  217. .krajee-default .file-other-icon {
  218. font-size: 6em;
  219. line-height: 1;
  220. }
  221. .krajee-default .file-footer-buttons {
  222. float: right;
  223. }
  224. .krajee-default .file-footer-caption {
  225. display: block;
  226. text-align: center;
  227. padding-top: 4px;
  228. font-size: 11px;
  229. color: #999;
  230. margin-bottom: 30px;
  231. }
  232. .krajee-default .file-preview-error {
  233. opacity: 0.65;
  234. box-shadow: none;
  235. }
  236. .krajee-default .file-thumb-progress {
  237. top: 37px;
  238. left: 0;
  239. right: 0;
  240. }
  241. .krajee-default .file-thumb-progress .progress {
  242. color: #ccc;
  243. }
  244. .krajee-default .file-thumb-progress .progress-bar {
  245. font-family: Verdana, Helvetica, sans-serif;
  246. }
  247. .krajee-default.kvsortable-ghost {
  248. background: #e1edf7;
  249. border: 2px solid #a1abff;
  250. }
  251. .krajee-default .file-preview-other:hover {
  252. opacity: 0.8;
  253. }
  254. .krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover {
  255. color: #000;
  256. }
  257. .file-upload-stats {
  258. font-size: 10px;
  259. text-align: center;
  260. width: 100%;
  261. }
  262. .kv-upload-progress .progress {
  263. height: 20px;
  264. line-height: 20px;
  265. margin: 10px 0;
  266. overflow: hidden;
  267. color: #ccc;
  268. }
  269. .kv-upload-progress .progress-bar {
  270. height: 20px;
  271. font-family: Verdana, Helvetica, sans-serif;
  272. }
  273. .kv-upload-progress .file-upload-stats {
  274. font-size: 12px;
  275. margin: -10px 0 5px;
  276. }
  277. .file-thumb-progress .progress {
  278. background-color: #ccc;
  279. }
  280. .file-thumb-progress .progress-bar {
  281. font-size: 0.7rem;
  282. font-family: Verdana, Helvetica, sans-serif;
  283. }
  284. .file-zoom-dialog .file-other-icon {
  285. font-size: 22em;
  286. font-size: 50vmin;
  287. }
  288. .file-zoom-dialog .modal-dialog {
  289. width: auto;
  290. }
  291. .file-zoom-dialog .modal-header {
  292. display: flex;
  293. align-items: center;
  294. justify-content: space-between;
  295. }
  296. .file-zoom-dialog .btn-navigate {
  297. margin: 0 0.1rem;
  298. padding: 0;
  299. font-size: 1.2rem;
  300. width: 2.4rem;
  301. height: 2.4rem;
  302. top: 50%;
  303. border-radius: 50%;
  304. text-align: center;
  305. }
  306. .file-zoom-dialog .btn-navigate * {
  307. width: auto;
  308. }
  309. .file-zoom-dialog .floating-buttons {
  310. top: 5px;
  311. right: 10px;
  312. }
  313. .file-zoom-dialog .btn-kv-prev {
  314. left: 0;
  315. }
  316. .file-zoom-dialog .btn-kv-next {
  317. right: 0;
  318. }
  319. .file-zoom-dialog .kv-zoom-header {
  320. padding: 0.5rem;
  321. }
  322. .file-zoom-dialog .kv-zoom-body {
  323. padding: 0.25rem;
  324. }
  325. .file-zoom-dialog .kv-zoom-description {
  326. position: absolute;
  327. opacity: 0.8;
  328. font-size: 0.8rem;
  329. background-color: #1a1a1a;
  330. padding: 1rem;
  331. text-align: center;
  332. border-radius: 0.5rem;
  333. color: #fff;
  334. left: 15%;
  335. right: 15%;
  336. bottom: 15%;
  337. }
  338. .file-zoom-dialog .kv-desc-hide {
  339. float: right;
  340. color: #fff;
  341. padding: 0 0.1rem;
  342. background: none;
  343. border: none;
  344. }
  345. .file-zoom-dialog .kv-desc-hide:hover,
  346. .file-zoom-dialog .kv-desc-hide:focus {
  347. opacity: 0.7;
  348. }
  349. .file-input-new .no-browse .form-control {
  350. border-top-right-radius: 4px;
  351. border-bottom-right-radius: 4px;
  352. }
  353. .file-input-ajax-new .no-browse .form-control {
  354. border-top-right-radius: 4px;
  355. border-bottom-right-radius: 4px;
  356. }
  357. .file-thumb-loading:not(:has(.file-preview-thumbnails .file-preview-frame)) {
  358. background: transparent url(../img/loading.gif) no-repeat scroll center center content-box !important;
  359. }
  360. .file-thumb-loading .file-drop-zone:hover {
  361. padding-bottom: 6px;
  362. }
  363. .file-thumb-loading .file-drop-zone:hover .file-preview-status {
  364. margin-top: -1px;
  365. }
  366. .file-thumb-loading .file-drop-zone *:first-child:is(.file-preview-thumbnails):has(.file-preview-frame) + .file-preview-status {
  367. background: rgba(255, 255, 255, 0.38) url(../img/loading.gif) no-repeat scroll center center content-box !important;
  368. width: calc(100% - 60px);
  369. }
  370. .file-drop-zone {
  371. border: 1px dashed #aaa;
  372. border-radius: 4px;
  373. min-height: 272px;
  374. text-align: center;
  375. vertical-align: middle;
  376. margin: 12px 15px 12px 12px;
  377. padding: 5px;
  378. user-select: none;
  379. }
  380. .file-drop-zone.clickable:hover {
  381. border: 2px dashed #999;
  382. margin-top: 11px;
  383. margin-bottom: 11px;
  384. }
  385. .file-drop-zone.clickable:hover .file-preview-frame {
  386. margin-left: 7px;
  387. margin-bottom: 7px;
  388. }
  389. .file-drop-zone.clickable:has(.file-preview-frame):hover {
  390. padding-bottom: 6px;
  391. }
  392. .file-drop-zone.clickable .file-preview-thumbnails {
  393. cursor: pointer;
  394. }
  395. .file-drop-zone:not(:has(input[type=file][multiple])), .file-drop-zone:not(:has(input[type=file][multiple=true])) {
  396. display: flex;
  397. justify-content: center;
  398. }
  399. .file-drop-zone *:first-child:is(.file-preview-thumbnails):has(.file-preview-frame) + .file-preview-status {
  400. position: absolute;
  401. left: 50%;
  402. top: 25px;
  403. transform: translateX(-50%);
  404. }
  405. .file-drop-zone .file-preview-status {
  406. height: 260px;
  407. }
  408. .file-drop-zone-title {
  409. height: 260px;
  410. color: #aaa;
  411. font-size: 1.6em;
  412. padding: 85px 10px;
  413. cursor: default;
  414. text-align: center;
  415. }
  416. .file-highlighted {
  417. border: 2px dashed #999 !important;
  418. background-color: #eee;
  419. }
  420. .file-uploading {
  421. background: url(../img/loading-sm.gif) no-repeat center bottom 10px;
  422. opacity: 0.65;
  423. }
  424. .file-zoom-fullscreen .modal-dialog {
  425. min-width: 100%;
  426. margin: 0;
  427. }
  428. .file-zoom-fullscreen .modal-content {
  429. border-radius: 0;
  430. box-shadow: none;
  431. min-height: 100vh;
  432. }
  433. .file-zoom-fullscreen .kv-zoom-body {
  434. overflow-y: auto;
  435. }
  436. .floating-buttons {
  437. z-index: 3000;
  438. }
  439. .floating-buttons .btn-kv {
  440. margin-left: 3px;
  441. z-index: 3000;
  442. }
  443. .kv-zoom-actions {
  444. min-width: 140px;
  445. }
  446. .kv-zoom-actions .btn-kv {
  447. margin-left: 3px;
  448. }
  449. .file-zoom-content {
  450. min-height: 300px;
  451. text-align: center;
  452. white-space: nowrap;
  453. }
  454. .file-zoom-content .file-preview-image {
  455. max-height: 100%;
  456. }
  457. .file-zoom-content .file-preview-video {
  458. max-height: 100%;
  459. }
  460. .file-zoom-content > .file-object.type-image {
  461. height: auto;
  462. min-height: inherit;
  463. }
  464. .file-zoom-content > .file-object.type-audio {
  465. width: auto;
  466. height: 30px;
  467. }
  468. .file-zoom-content:hover {
  469. background: transparent;
  470. }
  471. @media (min-width: 576px) {
  472. .file-zoom-dialog .modal-dialog {
  473. max-width: 500px;
  474. }
  475. }
  476. @media (min-width: 992px) {
  477. .file-zoom-dialog .modal-lg {
  478. max-width: 800px;
  479. }
  480. }
  481. @media (max-width: 767px) {
  482. .file-preview-thumbnails {
  483. display: flex;
  484. justify-content: center;
  485. align-items: center;
  486. flex-direction: column;
  487. }
  488. .file-zoom-dialog .modal-header {
  489. flex-direction: column;
  490. }
  491. }
  492. @media (max-width: 350px) {
  493. .krajee-default.file-preview-frame:not([data-template=audio]) .kv-file-content {
  494. width: 160px;
  495. }
  496. }
  497. @media (max-width: 420px) {
  498. .krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
  499. width: 100%;
  500. }
  501. }
  502. .file-loading[dir=rtl]:before {
  503. background: transparent url(../img/loading.gif) top right no-repeat;
  504. padding-left: 0;
  505. padding-right: 20px;
  506. }
  507. .clickable .file-drop-zone-title {
  508. cursor: pointer;
  509. }
  510. .file-sortable .file-drag-handle {
  511. cursor: grab;
  512. opacity: 1;
  513. }
  514. .file-sortable .file-drag-handle:hover {
  515. opacity: 0.7;
  516. }
  517. .file-grabbing, .file-grabbing * {
  518. cursor: not-allowed !important;
  519. }
  520. .file-grabbing .file-preview-thumbnails * {
  521. cursor: grabbing !important;
  522. }
  523. .file-preview-initial.sortable-chosen {
  524. background-color: #d9edf7;
  525. border-color: #17a2b8;
  526. box-shadow: none;
  527. }
  528. .file-preview-other-frame, .file-preview-object, .kv-file-content, .kv-zoom-body {
  529. display: flex;
  530. align-items: center;
  531. justify-content: center;
  532. }
  533. .btn-kv-rotate {
  534. display: none;
  535. }
  536. .kv-file-rotate {
  537. display: none;
  538. }
  539. .rotatable:not(.hide-rotate) .btn-kv-rotate {
  540. display: inline-block;
  541. }
  542. .rotatable:not(.hide-rotate) .kv-file-rotate {
  543. display: inline-block;
  544. }
  545. .rotatable .file-zoom-detail {
  546. transform-origin: center center;
  547. }
  548. .rotatable .kv-file-content {
  549. transform-origin: center center;
  550. }
  551. .rotatable .kv-file-content > :first-child {
  552. transform-origin: center center;
  553. }
  554. .rotate-animate {
  555. transition: transform 0.3s ease;
  556. }
  557. .kv-overflow-hidden {
  558. overflow: hidden;
  559. }