layout.user.php 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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')); ?>">
  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="global-search"></div>
  64. <div id="unified-search"></div>
  65. <div id="notifications"></div>
  66. <div id="contactsmenu"></div>
  67. <div id="user-menu"></div>
  68. </div>
  69. </header>
  70. <div id="sudo-login-background" class="hidden"></div>
  71. <form id="sudo-login-form" class="hidden" method="POST">
  72. <label>
  73. <?php p($l->t('This action requires you to confirm your password')); ?><br/>
  74. <input type="password" class="question" autocomplete="new-password" name="question" value=" <?php /* Hack against browsers ignoring autocomplete="off" */ ?>"
  75. placeholder="<?php p($l->t('Confirm your password')); ?>" />
  76. </label>
  77. <input class="confirm" value="<?php p($l->t('Confirm')); ?>" type="submit">
  78. </form>
  79. <main id="content" class="app-<?php p($_['appid']) ?>">
  80. <h1 class="hidden-visually" id="page-heading-level-1">
  81. <?php p(!empty($_['pageTitle'])?$_['pageTitle']:$theme->getName()); ?>
  82. </h1>
  83. <?php print_unescaped($_['content']); ?>
  84. </main>
  85. <div id="profiler-toolbar"></div>
  86. </body>
  87. </html>