layout.phtml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /** @var FreshRSS_View $this */
  3. FreshRSS::preLayout();
  4. ?>
  5. <!DOCTYPE html>
  6. <html lang="<?= FreshRSS_Context::$user_conf->language ?>" xml:lang="<?= FreshRSS_Context::$user_conf->language ?>"<?php
  7. if (_t('gen.dir') === 'rtl') {
  8. echo ' dir="rtl" class="rtl"';
  9. }
  10. ?>>
  11. <head>
  12. <meta charset="UTF-8" />
  13. <meta name="viewport" content="initial-scale=1.0" />
  14. <?= FreshRSS_View::headStyle() ?>
  15. <script id="jsonVars" type="application/json">
  16. <?php $this->renderHelper('javascript_vars'); ?>
  17. </script>
  18. <?= FreshRSS_View::headScript() ?>
  19. <link rel="manifest" href="<?= Minz_Url::display('/themes/manifest.json') ?>" />
  20. <link rel="shortcut icon" id="favicon" type="image/x-icon" sizes="16x16 64x64" href="<?= Minz_Url::display('/favicon.ico') ?>" />
  21. <link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="<?= Minz_Url::display('/themes/icons/favicon-256.png') ?>" />
  22. <link rel="apple-touch-icon" href="<?= Minz_Url::display('/themes/icons/apple-touch-icon.png') ?>" />
  23. <meta name="apple-mobile-web-app-capable" content="yes" />
  24. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  25. <meta name="apple-mobile-web-app-title" content="<?= FreshRSS_Context::$system_conf->title ?>">
  26. <meta name="msapplication-TileColor" content="#FFF" />
  27. <meta name="theme-color" content="#FFF" />
  28. <?php if (!FreshRSS_Context::$system_conf->allow_referrer) { ?>
  29. <meta name="referrer" content="never" />
  30. <?php } ?>
  31. <?= FreshRSS_View::headTitle() ?>
  32. <?php
  33. $url_base = Minz_Request::currentRequest();
  34. if (isset($this->rss_title)) {
  35. $url_rss = $url_base;
  36. $url_rss['a'] = 'rss';
  37. if (FreshRSS_Context::$user_conf->since_hours_posts_per_rss) {
  38. $url_rss['params']['hours'] = FreshRSS_Context::$user_conf->since_hours_posts_per_rss;
  39. }
  40. ?>
  41. <link rel="alternate" type="application/rss+xml" title="<?= $this->rss_title ?>" href="<?= Minz_Url::display($url_rss) ?>" />
  42. <?php } if (FreshRSS_Context::$system_conf->allow_robots) { ?>
  43. <meta name="description" content="<?= htmlspecialchars(FreshRSS_Context::$name . ' | ' . FreshRSS_Context::$description, ENT_COMPAT, 'UTF-8') ?>" />
  44. <?php } else { ?>
  45. <meta name="robots" content="noindex,nofollow" />
  46. <?php } ?>
  47. </head>
  48. <body class="<?= Minz_Request::actionName() ?>">
  49. <?php
  50. flush();
  51. $this->partial('header');
  52. ?>
  53. <div id="global">
  54. <?php
  55. flush();
  56. if (isset($this->callbackBeforeFeeds)) {
  57. call_user_func($this->callbackBeforeFeeds, $this);
  58. }
  59. $this->render();
  60. ?>
  61. </div>
  62. <?php
  63. $msg = '';
  64. $status = 'closed';
  65. if (isset($this->notification)) {
  66. $msg = $this->notification['content'];
  67. $status = $this->notification['type'];
  68. invalidateHttpCache();
  69. }
  70. ?>
  71. <div id="notification" class="notification <?= $status ?>">
  72. <span class="msg"><?= $msg ?></span>
  73. <a class="close" href=""><?= _i('close') ?></a>
  74. </div>
  75. <!-- Popup-->
  76. <div id="popup">
  77. <div id="popup-content">
  78. <div id="popup-close" class="popup-row">×</div>
  79. <div id="popup-txt" class="popup-row"></div>
  80. <div id="popup-iframe-container" class="popup-row">
  81. <div id="popup-iframe-sub">
  82. <iframe id="popup-iframe" frameborder="0"></iframe>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </body>
  88. </html>