Trauerflor rudimentär hinzugefügt

Der Trauerflor kann momentan nur über die Helferklasse App\Helpers\Designhelper::isMourningPile aktiviert werden
This commit is contained in:
Marco Glietsch 2023-03-09 20:47:20 +01:00
parent 8d87112492
commit 91d162906c
4 changed files with 213 additions and 181 deletions

View File

@ -0,0 +1,18 @@
<?php
/**
* Created by PhpStorm.
* User: Marco Glietsch
* Date: 14.05.2018
* Time: 16:20
*/
namespace App\Helpers;
class DesignHelper
{
static public function hasMourningPile()
{
return true;
}
}

View File

@ -249,6 +249,7 @@ return [
'String' => App\Helpers\StringHelper::class, 'String' => App\Helpers\StringHelper::class,
'StringHelper' => App\Helpers\StringHelper::class, 'StringHelper' => App\Helpers\StringHelper::class,
'BreakingNews' => App\Helpers\BreakingNewsHelper::class, 'BreakingNews' => App\Helpers\BreakingNewsHelper::class,
'Design' => App\Helpers\DesignHelper::class,
], ],
]; ];

View File

@ -137,7 +137,20 @@
{ {
img = $('#content_container img:first').attr('src'); img = $('#content_container img:first').attr('src');
} }
@if(Design::hasMourningPile())
$('#bg-image').css('background-image', 'linear-gradient(black, black), url('+img+')');
$('#bg-image').css('background-blend-mode', 'saturation');
@else
$('#bg-image').css('background-image', 'url('+img+')'); $('#bg-image').css('background-image', 'url('+img+')');
@endif
// Wenn Trauerfloor verwendet werden soll werden alle Bilder in Grautönen angezeigt
@if(Design::hasMourningPile())
$('img').css('-webkit-filter', 'grayscale(100%)')
.css('filter', 'grayscale(100%)');
@endif
$('#info_card_close_button').on('click',function() { $('#info_card_close_button').on('click',function() {
$(this).closest('#info_card').fadeOut(); $(this).closest('#info_card').fadeOut();
}) })