Skip to content

Commit 759887e

Browse files
author
steve-ks
committed
Update purgecss
* Add fa-file regex
1 parent 85ff6c2 commit 759887e

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

app/Http/Controllers/StorageController.php

+4-7
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ private function selectMimeIcon($mime)
5353
}
5454
}
5555

56-
// For images with missing thumbnails
57-
if ($this->startsWith($mime, 'image'))
58-
{
59-
return $this->faMimeIcons['image'];
60-
}
61-
62-
6356
if ($this->startsWith($mime, 'application'))
6457
{
6558
if ($this->contains($mime, 'word') || $this->contains($mime, 'text'))
@@ -79,6 +72,10 @@ private function selectMimeIcon($mime)
7972

8073
if ($this->startsWith($mime, 'video'))
8174
return $this->faMimeIcons['video'];
75+
76+
// For images with missing thumbnails
77+
if ($this->startsWith($mime, 'image'))
78+
return $this->faMimeIcons['image'];
8279
}
8380

8481
/**

public/css/app.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/storage.blade.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@if($fobj['ispicture'])
2525
{{-- Modal overlay link for image files --}}
2626
<span onclick="previewImage('{{ $fobj['url'] }}')"
27-
class="absolute inset-0 hover:bg-gray-700 opacity-25 z-10">
27+
class="absolute inset-0 hover:bg-gray-700 opacity-25 z-10 cursor-pointer">
2828
</span>
2929
@else
3030
{{-- Download overlay link for normal files --}}
@@ -38,8 +38,8 @@ class="absolute inset-0 hover:bg-gray-700 opacity-25 z-10">
3838
<img class="object-contain h-40 mb-4 p-4 mx-auto" title="{{ $fobj['basename'] }}" src="{{ $fobj['image'] }}" alt="{{ $fobj['basename'] }}" />
3939
@else
4040
<span class="fa-stack fa-4x pt-4 text-teal-800">
41-
<i class="fas fa-circle fa-stack-2x"></i>
42-
<i class="fas fa-{{ $fobj['icon'] }} fa-stack-1x fa-inverse"></i>
41+
<i class="fa fa-circle fa-stack-2x"></i>
42+
<i class="fa fa-{{ $fobj['icon'] }} fa-stack-1x fa-inverse"></i>
4343
</span>
4444
@endif
4545
</div>

webpack.mix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mix.webpackConfig({
2828
.copy('./node_modules/@fortawesome/fontawesome-free/webfonts', 'public/webfonts')
2929
.tailwind('tailwind.config.js')
3030
.purgeCss({
31-
whitelistPatterns: [/-active$/, /-enter$/, /-leave-to$/, /dropzone/, /^dz-/]
31+
whitelistPatterns: [/-active$/, /-enter$/, /-leave-to$/, /dropzone/, /^dz-/, /^fa-file/]
3232
})
3333
.setPublicPath('public')
3434
.browserSync('http://localhost:8000');

0 commit comments

Comments
 (0)