Update theme.blade.php

This commit is contained in:
Julian Prieber 2023-12-11 18:11:02 +01:00
parent 604ed2ddb4
commit b80455e34d

View File

@ -1,4 +1,4 @@
<?php @php
// Theme Config // Theme Config
if (!function_exists('theme')) { if (!function_exists('theme')) {
function theme($key){ function theme($key){
@ -18,7 +18,9 @@ function themeAsset($path){
$path = url('themes/' . $GLOBALS['themeName'] . '/extra/custom-assets/' . $path); $path = url('themes/' . $GLOBALS['themeName'] . '/extra/custom-assets/' . $path);
return $path;} return $path;}
} }
?>
$customBackgroundExists = false;
@endphp
@foreach($information as $info) @php $GLOBALS['themeName'] = $info->theme; @endphp @endforeach @foreach($information as $info) @php $GLOBALS['themeName'] = $info->theme; @endphp @endforeach
@ -27,11 +29,7 @@ return $path;}
$customBackgroundFile = findBackground($userinfo->id); $customBackgroundFile = findBackground($userinfo->id);
$customBackgroundPath = base_path('assets/img/background-img/'.$customBackgroundFile); $customBackgroundPath = base_path('assets/img/background-img/'.$customBackgroundFile);
$customBackgroundURL = url('assets/img/background-img/'.$customBackgroundFile); $customBackgroundURL = url('assets/img/background-img/'.$customBackgroundFile);
$customBackgroundExists = file_exists($customBackgroundPath); $customBackgroundExists = file_exists($customBackgroundPath)
if($customBackgroundExists == true){
$customBackgroundBrightness = analyzeImageBrightness($customBackgroundFile);
} else {
$customBackgroundBrightness = false;}
@endphp @endphp
@if($customBackgroundExists == true) @if($customBackgroundExists == true)