layout.public.php 3.8 KB

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