1
0

layout.public.php 3.9 KB

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