1
0

layout.user.php 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2011-2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. /**
  8. * @var \OC_Defaults $theme
  9. * @var array $_
  10. */
  11. $getUserAvatar = static function (int $size) use ($_): string {
  12. return \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [
  13. 'userId' => $_['user_uid'],
  14. 'size' => $size,
  15. 'v' => $_['userAvatarVersion']
  16. ]);
  17. }
  18. ?><!DOCTYPE html>
  19. <html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" data-locale="<?php p($_['locale']); ?>" translate="no" >
  20. <head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>">
  21. <meta charset="utf-8">
  22. <title>
  23. <?php
  24. p(!empty($_['pageTitle']) && $_['pageTitle'] !== $_['application'] ? $_['pageTitle'].' - ' : '');
  25. p(!empty($_['application']) ? $_['application'].' - ' : '');
  26. p($theme->getTitle());
  27. ?>
  28. </title>
  29. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  30. <?php if ($theme->getiTunesAppId() !== '') { ?>
  31. <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
  32. <?php } ?>
  33. <meta name="apple-mobile-web-app-capable" content="yes">
  34. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  35. <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] != 'files')? $_['application']:$theme->getTitle()); ?>">
  36. <meta name="mobile-web-app-capable" content="yes">
  37. <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>">
  38. <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>">
  39. <link rel="apple-touch-icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  40. <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
  41. <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
  42. <link rel="manifest" href="<?php print_unescaped(image_path($_['appid'], 'manifest.json')); ?>" crossorigin="use-credentials">
  43. <?php emit_css_loading_tags($_); ?>
  44. <?php emit_script_loading_tags($_); ?>
  45. <?php print_unescaped($_['headers']); ?>
  46. </head>
  47. <body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) {
  48. p("data-theme-$themeId ");
  49. }?> data-themes=<?php p(join(',', $_['enabledThemes'])) ?>>
  50. <?php include 'layout.noscript.warning.php'; ?>
  51. <?php include 'layout.initial-state.php'; ?>
  52. <div id="skip-actions">
  53. <?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 } ?>
  54. <?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 } ?>
  55. </div>
  56. <header id="header">
  57. <div class="header-left">
  58. <a href="<?php print_unescaped($_['logoUrl'] ?: link_to('', 'index.php')); ?>"
  59. aria-label="<?php p($l->t('Go to %s', [$_['logoUrl'] ?: $_['defaultAppName']])); ?>"
  60. id="nextcloud">
  61. <div class="logo logo-icon"></div>
  62. </a>
  63. <nav id="header-left__appmenu"></nav>
  64. </div>
  65. <div class="header-right">
  66. <div id="unified-search"></div>
  67. <div id="notifications"></div>
  68. <div id="contactsmenu"></div>
  69. <div id="user-menu"></div>
  70. </div>
  71. </header>
  72. <main id="content" class="app-<?php p($_['appid']) ?>">
  73. <h1 class="hidden-visually" id="page-heading-level-1">
  74. <?php p((!empty($_['application']) && !empty($_['pageTitle']) && $_['application'] != $_['pageTitle'])
  75. ? $_['application'].': '.$_['pageTitle']
  76. : (!empty($_['pageTitle']) ? $_['pageTitle'] : $theme->getName())
  77. ); ?>
  78. </h1>
  79. <?php print_unescaped($_['content']); ?>
  80. </main>
  81. <div id="profiler-toolbar"></div>
  82. </body>
  83. </html>