simple.phtml 3.5 KB

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