simple.phtml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. declare(strict_types=1);
  3. /** @var FreshRSS_View $this */
  4. FreshRSS::preLayout();
  5. $class = '';
  6. if (_t('gen.dir') === 'rtl') {
  7. echo ' dir="rtl"';
  8. $class = 'rtl ';
  9. }
  10. if (FreshRSS_Context::userConf()->darkMode !== 'no') {
  11. $class .= 'darkMode_' . FreshRSS_Context::userConf()->darkMode;
  12. }
  13. ?>
  14. <!DOCTYPE html>
  15. <html lang="<?= FreshRSS_Context::userConf()->language ?>" xml:lang="<?= FreshRSS_Context::userConf()->language ?>" class="<?= $class ?>">
  16. <head>
  17. <meta charset="UTF-8" />
  18. <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
  19. <?= FreshRSS_View::metaThemeColor() ?>
  20. <?= FreshRSS_View::headStyle() ?>
  21. <script id="jsonVars" type="application/json">
  22. <?php $this->renderHelper('javascript_vars'); ?>
  23. </script>
  24. <?= FreshRSS_View::headScript() ?>
  25. <link rel="manifest" href="<?= Minz_Url::display('/themes/manifest.json') ?>" />
  26. <link rel="shortcut icon" id="favicon" type="image/x-icon" sizes="16x16 64x64" href="<?= Minz_Url::display('/favicon.ico') ?>" />
  27. <link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="<?= Minz_Url::display('/themes/icons/favicon-256.png') ?>" />
  28. <link rel="apple-touch-icon" href="<?= Minz_Url::display('/themes/icons/apple-touch-icon.png') ?>" />
  29. <meta name="apple-mobile-web-app-capable" content="yes" />
  30. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  31. <meta name="apple-mobile-web-app-title" content="<?= FreshRSS_Context::systemConf()->title ?>">
  32. <meta name="msapplication-TileColor" content="#FFF" />
  33. <meta name="theme-color" content="#FFF" />
  34. <?php if (!FreshRSS_Context::systemConf()->allow_referrer) { ?>
  35. <meta name="referrer" content="never" />
  36. <?php } ?>
  37. <?= FreshRSS_View::headTitle() ?>
  38. <?php if ($this->rss_url != ''): ?>
  39. <link rel="alternate" type="application/rss+xml" title="<?= $this->rss_title ?>" href="<?= $this->rss_url ?>" />
  40. <?php endif; ?>
  41. <meta name="robots" content="noindex,nofollow" />
  42. </head>
  43. <body>
  44. <?php flush(); ?>
  45. <div class="app-layout app-layout-simple">
  46. <div class="header">
  47. <div class="item title">
  48. <a href="<?= Minz_Url::display(['c' => 'index', 'a' => 'index'], 'html', 'root') ?>">
  49. <?php if (FreshRSS_Context::systemConf()->logo_html == '') { ?>
  50. <img class="logo" src="<?= _i('FreshRSS-logo', FreshRSS_Themes::ICON_URL) ?>" alt="FreshRSS" loading="lazy" />
  51. <?php
  52. } else {
  53. echo FreshRSS_Context::systemConf()->logo_html;
  54. }
  55. ?>
  56. </a>
  57. </div>
  58. <div class="item"></div>
  59. <?php if (FreshRSS_Auth::accessNeedsAction()): ?>
  60. <div class="item configure">
  61. <?php if (FreshRSS_Auth::hasAccess()): ?>
  62. <a class="signout" href="<?= Minz_Url::display(['c' => 'auth', 'a' => 'logout'], 'html', 'root') ?>">
  63. <?= _i('logout') ?><?= _t('gen.auth.logout') ?>
  64. (<?= htmlspecialchars(Minz_User::name() ?? '', ENT_NOQUOTES, 'UTF-8') ?>)
  65. </a>
  66. <?php else: ?>
  67. <a class="signin" href="<?= Minz_Url::display(['c' => 'auth', 'a' => 'login'], 'html', 'root') ?>">
  68. <?= _i('login') ?><?= _t('gen.auth.login') ?>
  69. </a>
  70. <?php endif; ?>
  71. </div>
  72. <?php endif; ?>
  73. </div>
  74. <?php $this->render(); ?>
  75. </div>
  76. <?php
  77. $msg = '';
  78. $status = 'closed';
  79. $notif = Minz_Request::getNotification();
  80. if (!empty($notif)) {
  81. $msg = $notif['content'];
  82. $status = $notif['type'];
  83. invalidateHttpCache();
  84. }
  85. ?>
  86. <div id="notification" class="notification <?= $status ?>">
  87. <span class="msg"><?= $msg ?></span>
  88. <a class="close" href=""><?= _i('close') ?></a>
  89. </div>
  90. </body>
  91. </html>