layout.public.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <!DOCTYPE html>
  2. <html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" >
  3. <head data-requesttoken="<?php p($_['requesttoken']); ?>">
  4. <meta charset="utf-8">
  5. <title>
  6. <?php
  7. p(!empty($_['application'])?$_['application'].' - ':'');
  8. p($theme->getTitle());
  9. ?>
  10. </title>
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  12. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  13. <?php if ($theme->getiTunesAppId() !== '') { ?>
  14. <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
  15. <?php } ?>
  16. <meta name="apple-mobile-web-app-capable" content="yes">
  17. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  18. <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!=='files')? $_['application']:$theme->getTitle()); ?>">
  19. <meta name="mobile-web-app-capable" content="yes">
  20. <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
  21. <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
  22. <link rel="apple-touch-icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  23. <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
  24. <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>">
  25. <?php emit_css_loading_tags($_); ?>
  26. <?php emit_script_loading_tags($_); ?>
  27. <?php print_unescaped($_['headers']); ?>
  28. </head>
  29. <body id="<?php p($_['bodyid']);?>">
  30. <?php include('layout.noscript.warning.php'); ?>
  31. <?php foreach ($_['initialStates'] as $app => $initialState) { ?>
  32. <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
  33. <?php }?>
  34. <div id="notification-container">
  35. <div id="notification"></div>
  36. </div>
  37. <header id="header">
  38. <div class="header-left">
  39. <span id="nextcloud">
  40. <div class="logo logo-icon svg"></div>
  41. <h1 class="header-appname">
  42. <?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>
  43. </h1>
  44. <div class="header-shared-by">
  45. <?php if (isset($template)) { p($template->getHeaderDetails()); } ?>
  46. </div>
  47. </span>
  48. </div>
  49. <?php
  50. /** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
  51. if(isset($template) && $template->getActionCount() !== 0) {
  52. $primary = $template->getPrimaryAction();
  53. $others = $template->getOtherActions();
  54. ?>
  55. <div class="header-right">
  56. <span id="header-primary-action" class="<?php if($template->getActionCount() === 1) { p($primary->getIcon()); } ?>">
  57. <a href="<?php p($primary->getLink()); ?>" class="primary button">
  58. <span><?php p($primary->getLabel()) ?></span>
  59. </a>
  60. </span>
  61. <?php if($template->getActionCount() > 1) { ?>
  62. <div id="header-secondary-action">
  63. <button id="header-actions-toggle" class="menutoggle icon-more-white"></button>
  64. <div id="header-actions-menu" class="popovermenu menu">
  65. <ul>
  66. <?php
  67. /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
  68. foreach($others as $action) {
  69. print_unescaped($action->render());
  70. }
  71. ?>
  72. </ul>
  73. </div>
  74. </div>
  75. <?php } ?>
  76. </div>
  77. <?php } ?>
  78. </header>
  79. <div id="content" class="app-<?php p($_['appid']) ?>" role="main">
  80. <?php print_unescaped($_['content']); ?>
  81. </div>
  82. <?php if(isset($template) && $template->getFooterVisible()) { ?>
  83. <footer>
  84. <p><?php print_unescaped($theme->getLongFooter()); ?></p>
  85. <?php
  86. if ($_['showSimpleSignUpLink']) {
  87. ?>
  88. <p>
  89. <a href="https://nextcloud.com/signup/" target="_blank" rel="noreferrer noopener">
  90. <?php p($l->t('Get your own free account')); ?>
  91. </a>
  92. </p>
  93. <?php
  94. }
  95. ?>
  96. </footer>
  97. <?php } ?>
  98. </body>
  99. </html>