File tree Expand file tree Collapse file tree 2 files changed +39
-4
lines changed
Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -55,4 +55,28 @@ html, body {
5555
5656.hidden {
5757 display : none;
58- }
58+ }
59+
60+ .square {
61+ position : absolute;
62+ top : 0 ;
63+ right : 0 ;
64+ bottom : 0 ;
65+ left : 0 ;
66+ }
67+ .icon-container {
68+ width : 100% ;
69+ height : 100% ;
70+ text-align : center;
71+ margin : 0 auto;
72+ }
73+ .icon-container : before {
74+ content : '' ;
75+ display : inline-block;
76+ vertical-align : middle ;
77+ height : 100% ;
78+ }
79+ .icon-container > i {
80+ display : inline-block;
81+ vertical-align : middle;
82+ }
Original file line number Diff line number Diff line change 11<?php $file_name = $file_info [$key ][' name' ]; ? >
22@if ($type == ' Images' )
33<?php $thumb_src = $thumb_url . $file_name ; ? >
4+ <?php $thumb_not_found = realpath (public_path ($thumb_src )) === false ; ? >
45@endif
56
67<div class =" col-sm-4 col-md-3 col-lg-2 img-row" >
78
8- <div class =" thumbnail thumbnail-img text-center" data-id =" {{ $file_name } }" id =" img_thumbnail_{{ $key } }" >
9+ <div class =" thumbnail thumbnail-img text-center" data-id =" {{ $file_name } }" id =" img_thumbnail_{{ $key } }" style =" max-width : 210px ;max-height : 210px ;" >
10+ <div style =" width :100% ;padding-bottom :100% ;position : relative ;" >
911 @if ($type == ' Images' )
10- <img id =" {{ $file_name } }" src =" {{ $thumb_src } }" alt =" " class =" pointer" onclick =" useFile('{{ $file_name } } ')" >
12+ @if ($thumb_not_found )
13+ <div class =" square icon-container" >
14+ <i class =" fa fa-image fa-5x pointer" onclick =" useFile('{{ $file_name } } ')" ></i >
15+ </div >
16+ @else
17+ <img id =" {{ $file_name } }" src =" {{ $thumb_src } }" style =" max-width : 100% " class =" pointer square" onclick =" useFile('{{ $file_name } } ')" >
18+ @endif
1119 @else
12- <i class =" fa {{ $file [' icon' ] } } fa-5x" style =" height :200px ;cursor :pointer ;padding-top :60px ;" onclick =" useFile('{{ $file_name } } ')" ></i >
20+ <div class =" square icon-container" >
21+ <i class =" fa {{ $file [' icon' ] } } fa-5x pointer" onclick =" useFile('{{ $file_name } } ')" ></i >
22+ </div >
1323 @endif
24+ </div >
1425 </div >
1526
1627 <div class =" caption text-center" >
You can’t perform that action at this time.
0 commit comments