layout.public.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
  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 name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  12. <?php if ($theme->getiTunesAppId() !== '') { ?>
  13. <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
  14. <?php } ?>
  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" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.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')); ?>" crossorigin="use-credentials">
  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="skip-actions">
  35. <?php if ($_['id-app-content'] !== null) { ?><a href="<?php p($_['id-app-content']); ?>" class="button primary skip-navigation skip-content"><?php p($l->t('Skip to main content')); ?></a><?php } ?>
  36. <?php if ($_['id-app-navigation'] !== null) { ?><a href="<?php p($_['id-app-navigation']); ?>" class="button primary skip-navigation"><?php p($l->t('Skip to navigation of app')); ?></a><?php } ?>
  37. </div>
  38. <header id="header">
  39. <div class="header-left">
  40. <div id="nextcloud" class="header-appname">
  41. <?php if ($_['logoUrl']): ?>
  42. <a href="<?php print_unescaped($_['logoUrl']); ?>"
  43. aria-label="<?php p($l->t('Go to %s', [$_['logoUrl']])); ?>">
  44. <div class="logo logo-icon"></div>
  45. </a>
  46. <?php else: ?>
  47. <div class="logo logo-icon"></div>
  48. <?php endif; ?>
  49. <div class="header-info">
  50. <span class="header-title">
  51. <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
  52. <?php p($template->getHeaderTitle()); ?>
  53. <?php } else { ?>
  54. <?php p($theme->getName()); ?>
  55. <?php } ?>
  56. </span>
  57. <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
  58. <span class="header-shared-by">
  59. <?php p($template->getHeaderDetails()); ?>
  60. </span>
  61. <?php } ?>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="header-right">
  66. <?php
  67. /** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
  68. if (isset($template) && $template->getActionCount() !== 0) {
  69. $primary = $template->getPrimaryAction();
  70. $others = $template->getOtherActions(); ?>
  71. <span id="header-primary-action" class="<?php if ($template->getActionCount() === 1) {
  72. p($primary->getIcon());
  73. } ?>">
  74. <a href="<?php p($primary->getLink()); ?>" class="primary button">
  75. <span><?php p($primary->getLabel()) ?></span>
  76. </a>
  77. </span>
  78. <?php if ($template->getActionCount() > 1) { ?>
  79. <div id="header-secondary-action">
  80. <button id="header-actions-toggle" class="menutoggle icon-more-white"></button>
  81. <div id="header-actions-menu" class="popovermenu menu">
  82. <ul>
  83. <?php
  84. /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
  85. foreach ($others as $action) {
  86. print_unescaped($action->render());
  87. }
  88. ?>
  89. </ul>
  90. </div>
  91. </div>
  92. <?php } ?>
  93. <?php
  94. } ?>
  95. </div>
  96. </header>
  97. <main id="content" class="app-<?php p($_['appid']) ?>">
  98. <h1 class="hidden-visually">
  99. <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
  100. <?php p($template->getHeaderTitle()); ?>
  101. <?php } else { ?>
  102. <?php p($theme->getName()); ?>
  103. <?php } ?>
  104. </h1>
  105. <?php print_unescaped($_['content']); ?>
  106. </main>
  107. <?php if (isset($template) && $template->getFooterVisible() && ($theme->getLongFooter() !== '' || $_['showSimpleSignUpLink'])) { ?>
  108. <footer>
  109. <p><?php print_unescaped($theme->getLongFooter()); ?></p>
  110. <?php
  111. if ($_['showSimpleSignUpLink']) {
  112. ?>
  113. <p>
  114. <a href="<?php p($_['signUpLink']); ?>" target="_blank" rel="noreferrer noopener">
  115. <?php p($l->t('Get your own free account')); ?>
  116. </a>
  117. </p>
  118. <?php
  119. }
  120. ?>
  121. </footer>
  122. <?php } ?>
  123. </body>
  124. </html>