Fix codestyle

This commit is contained in:
Michael 2025-01-26 12:59:59 +00:00
commit c0723e3d48
10 changed files with 339 additions and 303 deletions

View file

@ -24,15 +24,17 @@ if (!isset($minimal)) {
$minimal = false;
}
$basepath = DI::baseUrl()->getPath() ? "/" . DI::baseUrl()->getPath() . "/" : "/";
$frio = "view/theme/frio";
$view_mode_class = (DI::mode()->isMobile() || DI::mode()->isMobile()) ? 'mobile-view' : 'desktop-view';
$is_singleuser = DI::config()->get('system', 'singleuser');
$basepath = DI::baseUrl()->getPath() ? "/" . DI::baseUrl()->getPath() . "/" : "/";
$frio = "view/theme/frio";
$view_mode_class = (DI::mode()->isMobile() || DI::mode()->isMobile()) ? 'mobile-view' : 'desktop-view';
$is_singleuser = DI::config()->get('system', 'singleuser');
$is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
?>
<html>
<head>
<title><?php if (!empty($page['title'])) echo $page['title'] ?></title>
<title><?php if (!empty($page['title'])) {
echo $page['title'];
} ?></title>
<meta request="<?php echo htmlspecialchars($_REQUEST['pagename'] ?? '') ?>">
<script type="text/javascript">var baseurl = "<?php echo (string)DI::baseUrl(); ?>";</script>
<script type="text/javascript">var frio = "<?php echo 'view/theme/frio'; ?>";</script>
@ -45,24 +47,23 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
echo $page['htmlhead'];
}
// Add the theme color meta
// It makes mobile Chrome UI match Frio's top bar color.
$uid = Profile::getThemeUid($a);
$scheme = frio_scheme_get_current_for_user($uid);
if ($scheme != FRIO_CUSTOM_SCHEME) {
if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
$schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
$scheme_accent =
DI::pConfig()->get($uid, 'frio', 'scheme_accent') ?:
DI::config()->get('frio', 'scheme_accent') ?: FRIO_SCHEME_ACCENT_BLUE;
// Add the theme color meta
// It makes mobile Chrome UI match Frio's top bar color.
$uid = Profile::getThemeUid($a);
$scheme = frio_scheme_get_current_for_user($uid);
if ($scheme != FRIO_CUSTOM_SCHEME) {
if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
$schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
$scheme_accent = DI::pConfig()->get($uid, 'frio', 'scheme_accent') ?:
DI::config()->get('frio', 'scheme_accent') ?: FRIO_SCHEME_ACCENT_BLUE;
require_once $schemefile;
}
}
require_once $schemefile;
}
}
$nav_bg = $nav_bg ?? DI::pConfig()->get($uid, 'frio', 'nav_bg', DI::config()->get('frio', 'nav_bg', '#708fa0'));
$nav_bg = $nav_bg ?? DI::pConfig()->get($uid, 'frio', 'nav_bg', DI::config()->get('frio', 'nav_bg', '#708fa0'));
echo '<meta name="theme-color" content="' . $nav_bg . '" />';
echo '<meta name="theme-color" content="' . $nav_bg . '" />';
?>
</head>
@ -81,24 +82,26 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
);
};
// special minimal style for modal dialogs
if ($minimal) {
?>
// special minimal style for modal dialogs
if ($minimal) {
?>
<!-- <?php echo __FILE__ ?> -->
<section class="minimal">
<?php if (!empty($page['content'])) echo $page['content']; ?>
<?php if (!empty($page['content'])) {
echo $page['content'];
} ?>
<div id="page-footer"></div>
</section>
<?php
} else {
// the style for all other pages
?>
} else {
// the style for all other pages
?>
<main>
<div class="container">
<div class="row">
<?php
if ((empty($_REQUEST['pagename']) || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
echo '
if ((empty($_REQUEST['pagename']) || $_REQUEST['pagename'] != "lostpass") && ($_SERVER['REQUEST_URI'] != $basepath)) {
echo '
<aside class="col-lg-3 col-md-3 offcanvas-sm offcanvas-xs">';
if (!empty($page['aside'])) {
@ -114,18 +117,18 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
<div class="col-lg-7 col-md-7 col-sm-12 col-xs-12" id="content">
<section class="sectiontop ';
echo $page['section'] ?? '';
echo '-content-wrapper">';
if (!empty($page['content'])) {
echo $page['content'];
}
echo '
echo $page['section'] ?? '';
echo '-content-wrapper">';
if (!empty($page['content'])) {
echo $page['content'];
}
echo '
<div id="pause"></div> <!-- The pause/resume Ajax indicator -->
</section>
</div>
';
} else {
echo '
} else {
echo '
<section class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="content" style="margin-top:50px;">';
if (!empty($page['content'])) {
echo $page['content'];
@ -133,8 +136,8 @@ $is_singleuser_class = $is_singleuser ? "is-singleuser" : "is-not-singleuser";
echo '
</section>
';
}
?>
}
?>
</div><!--row-->
</div><!-- container -->