layout.user.php 4.5 KB

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