layout.public.php 4.4 KB

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