Skip to content

Commit

Permalink
Fix noscript opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrckvzn committed Oct 1, 2021
1 parent 8f2bf2e commit 4d79ee9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/views/main-image.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
'attributes' => 'data-main-image',
'shouldLoad' => true,
'sources' => $mainSources ?? [],
'style' => $mainStyle,
'style' => $mainNoscriptStyle,
])
</noscript>
2 changes: 1 addition & 1 deletion src/Services/ImageStyles.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function placeholder()
*
* @return string
*/
public function main($loading)
public function main($loading = 'eager')
{
$style = array_merge(
[
Expand Down
1 change: 1 addition & 0 deletions src/ViewModels/ImageViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ public function toArray(): array
'layout' => $this->layout,
'loading' => $this->loading,
'mainStyle' => $this->styleService->main($this->loading),
'mainNoscriptStyle' => $this->styleService->main(),
'mainSrc' => $this->src,
'mainSources' => $this->sources,
'placeholderSrc' => $this->lqipSrc,
Expand Down

0 comments on commit 4d79ee9

Please sign in to comment.