You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

layout.public.php 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. ?>
  7. <!DOCTYPE html>
  8. <html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
  9. <head data-requesttoken="<?php p($_['requesttoken']); ?>">
  10. <meta charset="utf-8">
  11. <title>
  12. <?php
  13. p(!empty($_['application']) ? $_['application'].' - ' : '');
  14. p($theme->getTitle());
  15. ?>
  16. </title>
  17. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  18. <?php if ($theme->getiTunesAppId() !== '') { ?>
  19. <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
  20. <?php } ?>
  21. <meta name="apple-mobile-web-app-capable" content="yes">
  22. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  23. <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] !== 'files')? $_['application']:$theme->getTitle()); ?>">
  24. <meta name="mobile-web-app-capable" content="yes">
  25. <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
  26. <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
  27. <link rel="apple-touch-icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  28. <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  29. <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
  30. <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>" crossorigin="use-credentials">
  31. <?php emit_css_loading_tags($_); ?>
  32. <?php emit_script_loading_tags($_); ?>
  33. <?php print_unescaped($_['headers']); ?>
  34. </head>
  35. <body id="<?php p($_['bodyid']);?>">
  36. <?php include('layout.noscript.warning.php'); ?>
  37. <?php foreach ($_['initialStates'] as $app => $initialState) { ?>
  38. <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
  39. <?php }?>
  40. <div id="skip-actions">
  41. <?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 } ?>
  42. <?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 } ?>
  43. </div>
  44. <header id="header">
  45. <div class="header-left">
  46. <div id="nextcloud" class="header-appname">
  47. <?php if ($_['logoUrl']): ?>
  48. <a href="<?php print_unescaped($_['logoUrl']); ?>"
  49. aria-label="<?php p($l->t('Go to %s', [$_['logoUrl']])); ?>">
  50. <div class="logo logo-icon"></div>
  51. </a>
  52. <?php else: ?>
  53. <div class="logo logo-icon"></div>
  54. <?php endif; ?>
  55. <div class="header-info">
  56. <span class="header-title">
  57. <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
  58. <?php p($template->getHeaderTitle()); ?>
  59. <?php } else { ?>
  60. <?php p($theme->getName()); ?>
  61. <?php } ?>
  62. </span>
  63. <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
  64. <span class="header-shared-by">
  65. <?php p($template->getHeaderDetails()); ?>
  66. </span>
  67. <?php } ?>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="header-right">
  72. <?php
  73. /** @var \OCP\AppFramework\Http\Template\PublicTemplateResponse $template */
  74. if (isset($template) && $template->getActionCount() !== 0) {
  75. $primary = $template->getPrimaryAction();
  76. $others = $template->getOtherActions(); ?>
  77. <span id="header-primary-action" class="<?php if ($template->getActionCount() === 1) {
  78. p($primary->getIcon());
  79. } ?>">
  80. <a href="<?php p($primary->getLink()); ?>" class="primary button">
  81. <span><?php p($primary->getLabel()) ?></span>
  82. </a>
  83. </span>
  84. <?php if ($template->getActionCount() > 1) { ?>
  85. <div id="header-secondary-action">
  86. <button id="header-actions-toggle" class="menutoggle icon-more-white"></button>
  87. <div id="header-actions-menu" class="popovermenu menu">
  88. <ul>
  89. <?php
  90. /** @var \OCP\AppFramework\Http\Template\IMenuAction $action */
  91. foreach ($others as $action) {
  92. print_unescaped($action->render());
  93. }
  94. ?>
  95. </ul>
  96. </div>
  97. </div>
  98. <?php } ?>
  99. <?php
  100. } ?>
  101. </div>
  102. </header>
  103. <main id="content" class="app-<?php p($_['appid']) ?>">
  104. <h1 class="hidden-visually">
  105. <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
  106. <?php p($template->getHeaderTitle()); ?>
  107. <?php } else { ?>
  108. <?php p($theme->getName()); ?>
  109. <?php } ?>
  110. </h1>
  111. <?php print_unescaped($_['content']); ?>
  112. </main>
  113. <?php if (isset($template) && $template->getFooterVisible() && ($theme->getLongFooter() !== '' || $_['showSimpleSignUpLink'])) { ?>
  114. <footer>
  115. <p><?php print_unescaped($theme->getLongFooter()); ?></p>
  116. <?php
  117. if ($_['showSimpleSignUpLink']) {
  118. ?>
  119. <p>
  120. <a href="<?php p($_['signUpLink']); ?>" target="_blank" rel="noreferrer noopener">
  121. <?php p($l->t('Get your own free account')); ?>
  122. </a>
  123. </p>
  124. <?php
  125. }
  126. ?>
  127. </footer>
  128. <?php } ?>
  129. </body>
  130. </html>