fileinput.scss 11 KB

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