layout.public.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'] . ' - ' : '');
  14. p(!empty($_['application']) ? $_['application'] . ' - ' : '');
  15. p($theme->getTitle());
  16. ?>
  17. </title>
  18. <meta name="csp-nonce" nonce="<?php p($_['cspNonce']); /* Do not pass into "content" to prevent exfiltration */ ?>">
  19. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0<?php if (isset($_['viewport_maximum_scale'])) {
  20. p(', maximum-scale=' . $_['viewport_maximum_scale']);
  21. } ?>">
  22. <?php if ($theme->getiTunesAppId() !== '') { ?>
  23. <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
  24. <?php } ?>
  25. <meta name="apple-mobile-web-app-capable" content="yes">
  26. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  27. <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] !== 'files')? $_['application']:$theme->getTitle()); ?>">
  28. <meta name="mobile-web-app-capable" content="yes">
  29. <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
  30. <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
  31. <link rel="apple-touch-icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  32. <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  33. <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
  34. <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>" crossorigin="use-credentials">
  35. <?php emit_css_loading_tags($_); ?>
  36. <?php emit_script_loading_tags($_); ?>
  37. <?php print_unescaped($_['headers']); ?>
  38. </head>
  39. <body id="<?php p($_['bodyid']);?>">
  40. <?php include('layout.noscript.warning.php'); ?>
  41. <?php include('layout.initial-state.php'); ?>
  42. <div id="skip-actions">
  43. <?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 } ?>
  44. <?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 } ?>
  45. </div>
  46. <header id="header">
  47. <div class="header-start">
  48. <div id="nextcloud" class="header-appname">
  49. <?php if ($_['logoUrl']): ?>
  50. <a href="<?php print_unescaped($_['logoUrl']); ?>"
  51. aria-label="<?php p($l->t('Go to %s', [$_['logoUrl']])); ?>">
  52. <div class="logo logo-icon"></div>
  53. </a>
  54. <?php else: ?>
  55. <div class="logo logo-icon"></div>
  56. <?php endif; ?>
  57. <div class="header-info">
  58. <span class="header-title">
  59. <?php if (isset($template) && $template->getHeaderTitle() !== '') { ?>
  60. <?php p($template->getHeaderTitle()); ?>
  61. <?php } else { ?>
  62. <?php p($theme->getName()); ?>
  63. <?php } ?>
  64. </span>
  65. <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?>
  66. <span class="header-shared-by">
  67. <?php p($template->getHeaderDetails()); ?>
  68. </span>
  69. <?php } ?>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="header-end">
  74. <div id="public-page-menu"></div>
  75. </div>
  76. </header>
  77. <main id="content" class="app-<?php p($_['appid']) ?>">
  78. <h1 class="hidden-visually">
  79. <?php
  80. if (isset($template) && $template->getHeaderTitle() !== '') {
  81. p($template->getHeaderTitle());
  82. } else {
  83. p($theme->getName());
  84. } ?>
  85. </h1>
  86. <?php print_unescaped($_['content']); ?>
  87. </main>
  88. <?php if (isset($template) && $template->getFooterVisible() && ($theme->getLongFooter() !== '' || $_['showSimpleSignUpLink'])) { ?>
  89. <footer>
  90. <p><?php print_unescaped($theme->getLongFooter()); ?></p>
  91. <?php
  92. if ($_['showSimpleSignUpLink']) {
  93. ?>
  94. <p class="footer__simple-sign-up">
  95. <a href="<?php p($_['signUpLink']); ?>" target="_blank" rel="noreferrer noopener">
  96. <?php p($l->t('Get your own free account')); ?>
  97. </a>
  98. </p>
  99. <?php
  100. }
  101. ?>
  102. </footer>
  103. <?php } ?>
  104. </body>
  105. </html>