layout.phtml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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="width=device-width, initial-scale=1.0, viewport-fit=cover" />
  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. unset($url_rss['params']['rid']);
  38. if (FreshRSS_Context::$user_conf->since_hours_posts_per_rss) {
  39. $url_rss['params']['hours'] = FreshRSS_Context::$user_conf->since_hours_posts_per_rss;
  40. }
  41. ?>
  42. <link rel="alternate" type="application/rss+xml" title="<?= $this->rss_title ?>" href="<?= Minz_Url::display($url_rss) ?>" />
  43. <?php } if (FreshRSS_Context::isAll() || FreshRSS_Context::isCategory() || FreshRSS_Context::isFeed()) {
  44. $opml_rss = $url_base;
  45. $opml_rss['a'] = 'opml';
  46. unset($opml_rss['params']['rid']);
  47. ?>
  48. <link rel="outline" type="text/x-opml" title="OPML" href="<?= Minz_Url::display($opml_rss) ?>" />
  49. <?php } if (FreshRSS_Context::$system_conf->allow_robots) { ?>
  50. <meta name="description" content="<?= htmlspecialchars(FreshRSS_Context::$name . ' | ' . FreshRSS_Context::$description, ENT_COMPAT, 'UTF-8') ?>" />
  51. <?php } else { ?>
  52. <meta name="robots" content="noindex,nofollow" />
  53. <?php } ?>
  54. </head>
  55. <body class="<?= Minz_Request::actionName() ?>">
  56. <?php
  57. if (!Minz_Request::param('ajax')) {
  58. flush();
  59. $this->partial('header');
  60. }
  61. ?>
  62. <div id="global">
  63. <?php
  64. flush();
  65. if (isset($this->callbackBeforeFeeds)) {
  66. call_user_func($this->callbackBeforeFeeds, $this);
  67. }
  68. $this->render();
  69. ?>
  70. </div>
  71. <?php
  72. $msg = '';
  73. $status = 'closed';
  74. if (!empty($this->notification)) {
  75. $msg = $this->notification['content'];
  76. $status = $this->notification['type'];
  77. invalidateHttpCache();
  78. }
  79. ?>
  80. <div id="notification" class="notification <?= $status ?>">
  81. <span class="msg"><?= $msg ?></span>
  82. <a class="close" href=""><?= _i('close') ?></a>
  83. </div>
  84. </body>
  85. </html>