layout.public.php 3.7 KB

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