Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored and github-actions[bot] committed Nov 21, 2023
1 parent f37d34b commit a4ee591
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 70 deletions.
34 changes: 17 additions & 17 deletions fragments/backend_css.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<style>
:root {
--backend--color:
<?= rex_config::get('be_style_fluent', 'color'); ?>
<?= rex_config::get('be_style_fluent', 'color') ?>
;
--backend--color_font:
<?= rex_config::get('be_style_fluent', 'color_font'); ?>
<?= rex_config::get('be_style_fluent', 'color_font') ?>
;
--backend--color_warning:
<?= rex_config::get('be_style_fluent', 'color_warning'); ?>
<?= rex_config::get('be_style_fluent', 'color_warning') ?>
;
--backend--color_success:
<?= rex_config::get('be_style_fluent', 'color_success'); ?>
<?= rex_config::get('be_style_fluent', 'color_success') ?>
;
--backend--color_danger:
<?= rex_config::get('be_style_fluent', 'color_danger'); ?>
<?= rex_config::get('be_style_fluent', 'color_danger') ?>
;
--backend--color_anchor:
<?= rex_config::get('be_style_fluent', 'color_anchor'); ?>
<?= rex_config::get('be_style_fluent', 'color_anchor') ?>
;

--backend--color_highlight:
<?= rex_config::get('be_style_fluent', 'color_highlight'); ?>
<?= rex_config::get('be_style_fluent', 'color_highlight') ?>
;
--backend--color_warning_highlight:
<?= rex_config::get('be_style_fluent', 'color_warning_highlight'); ?>
<?= rex_config::get('be_style_fluent', 'color_warning_highlight') ?>
;
--backend--color_success_highlight:
<?= rex_config::get('be_style_fluent', 'color_success_highlight'); ?>
<?= rex_config::get('be_style_fluent', 'color_success_highlight') ?>
;
--backend--color_danger_highlight:
<?= rex_config::get('be_style_fluent', 'color_danger_highlight'); ?>
<?= rex_config::get('be_style_fluent', 'color_danger_highlight') ?>
;

--backend--shadow: 0 0 15px 0px rgba(0, 0, 0, 0.15);
Expand All @@ -46,7 +46,7 @@
--backend--grey: #ddd;
--backend--darkgrey: #555;

--backend--font-family: "<?= rex_config::get('be_style_fluent', 'font'); ?>", sans-serif;
--backend--font-family: "<?= rex_config::get('be_style_fluent', 'font') ?>", sans-serif;

--backend--panel-border-radius: 15px;
--backend--button-border-radius: 10px;
Expand All @@ -56,23 +56,23 @@
}

@font-face {
font-family: "<?= rex_config::get('be_style_fluent', 'font'); ?>";
font-family: "<?= rex_config::get('be_style_fluent', 'font') ?>";
font-style: normal;
font-weight: 300;
src: local("<?= rex_config::get('be_style_fluent', 'font'); ?>"), local("<?= rex_config::get('be_style_fluent', 'font'); ?>-Light"), url("/assets/addons/be_style_fluent/fonts/<?= rex_config::get('be_style_fluent', 'font'); ?>-Light.woff2") format("woff2");
src: local("<?= rex_config::get('be_style_fluent', 'font') ?>"), local("<?= rex_config::get('be_style_fluent', 'font') ?>-Light"), url("/assets/addons/be_style_fluent/fonts/<?= rex_config::get('be_style_fluent', 'font') ?>-Light.woff2") format("woff2");
}

@font-face {
font-family: "<?= rex_config::get('be_style_fluent', 'font'); ?>";
font-family: "<?= rex_config::get('be_style_fluent', 'font') ?>";
font-style: normal;
font-weight: 400;
src: local("<?= rex_config::get('be_style_fluent', 'font'); ?>"), local("<?= rex_config::get('be_style_fluent', 'font'); ?>-Regular"), url("/assets/addons/be_style_fluent/fonts/<?= rex_config::get('be_style_fluent', 'font'); ?>-Regular.woff2") format("woff2");
src: local("<?= rex_config::get('be_style_fluent', 'font') ?>"), local("<?= rex_config::get('be_style_fluent', 'font') ?>-Regular"), url("/assets/addons/be_style_fluent/fonts/<?= rex_config::get('be_style_fluent', 'font') ?>-Regular.woff2") format("woff2");
}

@font-face {
font-family: "<?= rex_config::get('be_style_fluent', 'font'); ?>";
font-family: "<?= rex_config::get('be_style_fluent', 'font') ?>";
font-style: normal;
font-weight: 700;
src: local("<?= rex_config::get('be_style_fluent', 'font'); ?>"), local("<?= rex_config::get('be_style_fluent', 'font'); ?>-Bold"), url("/assets/addons/be_style_fluent/fonts/<?= rex_config::get('be_style_fluent', 'font'); ?>-Bold.woff2") format("woff2");
src: local("<?= rex_config::get('be_style_fluent', 'font') ?>"), local("<?= rex_config::get('be_style_fluent', 'font') ?>-Bold"), url("/assets/addons/be_style_fluent/fonts/<?= rex_config::get('be_style_fluent', 'font') ?>-Bold.woff2") format("woff2");
}
</style>
16 changes: 8 additions & 8 deletions fragments/core/footer.php
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<footer class="rex-global-footer">
<nav class="rex-nav-footer">
<ul class="list-inline">
<li><a href="<?= rex_url::backendPage('be_style_fluent/feedback/readme'); ?>"
<li><a href="<?= rex_url::backendPage('be_style_fluent/feedback/readme') ?>"
target="_blank" rel="noreferrer noopener' ?>">Hilfe</a>
</li>
<li><a
href="<?php echo rex::getUser() ? rex_url::backendPage('credits') : 'https://www.redaxo.org/" target="_blank" rel="noreferrer noopener'; ?>"><?php echo rex_i18n::msg('footer_credits'); ?></a>
href="<?= rex::getUser() ? rex_url::backendPage('credits') : 'https://www.redaxo.org/" target="_blank" rel="noreferrer noopener' ?>"><?= rex_i18n::msg('footer_credits') ?></a>
</li>
<?php if (rex::getUser() && rex::getUser()->isAdmin()): ?>
<li><a href="https://www.yakamara.de" target="_blank" rel="noreferrer noopener">yakamara.de</a></li>
<li><a href="https://www.redaxo.org" target="_blank" rel="noreferrer noopener">redaxo.org</a></li>
<li class="rex-js-script-time pull-right">
<!--DYN--><?php echo rex_i18n::msg('footer_scripttime', $this->time); ?>
<!--DYN--><?= rex_i18n::msg('footer_scripttime', $this->time) ?>
<!--/DYN-->
</li>
<?php endif; ?>
<?php endif ?>

<?php if (!rex_be_controller::getCurrentPageObject()->isPopup() && rex::getUser() && rex::getUser()->isAdmin() && rex::isDebugMode()): ?>
<li class="pull-right be_style_fluent-debug-mode"><a class=""
href="<?= rex_url::backendPage('system/settings'); ?>"
title="<?= rex_i18n::msg('debug_mode_marker'); ?>">
href="<?= rex_url::backendPage('system/settings') ?>"
title="<?= rex_i18n::msg('debug_mode_marker') ?>">
<i style="color: white;" class="rex-icon rex-icon-heartbeat"></i> Debug-Modus ist aktiviert</a>
</li>
<?php endif; ?>
<?php endif ?>
<li class="pull-right"><a href="#rex-start-of-page"><i class="fa fa-arrow-up"></i></a></li>
<li class="pull-right be_style_fluent"><a
href="<?= rex_url::backendPage('be_style_fluent/form'); ?>"><i
href="<?= rex_url::backendPage('be_style_fluent/form') ?>"><i
class="rex-icon fa-commenting-o"></i> Hilfe anfordern</a></li>
</ul>
</nav>
Expand Down
16 changes: 8 additions & 8 deletions fragments/core/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
$isSetup = ('setup' === rex_be_controller::getCurrentPage());

if (rex_config::get('be_style_fluent', 'logo')) {
$logo_path = '/media/'.rex_config::get('be_style_fluent', 'logo');
$logo_path = '/media/' . rex_config::get('be_style_fluent', 'logo');
} else {
$logo_path = '/assets/addons/be_style_fluent/images/redaxo-logo.svg';
}
?>

<div id="rex-js-nav-top"
class="rex-nav-top<?php if (!$isPopup && !$isSetup): ?> rex-nav-top-is-fixed<?php endif; ?>">
class="rex-nav-top<?php if (!$isPopup && !$isSetup): ?> rex-nav-top-is-fixed<?php endif ?>">

<nav class="rex-nav-top navbar navbar-default">
<div class="container-fluid">
Expand All @@ -30,26 +30,26 @@ class="rex-nav-top<?php if (!$isPopup && !$isSetup): ?> rex-nav-top-is-fixed<?ph
<span class="icon-bar"></span>
</span>
</button>
<?php endif; ?>
<?php endif ?>

<div class="navbar-header">
<?php if ($isPopup): ?>
<span class="navbar-brand"><img class="rex-js-svg rex-redaxo-logo"
src="<?= $logo_path; ?>" /></span>
src="<?= $logo_path ?>" /></span>
<?php else: ?>

<a class="navbar-brand"
href="<?= rex_url::backendController(); ?>"><img
href="<?= rex_url::backendController() ?>"><img
class="rex-js-svg rex-redaxo-logo"
src="<?= $logo_path; ?>" /></a>
<?php endif; ?>
src="<?= $logo_path ?>" /></a>
<?php endif ?>
<?php if (!$isPopup && rex::getUser() && rex::getUser()->isAdmin() && rex::isDebugMode()): ?>
<a class="rex-marker-debugmode"
href="<?= rex_url::backendPage('system/settings') ?>"
title="<?= rex_i18n::msg('debug_mode_marker') ?>">
<i class="rex-icon rex-icon-heartbeat rex-pulse"></i>
</a>
<?php endif; ?>
<?php endif ?>
</div>

<?= $this->meta_navigation ?>
Expand Down
5 changes: 2 additions & 3 deletions fragments/core/login_background.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* @psalm-scope-this rex_fragment
*/


$media = rex_media::get(rex_config::get('be_style_fluent', 'login_bg'));

$agency = rex_config::get('be_style_fluent', 'agency');
Expand All @@ -16,8 +15,8 @@
$credits_url = rex_config::get('be_style_fluent', 'login_bg_credits_url');
} else {
$login_bg = 'rex_url::addonAssets'('be_style_fluent', '/images/sander-weeteling-4I41IQtmSs0-unsplash.jpg');
$credits = "Photo by Sander Weeteling on Unsplash";
$credits_url = "https://unsplash.com/@sander-weeteling";
$credits = 'Photo by Sander Weeteling on Unsplash';
$credits_url = 'https://unsplash.com/@sander-weeteling';
} ?>
<picture class="rex-background">
<img alt="" src="<?= $login_bg ?>" />
Expand Down
2 changes: 1 addition & 1 deletion fragments/core/login_branding.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<?php
$media = rex_media::get(rex_config::get('be_style_fluent', 'logo'));
if ($media) {
echo '<img src="'.$media->getUrl().'" />';
echo '<img src="' . $media->getUrl() . '" />';
} else {
echo rex_file::get(rex_path::addonAssets('be_style_fluent', 'images/redaxo-logo.svg'));
} ?>
Expand Down
35 changes: 15 additions & 20 deletions fragments/core/navigations/meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,31 @@
foreach ($items as $item) {
$list_item = '';

if (isset($item['title']) && $item['title'] != '') {
if (isset($item['title']) && '' != $item['title']) {
$list_item .= $item['title'];
}

$attributes = '';
if (isset($item['attributes']) && trim($item['attributes']) != '') {
if (isset($item['attributes']) && '' != trim($item['attributes'])) {
$attributes = ' ' . trim($item['attributes']);
}

if (isset($item['href']) && $item['href'] != '') {
if (isset($item['href']) && '' != $item['href']) {
$list_item = '<a href="' . $item['href'] . '"' . $attributes . '>' . $list_item . '</a>';
} elseif ($attributes != '') {
} elseif ('' != $attributes) {
$list_item = '<span' . $attributes . '>' . $list_item . '</span>';
}

$list_items[] = '<li>' . $list_item . '</li>';
}


// Domain-Button
$check = "";
$new = "";
$check = '';
$new = '';
$list_items = rex_extension::registerPoint(new rex_extension_point('META_NAVI', $list_items));


$ydomains = rex_yrewrite::getDomains();

if (is_array($ydomains) && count($ydomains) > 2) {
$domains = '<li>
<div class="dropdown" style="transform: translate(-15px,8px);">
Expand All @@ -46,32 +44,29 @@
<ul class="dropdown-menu" aria-labelledby="dropdowndomains">';

foreach ($ydomains as $ydomain => $ydomainx) {
if ($ydomain == "default") {
if ('default' == $ydomain) {
continue;
}
$domains .= '<li><a style="display: block;" href="'.$ydomainx->getUrl().'" target="_blank">'.$ydomainx->getHost().'</a></li>';
$domains .= '<li><a style="display: block;" href="' . $ydomainx->getUrl() . '" target="_blank">' . $ydomainx->getHost() . '</a></li>';
}
$domains .= '</ul></div></li>';
$domains .= '</ul></div></li>';
} else {
$domains = '<a class="btn btn-link" style="float: left; transform: translate(-15px,8px);" href="'.rex::getServer().'" target="_blank"><i class="rex-icon fa-desktop""></i> '.rex::getServerName().'</a>';
$domains = '<a class="btn btn-link" style="float: left; transform: translate(-15px,8px);" href="' . rex::getServer() . '" target="_blank"><i class="rex-icon fa-desktop""></i> ' . rex::getServerName() . '</a>';
}

// Pixelfirma Neu-Button
$user = rex_backend_login::createUser();


if ($user && $user->isAdmin()) {
$check = "";
$check = '';
if (rex::getConfig('debug')) {
$check .= '<a class="btn btn-link" style="float: left; transform: translate(-15px,8px);" href=""><i class="rex-icon fa-warning""></i>Debug-Modus aktiv</a>';
$check .= '<a class="btn btn-link" style="float: left; transform: translate(-15px,8px);" href=""><i class="rex-icon fa-warning""></i>Debug-Modus aktiv</a>';
}

if (rex_config::get('maintenance', "frontend_aktiv") == "Aktivieren") {
$check .= '<a class="btn btn-link" style="float: left; transform: translate(-15px,8px);" href=""><i class="rex-icon fa-warning""></i>Debug-Modus aktiv</a>';
if ('Aktivieren' == rex_config::get('maintenance', 'frontend_aktiv')) {
$check .= '<a class="btn btn-link" style="float: left; transform: translate(-15px,8px);" href=""><i class="rex-icon fa-warning""></i>Debug-Modus aktiv</a>';
}



$new = '<li style="margin-right: 5px;">
<div class="dropdown" style="transform: translate(-15px,8px); z-index: 10000;">
<button class="btn btn-link dropdown-toggle" type="button" id="dropdownnew" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Neu <span class="caret"></span>
Expand Down
6 changes: 3 additions & 3 deletions fragments/module_select.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
?>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle btn-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?= "Abschnitt hinzufügen" // $this->button_label?> <span class="caret"></span>
<?= 'Abschnitt hinzufügen' // $this->button_label?> <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="combobox">
<?php
foreach ($this->items as $item) {
?>

<li><a href="<?= $item["href"] ?>"
class=""><i class="rex-icon fa-chevron-right"></i> <?= $item["title"] ?></a></li>
<li><a href="<?= $item['href'] ?>"
class=""><i class="rex-icon fa-chevron-right"></i> <?= $item['title'] ?></a></li>
<?php
}
?>
Expand Down
4 changes: 2 additions & 2 deletions fragments/slice_menu_action.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
$new_items = [];
foreach ($items as $item) {
if (array_key_exists('hidden_label', $item)) {
$hidden_labels = explode(" ", $item['hidden_label']);
$item['label'] = " ".array_pop($hidden_labels);
$hidden_labels = explode(' ', $item['hidden_label']);
$item['label'] = ' ' . array_pop($hidden_labels);
unset($item['hidden_label']);
$new_items[] = $item;
} else {
Expand Down
2 changes: 1 addition & 1 deletion functions/backend_styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ function backend_style_css($ep)
{
$backend_css = new rex_fragment();

return $ep->getSubject().$backend_css->parse('backend_css.php');
return $ep->getSubject() . $backend_css->parse('backend_css.php');
}
13 changes: 6 additions & 7 deletions pages/system.ci.branding.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
$field = $form->addMediaField('login_bg');
$field->setLabel('Hintergrundbild');

$field = $form->addInputField('text', 'agency', null, ["class" => "form-control"]);
$field = $form->addInputField('text', 'agency', null, ['class' => 'form-control']);
$field->setLabel('Name der Agentur');

$field = $form->addInputField('url', 'agency_url', null, ["class" => "form-control"]);
$field = $form->addInputField('url', 'agency_url', null, ['class' => 'form-control']);
$field->setLabel('Website');
$field = $form->addInputField('text', 'login_bg_credits', null, ["class" => "form-control"]);
$field = $form->addInputField('text', 'login_bg_credits', null, ['class' => 'form-control']);
$field->setLabel('Bildquelle');

$field = $form->addInputField('url', 'login_bg_credits_url', null, ["class" => "form-control"]);
$field = $form->addInputField('url', 'login_bg_credits_url', null, ['class' => 'form-control']);
$field->setLabel('Bildquelle (URL)');


$form->addFieldset('Schrift');

$field = $form->addSelectField('font');
Expand Down Expand Up @@ -110,13 +109,13 @@
<div class="col-lg-4">
<?php

$anchor = '<a target="_blank" href="https://donate.alexplus.de/?addon=be_style_fluent"><img src="'.rex_url::addonAssets('be_style_fluent', 'jetzt-beauftragen.svg').'" style="width: 100% max-width: 400px;"></a>';
$anchor = '<a target="_blank" href="https://donate.alexplus.de/?addon=be_style_fluent"><img src="' . rex_url::addonAssets('be_style_fluent', 'jetzt-beauftragen.svg') . '" style="width: 100% max-width: 400px;"></a>';

$fragment = new rex_fragment();
$fragment->setVar('class', 'info', false);
$fragment->setVar('title', $this->i18n('be_style_fluent_donate'), false);
$fragment->setVar('body', '<p>' . $this->i18n('be_style_fluent_info_donate') . '</p>' . $anchor, false);
echo !rex_config::get("alexplusde", "donated") ? $fragment->parse('core/page/section.php') : "";
echo !rex_config::get('alexplusde', 'donated') ? $fragment->parse('core/page/section.php') : '';
?>
</div>
</div>

0 comments on commit a4ee591

Please sign in to comment.