layout.phtml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 ($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. if (!Minz_Request::param('ajax')) {
  51. flush();
  52. $this->partial('header');
  53. }
  54. ?>
  55. <div id="global">
  56. <?php
  57. flush();
  58. if (isset($this->callbackBeforeFeeds)) {
  59. call_user_func($this->callbackBeforeFeeds, $this);
  60. }
  61. $this->render();
  62. ?>
  63. </div>
  64. <?php
  65. $msg = '';
  66. $status = 'closed';
  67. if (isset($this->notification)) {
  68. $msg = $this->notification['content'];
  69. $status = $this->notification['type'];
  70. invalidateHttpCache();
  71. }
  72. ?>
  73. <div id="notification" class="notification <?= $status ?>">
  74. <span class="msg"><?= $msg ?></span>
  75. <a class="close" href=""><?= _i('close') ?></a>
  76. </div>
  77. </body>
  78. </html>