layout.public.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. <div id="notification-container">
  31. <div id="notification"></div>
  32. </div>
  33. <header id="header">
  34. <div class="header-left">
  35. <span id="nextcloud">
  36. <div class="logo logo-icon svg"></div>
  37. <h1 class="header-appname">
  38. <?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>
  39. </h1>
  40. <div class="header-shared-by">
  41. <?php if (isset($template)) { p($template->getHeaderDetails()); } ?>
  42. </div>
  43. </span>
  44. </div>
  45. <?php
  46. /** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
  47. if(isset($template) && $template->getActionCount() !== 0) {
  48. $primary = $template->getPrimaryAction();
  49. $others = $template->getOtherActions();
  50. ?>
  51. <div class="header-right">
  52. <span id="header-primary-action" class="<?php if($template->getActionCount() === 1) { p($primary->getIcon()); } ?>">
  53. <a href="<?php p($primary->getLink()); ?>" class="primary button">
  54. <span><?php p($primary->getLabel()) ?></span>
  55. </a>
  56. </span>
  57. <?php if($template->getActionCount() > 1) { ?>
  58. <div id="header-secondary-action">
  59. <span id="header-actions-toggle" class="menutoggle icon-more-white"></span>
  60. <div id="header-actions-menu" class="popovermenu menu">
  61. <ul>
  62. <?php
  63. /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
  64. foreach($others as $action) {
  65. print_unescaped($action->render());
  66. }
  67. ?>
  68. </ul>
  69. </div>
  70. </div>
  71. <?php } ?>
  72. </div>
  73. <?php } ?>
  74. </header>
  75. <div id="content" class="app-<?php p($_['appid']) ?>" role="main">
  76. <?php print_unescaped($_['content']); ?>
  77. </div>
  78. <?php if(isset($template) && $template->getFooterVisible()) { ?>
  79. <footer>
  80. <p><?php print_unescaped($theme->getLongFooter()); ?></p>
  81. <?php
  82. if ($_['showSimpleSignUpLink']) {
  83. ?>
  84. <p>
  85. <a href="https://nextcloud.com/signup/" target="_blank" rel="noreferrer noopener">
  86. <?php p($l->t('Get your own free account')); ?>
  87. </a>
  88. </p>
  89. <?php
  90. }
  91. ?>
  92. </footer>
  93. <?php } ?>
  94. </body>
  95. </html>