<!DOCTYPE html>
<html lang="de">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title><?= htmlspecialchars($title ?? 'Mailresponder') ?></title>

  <?php $config = include __DIR__ . '/../includes/config.php'; ?>

  <link rel="stylesheet" href="<?php echo $config['app']['base_url'] ?>/assets/bootstrap/dist/css/bootstrap.min.css">
  <?php $styleVersion = @filemtime(__DIR__ . '/../templates/style.css') ?: time(); ?>
  <link rel="stylesheet" href="<?php echo $config['app']['base_url'] ?>/templates/style.css?v=<?= urlencode((string) $styleVersion) ?>">
</head>
<body>

<!-- Header -->
<nav class="navbar navbar-expand-lg bg-header">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">
      <img src="../templates/images/header-grafik.png" alt="">
    </a>
  </div>
</nav>

<!-- Page Content -->
<div class="page-contend">
  <div class="container">
    <div class="row">
      <div class="col-sm-9 col-md-7 col-lg-5 mx-auto">
        <div class="card card-signin my-5">
          <div class="card-body">
            <h5 class="card-title text-center"><?= htmlspecialchars($title ?? '') ?></h5>
            <?php
            $renderedPageContent = $pageContent ?? '';
	            if ($renderedPageContent !== '' && strpos($renderedPageContent, 'class="page-help"') === false) {
	                $fallbackPageHelp = null;
	                if (array_key_exists('pageHelp', get_defined_vars())) {
	                    $fallbackPageHelp = $pageHelp;
	                } else {
	                    $fallbackPageHelp = renderPageHelp([
	                        'sections' => [
	                            [
	                                'heading' => 'Kurzinfo',
	                                'items' => [
	                                    inferPageHelpPurpose((string)($title ?? ''), (string)($_SERVER['SCRIPT_NAME'] ?? '')),
	                                ],
	                            ],
	                        ],
	                    ]);
	                }
	                if (is_string($fallbackPageHelp) && $fallbackPageHelp !== '') {
	                    $renderedPageContent = $fallbackPageHelp . $renderedPageContent;
	                }
	            }
            if ($renderedPageContent !== '') {
                echo $renderedPageContent;
            }
            ?>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- Footer -->
<nav class="navbar navbar-expand-md fixed-bottom footer">
  <div class="container justify-content-center">
    <span>Powered by <a href="https://mailresponder.de" target="_blank" rel="noopener noreferrer">mailresponder.de</a> &ndash; Open Source Email Marketing &nbsp;&nbsp;|&nbsp;&nbsp; Licensed under GPL-3.0-only &nbsp;&nbsp;|&nbsp;&nbsp; <a href="https://www.gnu.org/licenses/gpl-3.0.html" target="_blank" rel="noopener noreferrer">GPL-3.0</a></span>
  </div>
</nav>

<script src="/assets/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<?= renderFieldTooltipBootstrap($fieldTooltips ?? []) ?>
</body>
</html>



