4
0

simple.phtml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. <form id="post-csrf" method="post">
  61. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  62. </form>
  63. <?php if (FreshRSS_Auth::accessNeedsAction()): ?>
  64. <div class="item configure">
  65. <?php if (FreshRSS_Auth::hasAccess()): ?>
  66. <button class="as-link signout" form="post-csrf" formaction="<?=
  67. _url('auth', 'logout') ?>"><?= _t('gen.auth.logout'); ?><?= _i('logout') ?></button>
  68. <?php else: ?>
  69. <a class="signin" href="<?= Minz_Url::display(['c' => 'auth', 'a' => 'login'], 'html', 'root') ?>">
  70. <?= _i('login') ?><?= _t('gen.auth.login') ?>
  71. </a>
  72. <?php endif; ?>
  73. </div>
  74. <?php endif; ?>
  75. </div>
  76. <?php $this->render(); ?>
  77. </div>
  78. <?php
  79. $msg = '';
  80. $status = 'closed';
  81. $notif = Minz_Request::getNotification();
  82. if (!empty($notif)) {
  83. $msg = $notif['content'];
  84. $status = $notif['type'];
  85. invalidateHttpCache();
  86. }
  87. ?>
  88. <div id="notification" class="notification <?= $status ?>">
  89. <span class="msg"><?= $msg ?></span>
  90. <a class="close" href=""><?= _i('close') ?></a>
  91. </div>
  92. </body>
  93. </html>