@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | <link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>"> |
| 14 | 14 | <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>"> |
| 15 | 15 | <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>"> |
| 16 | - <?php foreach($_['cssfiles'] as $cssfile): ?> |
|
| 16 | + <?php foreach ($_['cssfiles'] as $cssfile): ?> |
|
| 17 | 17 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>"> |
| 18 | 18 | <?php endforeach; ?> |
| 19 | - <?php foreach($_['printcssfiles'] as $cssfile): ?> |
|
| 19 | + <?php foreach ($_['printcssfiles'] as $cssfile): ?> |
|
| 20 | 20 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print"> |
| 21 | 21 | <?php endforeach; ?> |
| 22 | 22 | <?php if (isset($_['inline_ocjs'])): ?> |
@@ -24,16 +24,16 @@ discard block |
||
| 24 | 24 | <?php print_unescaped($_['inline_ocjs']); ?> |
| 25 | 25 | </script> |
| 26 | 26 | <?php endif; ?> |
| 27 | - <?php foreach($_['jsfiles'] as $jsfile): ?> |
|
| 27 | + <?php foreach ($_['jsfiles'] as $jsfile): ?> |
|
| 28 | 28 | <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script> |
| 29 | 29 | <?php endforeach; ?> |
| 30 | 30 | <?php print_unescaped($_['headers']); ?> |
| 31 | 31 | </head> |
| 32 | - <body id="<?php p($_['bodyid']);?>"> |
|
| 32 | + <body id="<?php p($_['bodyid']); ?>"> |
|
| 33 | 33 | <?php include('layout.noscript.warning.php'); ?> |
| 34 | 34 | <div class="wrapper"> |
| 35 | 35 | <div class="v-align"> |
| 36 | - <?php if ($_['bodyid'] === 'body-login' ): ?> |
|
| 36 | + <?php if ($_['bodyid'] === 'body-login'): ?> |
|
| 37 | 37 | <header role="banner"> |
| 38 | 38 | <div id="header"> |
| 39 | 39 | <div class="logo"> |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | <tr><td> |
| 3 | 3 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
| 4 | 4 | <tr> |
| 5 | -<td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> |
|
| 5 | +<td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>"> |
|
| 6 | 6 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
| 7 | 7 | </td> |
| 8 | 8 | </tr> |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;"> |
| 13 | 13 | <?php |
| 14 | 14 | print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link']))); |
| 15 | -if ( isset($_['expiration']) ) { |
|
| 15 | +if (isset($_['expiration'])) { |
|
| 16 | 16 | p($l->t("The share will expire on %s.", array($_['expiration']))); |
| 17 | 17 | print_unescaped('<br><br>'); |
| 18 | 18 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
| 28 | 28 | <?php p($theme->getName()); ?> - |
| 29 | 29 | <?php p($theme->getSlogan()); ?> |
| 30 | -<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
| 30 | +<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
| 31 | 31 | </td> |
| 32 | 32 | </tr> |
| 33 | 33 | <tr> |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | <meta charset="utf-8"> |
| 5 | 5 | <title> |
| 6 | 6 | <?php |
| 7 | - p(!empty($_['application'])?$_['application'].' - ':''); |
|
| 7 | + p(!empty($_['application']) ? $_['application'].' - ' : ''); |
|
| 8 | 8 | p($theme->getTitle()); |
| 9 | 9 | ?> |
| 10 | 10 | </title> |
@@ -14,16 +14,16 @@ discard block |
||
| 14 | 14 | <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>"> |
| 15 | 15 | <meta name="apple-mobile-web-app-capable" content="yes"> |
| 16 | 16 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
| 17 | - <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:$theme->getTitle()); ?>"> |
|
| 17 | + <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] != 'files') ? $_['application'] : $theme->getTitle()); ?>"> |
|
| 18 | 18 | <meta name="mobile-web-app-capable" content="yes"> |
| 19 | 19 | <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> |
| 20 | 20 | <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>"> |
| 21 | 21 | <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>"> |
| 22 | 22 | <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>"> |
| 23 | - <?php foreach($_['cssfiles'] as $cssfile): ?> |
|
| 23 | + <?php foreach ($_['cssfiles'] as $cssfile): ?> |
|
| 24 | 24 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>"> |
| 25 | 25 | <?php endforeach; ?> |
| 26 | - <?php foreach($_['printcssfiles'] as $cssfile): ?> |
|
| 26 | + <?php foreach ($_['printcssfiles'] as $cssfile): ?> |
|
| 27 | 27 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print"> |
| 28 | 28 | <?php endforeach; ?> |
| 29 | 29 | <?php if (isset($_['inline_ocjs'])): ?> |
@@ -31,12 +31,12 @@ discard block |
||
| 31 | 31 | <?php print_unescaped($_['inline_ocjs']); ?> |
| 32 | 32 | </script> |
| 33 | 33 | <?php endif; ?> |
| 34 | - <?php foreach($_['jsfiles'] as $jsfile): ?> |
|
| 34 | + <?php foreach ($_['jsfiles'] as $jsfile): ?> |
|
| 35 | 35 | <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script> |
| 36 | 36 | <?php endforeach; ?> |
| 37 | 37 | <?php print_unescaped($_['headers']); ?> |
| 38 | 38 | </head> |
| 39 | - <body id="<?php p($_['bodyid']);?>"> |
|
| 39 | + <body id="<?php p($_['bodyid']); ?>"> |
|
| 40 | 40 | <?php include('layout.noscript.warning.php'); ?> |
| 41 | 41 | <div id="notification-container"> |
| 42 | 42 | <div id="notification"></div> |
@@ -54,18 +54,18 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | <a href="#" class="header-appname-container menutoggle" tabindex="2"> |
| 56 | 56 | <h1 class="header-appname"> |
| 57 | - <?php p(!empty($_['application'])?$_['application']: $l->t('Apps')); ?> |
|
| 57 | + <?php p(!empty($_['application']) ? $_['application'] : $l->t('Apps')); ?> |
|
| 58 | 58 | </h1> |
| 59 | 59 | <div class="icon-caret"></div> |
| 60 | 60 | </a> |
| 61 | 61 | |
| 62 | 62 | <div id="appmenu"> |
| 63 | 63 | <ul> |
| 64 | - <?php foreach($_['headernavigation'] as $entry): ?> |
|
| 64 | + <?php foreach ($_['headernavigation'] as $entry): ?> |
|
| 65 | 65 | <li data-id="<?php p($entry['id']); ?>"> |
| 66 | 66 | <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3" |
| 67 | - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> |
|
| 68 | - <img src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon" /> |
|
| 67 | + <?php if ($entry['active']): ?> class="active"<?php endif; ?>> |
|
| 68 | + <img src="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>" class="app-icon" /> |
|
| 69 | 69 | <div class="icon-loading-dark" style="display:none;"></div> |
| 70 | 70 | <span> |
| 71 | 71 | <?php p($entry['name']); ?> |
@@ -85,17 +85,17 @@ discard block |
||
| 85 | 85 | <nav role="navigation"><div id="navigation"> |
| 86 | 86 | <div id="apps"> |
| 87 | 87 | <ul> |
| 88 | - <?php foreach($_['navigation'] as $entry): ?> |
|
| 89 | - <?php if($entry['showInHeader']): ?> |
|
| 88 | + <?php foreach ($_['navigation'] as $entry): ?> |
|
| 89 | + <?php if ($entry['showInHeader']): ?> |
|
| 90 | 90 | <li data-id="<?php p($entry['id']); ?>" class="in-header"> |
| 91 | 91 | <?php else: ?> |
| 92 | 92 | <li data-id="<?php p($entry['id']); ?>"> |
| 93 | 93 | <?php endif; ?> |
| 94 | 94 | <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3" |
| 95 | - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> |
|
| 95 | + <?php if ($entry['active']): ?> class="active"<?php endif; ?>> |
|
| 96 | 96 | <svg width="32" height="32" viewBox="0 0 32 32"> |
| 97 | 97 | <defs><filter id="invert-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs> |
| 98 | - <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image> |
|
| 98 | + <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>" class="app-icon"></image> |
|
| 99 | 99 | </svg> |
| 100 | 100 | <div class="icon-loading-dark" style="display:none;"></div> |
| 101 | 101 | <span> |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | <div id="header-right"> |
| 114 | 114 | <form class="searchbox" action="#" method="post" role="search" novalidate> |
| 115 | 115 | <label for="searchbox" class="hidden-visually"> |
| 116 | - <?php p($l->t('Search'));?> |
|
| 116 | + <?php p($l->t('Search')); ?> |
|
| 117 | 117 | </label> |
| 118 | 118 | <input id="searchbox" type="search" name="query" |
| 119 | 119 | value="" required |
@@ -125,8 +125,8 @@ discard block |
||
| 125 | 125 | <div class="avatardiv<?php if ($_['userAvatarSet']) { print_unescaped(' avatardiv-shown'); } else { print_unescaped('" style="display: none'); } ?>"> |
| 126 | 126 | <?php if ($_['userAvatarSet']): ?> |
| 127 | 127 | <img alt="" width="32" height="32" |
| 128 | - src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']]));?>" |
|
| 129 | - srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']]));?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']]));?> 4x" |
|
| 128 | + src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']])); ?>" |
|
| 129 | + srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']])); ?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']])); ?> 4x" |
|
| 130 | 130 | > |
| 131 | 131 | <?php endif; ?> |
| 132 | 132 | </div> |
@@ -134,11 +134,11 @@ discard block |
||
| 134 | 134 | </div> |
| 135 | 135 | <div id="expanddiv"> |
| 136 | 136 | <ul> |
| 137 | - <?php foreach($_['settingsnavigation'] as $entry):?> |
|
| 137 | + <?php foreach ($_['settingsnavigation'] as $entry):?> |
|
| 138 | 138 | <li> |
| 139 | 139 | <a href="<?php print_unescaped($entry['href']); ?>" |
| 140 | - <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>> |
|
| 141 | - <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>"> |
|
| 140 | + <?php if ($entry["active"]): ?> class="active"<?php endif; ?>> |
|
| 141 | + <img alt="" src="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>"> |
|
| 142 | 142 | <?php p($entry['name']) ?> |
| 143 | 143 | </a> |
| 144 | 144 | </li> |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | <tr><td> |
| 3 | 3 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
| 4 | 4 | <tr> |
| 5 | - <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>" bordercolor="<?php p($theme->getColorPrimary());?>" border> |
|
| 5 | + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>" bordercolor="<?php p($theme->getColorPrimary()); ?>" border> |
|
| 6 | 6 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
| 7 | 7 | </td> |
| 8 | 8 | </tr> |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
| 25 | 25 | <?php p($theme->getName()); ?> - |
| 26 | 26 | <?php p($theme->getSlogan()); ?> |
| 27 | - <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
| 27 | + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
| 28 | 28 | </td> |
| 29 | 29 | </tr> |
| 30 | 30 | <tr> |
@@ -20,135 +20,135 @@ |
||
| 20 | 20 | |
| 21 | 21 | class OC_Theme { |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Returns the base URL |
|
| 25 | - * @return string URL |
|
| 26 | - */ |
|
| 27 | - public function getBaseUrl() { |
|
| 28 | - return 'https://nextcloud.com'; |
|
| 29 | - } |
|
| 30 | - |
|
| 31 | - /** |
|
| 32 | - * Returns the URL where the sync clients are listed |
|
| 33 | - * @return string URL |
|
| 34 | - */ |
|
| 35 | - public function getSyncClientUrl() { |
|
| 36 | - return 'https://nextcloud.com/install/#install-clients'; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - /** |
|
| 40 | - * Returns the URL to the App Store for the iOS Client |
|
| 41 | - * @return string URL |
|
| 42 | - */ |
|
| 43 | - public function getiOSClientUrl() { |
|
| 44 | - return 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
| 45 | - } |
|
| 46 | - |
|
| 47 | - /** |
|
| 48 | - * Returns the AppId for the App Store for the iOS Client |
|
| 49 | - * @return string AppId |
|
| 50 | - */ |
|
| 51 | - public function getiTunesAppId() { |
|
| 52 | - return '1125420102'; |
|
| 53 | - } |
|
| 54 | - |
|
| 55 | - /** |
|
| 56 | - * Returns the URL to Google Play for the Android Client |
|
| 57 | - * @return string URL |
|
| 58 | - */ |
|
| 59 | - public function getAndroidClientUrl() { |
|
| 60 | - return 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
| 61 | - } |
|
| 62 | - |
|
| 63 | - /** |
|
| 64 | - * Returns the documentation URL |
|
| 65 | - * @return string URL |
|
| 66 | - */ |
|
| 67 | - public function getDocBaseUrl() { |
|
| 68 | - return 'https://docs.nextcloud.com'; |
|
| 69 | - } |
|
| 70 | - |
|
| 71 | - /** |
|
| 72 | - * Returns the title |
|
| 73 | - * @return string title |
|
| 74 | - */ |
|
| 75 | - public function getTitle() { |
|
| 76 | - return 'Custom Cloud'; |
|
| 77 | - } |
|
| 78 | - |
|
| 79 | - /** |
|
| 80 | - * Returns the short name of the software |
|
| 81 | - * @return string title |
|
| 82 | - */ |
|
| 83 | - public function getName() { |
|
| 84 | - return 'Custom Cloud'; |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * Returns the short name of the software containing HTML strings |
|
| 89 | - * @return string title |
|
| 90 | - */ |
|
| 91 | - public function getHTMLName() { |
|
| 92 | - return 'Custom Cloud'; |
|
| 93 | - } |
|
| 94 | - |
|
| 95 | - /** |
|
| 96 | - * Returns entity (e.g. company name) - used for footer, copyright |
|
| 97 | - * @return string entity name |
|
| 98 | - */ |
|
| 99 | - public function getEntity() { |
|
| 100 | - return 'Custom Cloud Co.'; |
|
| 101 | - } |
|
| 102 | - |
|
| 103 | - /** |
|
| 104 | - * Returns slogan |
|
| 105 | - * @return string slogan |
|
| 106 | - */ |
|
| 107 | - public function getSlogan() { |
|
| 108 | - return 'Your custom cloud, personalized for you!'; |
|
| 109 | - } |
|
| 110 | - |
|
| 111 | - /** |
|
| 112 | - * Returns logo claim |
|
| 113 | - * @return string logo claim |
|
| 114 | - */ |
|
| 115 | - public function getLogoClaim() { |
|
| 116 | - return ''; |
|
| 117 | - } |
|
| 118 | - |
|
| 119 | - /** |
|
| 120 | - * Returns short version of the footer |
|
| 121 | - * @return string short footer |
|
| 122 | - */ |
|
| 123 | - public function getShortFooter() { |
|
| 124 | - $footer = '© 2016 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 125 | - '<br/>' . $this->getSlogan(); |
|
| 126 | - |
|
| 127 | - return $footer; |
|
| 128 | - } |
|
| 129 | - |
|
| 130 | - /** |
|
| 131 | - * Returns long version of the footer |
|
| 132 | - * @return string long footer |
|
| 133 | - */ |
|
| 134 | - public function getLongFooter() { |
|
| 135 | - $footer = '© 2016 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 136 | - '<br/>' . $this->getSlogan(); |
|
| 137 | - |
|
| 138 | - return $footer; |
|
| 139 | - } |
|
| 140 | - |
|
| 141 | - public function buildDocLinkToKey($key) { |
|
| 142 | - return $this->getDocBaseUrl() . '/server/11/go.php?to=' . $key; |
|
| 143 | - } |
|
| 144 | - |
|
| 145 | - |
|
| 146 | - /** |
|
| 147 | - * Returns mail header color |
|
| 148 | - * @return string |
|
| 149 | - */ |
|
| 150 | - public function getColorPrimary() { |
|
| 151 | - return '#745bca'; |
|
| 152 | - } |
|
| 23 | + /** |
|
| 24 | + * Returns the base URL |
|
| 25 | + * @return string URL |
|
| 26 | + */ |
|
| 27 | + public function getBaseUrl() { |
|
| 28 | + return 'https://nextcloud.com'; |
|
| 29 | + } |
|
| 30 | + |
|
| 31 | + /** |
|
| 32 | + * Returns the URL where the sync clients are listed |
|
| 33 | + * @return string URL |
|
| 34 | + */ |
|
| 35 | + public function getSyncClientUrl() { |
|
| 36 | + return 'https://nextcloud.com/install/#install-clients'; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + /** |
|
| 40 | + * Returns the URL to the App Store for the iOS Client |
|
| 41 | + * @return string URL |
|
| 42 | + */ |
|
| 43 | + public function getiOSClientUrl() { |
|
| 44 | + return 'https://itunes.apple.com/us/app/nextcloud/id1125420102?mt=8'; |
|
| 45 | + } |
|
| 46 | + |
|
| 47 | + /** |
|
| 48 | + * Returns the AppId for the App Store for the iOS Client |
|
| 49 | + * @return string AppId |
|
| 50 | + */ |
|
| 51 | + public function getiTunesAppId() { |
|
| 52 | + return '1125420102'; |
|
| 53 | + } |
|
| 54 | + |
|
| 55 | + /** |
|
| 56 | + * Returns the URL to Google Play for the Android Client |
|
| 57 | + * @return string URL |
|
| 58 | + */ |
|
| 59 | + public function getAndroidClientUrl() { |
|
| 60 | + return 'https://play.google.com/store/apps/details?id=com.nextcloud.client'; |
|
| 61 | + } |
|
| 62 | + |
|
| 63 | + /** |
|
| 64 | + * Returns the documentation URL |
|
| 65 | + * @return string URL |
|
| 66 | + */ |
|
| 67 | + public function getDocBaseUrl() { |
|
| 68 | + return 'https://docs.nextcloud.com'; |
|
| 69 | + } |
|
| 70 | + |
|
| 71 | + /** |
|
| 72 | + * Returns the title |
|
| 73 | + * @return string title |
|
| 74 | + */ |
|
| 75 | + public function getTitle() { |
|
| 76 | + return 'Custom Cloud'; |
|
| 77 | + } |
|
| 78 | + |
|
| 79 | + /** |
|
| 80 | + * Returns the short name of the software |
|
| 81 | + * @return string title |
|
| 82 | + */ |
|
| 83 | + public function getName() { |
|
| 84 | + return 'Custom Cloud'; |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * Returns the short name of the software containing HTML strings |
|
| 89 | + * @return string title |
|
| 90 | + */ |
|
| 91 | + public function getHTMLName() { |
|
| 92 | + return 'Custom Cloud'; |
|
| 93 | + } |
|
| 94 | + |
|
| 95 | + /** |
|
| 96 | + * Returns entity (e.g. company name) - used for footer, copyright |
|
| 97 | + * @return string entity name |
|
| 98 | + */ |
|
| 99 | + public function getEntity() { |
|
| 100 | + return 'Custom Cloud Co.'; |
|
| 101 | + } |
|
| 102 | + |
|
| 103 | + /** |
|
| 104 | + * Returns slogan |
|
| 105 | + * @return string slogan |
|
| 106 | + */ |
|
| 107 | + public function getSlogan() { |
|
| 108 | + return 'Your custom cloud, personalized for you!'; |
|
| 109 | + } |
|
| 110 | + |
|
| 111 | + /** |
|
| 112 | + * Returns logo claim |
|
| 113 | + * @return string logo claim |
|
| 114 | + */ |
|
| 115 | + public function getLogoClaim() { |
|
| 116 | + return ''; |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + /** |
|
| 120 | + * Returns short version of the footer |
|
| 121 | + * @return string short footer |
|
| 122 | + */ |
|
| 123 | + public function getShortFooter() { |
|
| 124 | + $footer = '© 2016 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 125 | + '<br/>' . $this->getSlogan(); |
|
| 126 | + |
|
| 127 | + return $footer; |
|
| 128 | + } |
|
| 129 | + |
|
| 130 | + /** |
|
| 131 | + * Returns long version of the footer |
|
| 132 | + * @return string long footer |
|
| 133 | + */ |
|
| 134 | + public function getLongFooter() { |
|
| 135 | + $footer = '© 2016 <a href="'.$this->getBaseUrl().'" target="_blank\">'.$this->getEntity().'</a>'. |
|
| 136 | + '<br/>' . $this->getSlogan(); |
|
| 137 | + |
|
| 138 | + return $footer; |
|
| 139 | + } |
|
| 140 | + |
|
| 141 | + public function buildDocLinkToKey($key) { |
|
| 142 | + return $this->getDocBaseUrl() . '/server/11/go.php?to=' . $key; |
|
| 143 | + } |
|
| 144 | + |
|
| 145 | + |
|
| 146 | + /** |
|
| 147 | + * Returns mail header color |
|
| 148 | + * @return string |
|
| 149 | + */ |
|
| 150 | + public function getColorPrimary() { |
|
| 151 | + return '#745bca'; |
|
| 152 | + } |
|
| 153 | 153 | |
| 154 | 154 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $isIE8 = false; |
| 36 | 36 | preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); |
| 37 | 37 | if (count($matches) > 0 && $matches[1] <= 9) { |
| 38 | - $isIE8 = true; |
|
| 38 | + $isIE8 = true; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $cloudID = \OC::$server->getUserSession()->getUser()->getCloudId(); |
@@ -45,15 +45,15 @@ discard block |
||
| 45 | 45 | $color = $theme->getColorPrimary(); |
| 46 | 46 | $textColor = "#ffffff"; |
| 47 | 47 | if(\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
| 48 | - $logoPath = $theme->getLogo(); |
|
| 49 | - try { |
|
| 50 | - $util = \OC::$server->query("\OCA\Theming\Util"); |
|
| 51 | - if($util->invertTextColor($color)) { |
|
| 52 | - $textColor = "#000000"; |
|
| 53 | - } |
|
| 54 | - } catch (OCP\AppFramework\QueryException $e) { |
|
| 48 | + $logoPath = $theme->getLogo(); |
|
| 49 | + try { |
|
| 50 | + $util = \OC::$server->query("\OCA\Theming\Util"); |
|
| 51 | + if($util->invertTextColor($color)) { |
|
| 52 | + $textColor = "#000000"; |
|
| 53 | + } |
|
| 54 | + } catch (OCP\AppFramework\QueryException $e) { |
|
| 55 | 55 | |
| 56 | - } |
|
| 56 | + } |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
@@ -39,16 +39,16 @@ |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $cloudID = \OC::$server->getUserSession()->getUser()->getCloudId(); |
| 42 | -$url = 'https://nextcloud.com/federation#' . $cloudID; |
|
| 42 | +$url = 'https://nextcloud.com/federation#'.$cloudID; |
|
| 43 | 43 | $logoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg'); |
| 44 | 44 | $theme = \OC::$server->getThemingDefaults(); |
| 45 | 45 | $color = $theme->getColorPrimary(); |
| 46 | 46 | $textColor = "#ffffff"; |
| 47 | -if(\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
|
| 47 | +if (\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
|
| 48 | 48 | $logoPath = $theme->getLogo(); |
| 49 | 49 | try { |
| 50 | 50 | $util = \OC::$server->query("\OCA\Theming\Util"); |
| 51 | - if($util->invertTextColor($color)) { |
|
| 51 | + if ($util->invertTextColor($color)) { |
|
| 52 | 52 | $textColor = "#000000"; |
| 53 | 53 | } |
| 54 | 54 | } catch (OCP\AppFramework\QueryException $e) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | <tr><td> |
| 28 | 28 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
| 29 | 29 | <tr> |
| 30 | - <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> |
|
| 30 | + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>"> |
|
| 31 | 31 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
| 32 | 32 | </td> |
| 33 | 33 | </tr> |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
| 53 | 53 | <?php p($theme->getName()); ?> - |
| 54 | 54 | <?php p($theme->getSlogan()); ?> |
| 55 | - <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
| 55 | + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
| 56 | 56 | </td> |
| 57 | 57 | </tr> |
| 58 | 58 | <tr> |
@@ -31,72 +31,72 @@ |
||
| 31 | 31 | use OCP\Settings\ISettings; |
| 32 | 32 | |
| 33 | 33 | class Admin implements ISettings { |
| 34 | - /** @var IConfig */ |
|
| 35 | - private $config; |
|
| 36 | - /** @var IL10N */ |
|
| 37 | - private $l; |
|
| 38 | - /** @var ThemingDefaults */ |
|
| 39 | - private $themingDefaults; |
|
| 40 | - /** @var IURLGenerator */ |
|
| 41 | - private $urlGenerator; |
|
| 34 | + /** @var IConfig */ |
|
| 35 | + private $config; |
|
| 36 | + /** @var IL10N */ |
|
| 37 | + private $l; |
|
| 38 | + /** @var ThemingDefaults */ |
|
| 39 | + private $themingDefaults; |
|
| 40 | + /** @var IURLGenerator */ |
|
| 41 | + private $urlGenerator; |
|
| 42 | 42 | |
| 43 | - public function __construct(IConfig $config, |
|
| 44 | - IL10N $l, |
|
| 45 | - ThemingDefaults $themingDefaults, |
|
| 46 | - IURLGenerator $urlGenerator) { |
|
| 47 | - $this->config = $config; |
|
| 48 | - $this->l = $l; |
|
| 49 | - $this->themingDefaults = $themingDefaults; |
|
| 50 | - $this->urlGenerator = $urlGenerator; |
|
| 51 | - } |
|
| 43 | + public function __construct(IConfig $config, |
|
| 44 | + IL10N $l, |
|
| 45 | + ThemingDefaults $themingDefaults, |
|
| 46 | + IURLGenerator $urlGenerator) { |
|
| 47 | + $this->config = $config; |
|
| 48 | + $this->l = $l; |
|
| 49 | + $this->themingDefaults = $themingDefaults; |
|
| 50 | + $this->urlGenerator = $urlGenerator; |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * @return TemplateResponse |
|
| 55 | - */ |
|
| 56 | - public function getForm() { |
|
| 57 | - $path = $this->urlGenerator->linkToRoute('theming.Theming.updateLogo'); |
|
| 53 | + /** |
|
| 54 | + * @return TemplateResponse |
|
| 55 | + */ |
|
| 56 | + public function getForm() { |
|
| 57 | + $path = $this->urlGenerator->linkToRoute('theming.Theming.updateLogo'); |
|
| 58 | 58 | |
| 59 | - $themable = true; |
|
| 60 | - $errorMessage = ''; |
|
| 61 | - $theme = $this->config->getSystemValue('theme', ''); |
|
| 62 | - if ($theme !== '') { |
|
| 63 | - $themable = false; |
|
| 64 | - $errorMessage = $this->l->t('You are already using a custom theme'); |
|
| 65 | - } |
|
| 59 | + $themable = true; |
|
| 60 | + $errorMessage = ''; |
|
| 61 | + $theme = $this->config->getSystemValue('theme', ''); |
|
| 62 | + if ($theme !== '') { |
|
| 63 | + $themable = false; |
|
| 64 | + $errorMessage = $this->l->t('You are already using a custom theme'); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - $parameters = [ |
|
| 68 | - 'themable' => $themable, |
|
| 69 | - 'errorMessage' => $errorMessage, |
|
| 70 | - 'name' => $this->themingDefaults->getEntity(), |
|
| 71 | - 'url' => $this->themingDefaults->getBaseUrl(), |
|
| 72 | - 'slogan' => $this->themingDefaults->getSlogan(), |
|
| 73 | - 'color' => $this->themingDefaults->getColorPrimary(), |
|
| 74 | - 'logo' => $this->themingDefaults->getLogo(), |
|
| 75 | - 'logoMime' => $this->config->getAppValue('theming', 'logoMime', ''), |
|
| 76 | - 'background' => $this->themingDefaults->getBackground(), |
|
| 77 | - 'backgroundMime' => $this->config->getAppValue('theming', 'backgroundMime', ''), |
|
| 78 | - 'uploadLogoRoute' => $path, |
|
| 79 | - ]; |
|
| 67 | + $parameters = [ |
|
| 68 | + 'themable' => $themable, |
|
| 69 | + 'errorMessage' => $errorMessage, |
|
| 70 | + 'name' => $this->themingDefaults->getEntity(), |
|
| 71 | + 'url' => $this->themingDefaults->getBaseUrl(), |
|
| 72 | + 'slogan' => $this->themingDefaults->getSlogan(), |
|
| 73 | + 'color' => $this->themingDefaults->getColorPrimary(), |
|
| 74 | + 'logo' => $this->themingDefaults->getLogo(), |
|
| 75 | + 'logoMime' => $this->config->getAppValue('theming', 'logoMime', ''), |
|
| 76 | + 'background' => $this->themingDefaults->getBackground(), |
|
| 77 | + 'backgroundMime' => $this->config->getAppValue('theming', 'backgroundMime', ''), |
|
| 78 | + 'uploadLogoRoute' => $path, |
|
| 79 | + ]; |
|
| 80 | 80 | |
| 81 | - return new TemplateResponse('theming', 'settings-admin', $parameters, ''); |
|
| 82 | - } |
|
| 81 | + return new TemplateResponse('theming', 'settings-admin', $parameters, ''); |
|
| 82 | + } |
|
| 83 | 83 | |
| 84 | - /** |
|
| 85 | - * @return string the section ID, e.g. 'sharing' |
|
| 86 | - */ |
|
| 87 | - public function getSection() { |
|
| 88 | - return 'theming'; |
|
| 89 | - } |
|
| 84 | + /** |
|
| 85 | + * @return string the section ID, e.g. 'sharing' |
|
| 86 | + */ |
|
| 87 | + public function getSection() { |
|
| 88 | + return 'theming'; |
|
| 89 | + } |
|
| 90 | 90 | |
| 91 | - /** |
|
| 92 | - * @return int whether the form should be rather on the top or bottom of |
|
| 93 | - * the admin section. The forms are arranged in ascending order of the |
|
| 94 | - * priority values. It is required to return a value between 0 and 100. |
|
| 95 | - * |
|
| 96 | - * E.g.: 70 |
|
| 97 | - */ |
|
| 98 | - public function getPriority() { |
|
| 99 | - return 5; |
|
| 100 | - } |
|
| 91 | + /** |
|
| 92 | + * @return int whether the form should be rather on the top or bottom of |
|
| 93 | + * the admin section. The forms are arranged in ascending order of the |
|
| 94 | + * priority values. It is required to return a value between 0 and 100. |
|
| 95 | + * |
|
| 96 | + * E.g.: 70 |
|
| 97 | + */ |
|
| 98 | + public function getPriority() { |
|
| 99 | + return 5; |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | 102 | } |
@@ -191,16 +191,16 @@ discard block |
||
| 191 | 191 | $folder = $this->appData->newFolder('images'); |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - if(!empty($newLogo)) { |
|
| 194 | + if (!empty($newLogo)) { |
|
| 195 | 195 | $target = $folder->newFile('logo'); |
| 196 | 196 | $target->putContent(file_get_contents($newLogo['tmp_name'], 'r')); |
| 197 | 197 | $this->template->set('logoMime', $newLogo['type']); |
| 198 | 198 | $name = $newLogo['name']; |
| 199 | 199 | } |
| 200 | - if(!empty($newBackgroundLogo)) { |
|
| 200 | + if (!empty($newBackgroundLogo)) { |
|
| 201 | 201 | $target = $folder->newFile('background'); |
| 202 | 202 | $image = @imagecreatefromstring(file_get_contents($newBackgroundLogo['tmp_name'], 'r')); |
| 203 | - if($image === false) { |
|
| 203 | + if ($image === false) { |
|
| 204 | 204 | return new DataResponse( |
| 205 | 205 | [ |
| 206 | 206 | 'data' => [ |
@@ -215,10 +215,10 @@ discard block |
||
| 215 | 215 | // Optimize the image since some people may upload images that will be |
| 216 | 216 | // either to big or are not progressive rendering. |
| 217 | 217 | $tmpFile = $this->tempManager->getTemporaryFile(); |
| 218 | - if(function_exists('imagescale')) { |
|
| 218 | + if (function_exists('imagescale')) { |
|
| 219 | 219 | // FIXME: Once PHP 5.5.0 is a requirement the above check can be removed |
| 220 | 220 | // Workaround for https://bugs.php.net/bug.php?id=65171 |
| 221 | - $newHeight = imagesy($image)/(imagesx($image)/1920); |
|
| 221 | + $newHeight = imagesy($image) / (imagesx($image) / 1920); |
|
| 222 | 222 | $image = imagescale($image, 1920, $newHeight); |
| 223 | 223 | } |
| 224 | 224 | imageinterlace($image, 1); |
@@ -324,112 +324,112 @@ discard block |
||
| 324 | 324 | $color = $this->config->getAppValue($this->appName, 'color'); |
| 325 | 325 | $elementColor = $this->util->elementColor($color); |
| 326 | 326 | |
| 327 | - if($this->util->invertTextColor($color)) { |
|
| 327 | + if ($this->util->invertTextColor($color)) { |
|
| 328 | 328 | $textColor = '#000000'; |
| 329 | 329 | } else { |
| 330 | 330 | $textColor = '#ffffff'; |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | - if($color !== '') { |
|
| 333 | + if ($color !== '') { |
|
| 334 | 334 | $responseCss .= sprintf( |
| 335 | - '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}' . "\n", |
|
| 335 | + '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}'."\n", |
|
| 336 | 336 | $color |
| 337 | 337 | ); |
| 338 | - $responseCss .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' . |
|
| 339 | - 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' . |
|
| 340 | - 'background-color: %s; background-position: center center; background-size:contain;' . |
|
| 341 | - 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' . |
|
| 338 | + $responseCss .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {'. |
|
| 339 | + 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');'. |
|
| 340 | + 'background-color: %s; background-position: center center; background-size:contain;'. |
|
| 341 | + 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;'. |
|
| 342 | 342 | "}\n", |
| 343 | 343 | \OC::$WEBROOT, |
| 344 | 344 | $elementColor |
| 345 | 345 | ); |
| 346 | - $responseCss .= 'input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' . |
|
| 347 | - 'background-image: url(\'data:image/svg+xml;base64,'.$this->util->generateRadioButton($elementColor).'\');' . |
|
| 346 | + $responseCss .= 'input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {'. |
|
| 347 | + 'background-image: url(\'data:image/svg+xml;base64,'.$this->util->generateRadioButton($elementColor).'\');'. |
|
| 348 | 348 | "}\n"; |
| 349 | - $responseCss .= '.primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary,' . |
|
| 350 | - '.primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active {' . |
|
| 349 | + $responseCss .= '.primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary,'. |
|
| 350 | + '.primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active {'. |
|
| 351 | 351 | 'border: 1px solid '.$elementColor.';'. |
| 352 | 352 | 'background-color: '.$elementColor.';'. |
| 353 | - 'color: ' . $textColor . ';'. |
|
| 354 | - "}\n" . |
|
| 355 | - '.primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover,' . |
|
| 356 | - '.primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus {' . |
|
| 353 | + 'color: '.$textColor.';'. |
|
| 354 | + "}\n". |
|
| 355 | + '.primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover,'. |
|
| 356 | + '.primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus {'. |
|
| 357 | 357 | 'border: 1px solid '.$elementColor.';'. |
| 358 | 358 | 'background-color: '.$elementColor.';'. |
| 359 | - 'color: ' . $textColor . ';'. |
|
| 360 | - "}\n" . |
|
| 361 | - '.primary:disabled, input[type="submit"].primary:disabled, input[type="button"].primary:disabled, button.primary:disabled, .button.primary:disabled,' . |
|
| 362 | - '.primary:disabled:hover, input[type="submit"].primary:disabled:hover, input[type="button"].primary:disabled:hover, button.primary:disabled:hover, .button.primary:disabled:hover,' . |
|
| 363 | - '.primary:disabled:focus, input[type="submit"].primary:disabled:focus, input[type="button"].primary:disabled:focus, button.primary:disabled:focus, .button.primary:disabled:focus {' . |
|
| 359 | + 'color: '.$textColor.';'. |
|
| 360 | + "}\n". |
|
| 361 | + '.primary:disabled, input[type="submit"].primary:disabled, input[type="button"].primary:disabled, button.primary:disabled, .button.primary:disabled,'. |
|
| 362 | + '.primary:disabled:hover, input[type="submit"].primary:disabled:hover, input[type="button"].primary:disabled:hover, button.primary:disabled:hover, .button.primary:disabled:hover,'. |
|
| 363 | + '.primary:disabled:focus, input[type="submit"].primary:disabled:focus, input[type="button"].primary:disabled:focus, button.primary:disabled:focus, .button.primary:disabled:focus {'. |
|
| 364 | 364 | 'border: 1px solid '.$elementColor.';'. |
| 365 | 365 | 'background-color: '.$elementColor.';'. |
| 366 | - 'opacity: 0.4;' . |
|
| 366 | + 'opacity: 0.4;'. |
|
| 367 | 367 | 'color: '.$textColor.';'. |
| 368 | 368 | "}\n"; |
| 369 | - $responseCss .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n"; |
|
| 370 | - $responseCss .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' . |
|
| 371 | - 'border: 1px solid ' . $color . ';' . |
|
| 372 | - 'color: ' . $elementColor . ';' . |
|
| 369 | + $responseCss .= '.ui-widget-header { border: 1px solid '.$color.'; background: '.$color.'; color: #ffffff;'."}\n"; |
|
| 370 | + $responseCss .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {'. |
|
| 371 | + 'border: 1px solid '.$color.';'. |
|
| 372 | + 'color: '.$elementColor.';'. |
|
| 373 | 373 | "}\n"; |
| 374 | - $responseCss .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' . |
|
| 375 | - 'color: ' . $elementColor . ';' . |
|
| 374 | + $responseCss .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {'. |
|
| 375 | + 'color: '.$elementColor.';'. |
|
| 376 | 376 | "}\n"; |
| 377 | 377 | $responseCss .= ' |
| 378 | 378 | #firstrunwizard .firstrunwizard-header { |
| 379 | - background-color: ' . $color . '; |
|
| 379 | + background-color: ' . $color.'; |
|
| 380 | 380 | } |
| 381 | 381 | #firstrunwizard p a { |
| 382 | - color: ' . $color . '; |
|
| 382 | + color: ' . $color.'; |
|
| 383 | 383 | } |
| 384 | 384 | '; |
| 385 | - $responseCss .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color); |
|
| 386 | - $responseCss .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color); |
|
| 387 | - $responseCss .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color); |
|
| 385 | + $responseCss .= sprintf('.nc-theming-main-background {background-color: %s}'."\n", $color); |
|
| 386 | + $responseCss .= sprintf('.nc-theming-main-text {color: %s}'."\n", $color); |
|
| 387 | + $responseCss .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}'."\n", $color); |
|
| 388 | 388 | |
| 389 | 389 | } |
| 390 | 390 | $logo = $this->config->getAppValue($this->appName, 'logoMime'); |
| 391 | - if($logo !== '') { |
|
| 391 | + if ($logo !== '') { |
|
| 392 | 392 | $responseCss .= sprintf( |
| 393 | - '#header .logo {' . |
|
| 394 | - 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' . |
|
| 395 | - 'background-size: contain;' . |
|
| 396 | - '}' . "\n" . |
|
| 397 | - '#header .logo-icon {' . |
|
| 398 | - 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' . |
|
| 399 | - 'background-size: contain;' . |
|
| 400 | - '}' . "\n" . |
|
| 401 | - '#firstrunwizard .firstrunwizard-header .logo {' . |
|
| 402 | - 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' . |
|
| 403 | - 'background-size: contain;' . |
|
| 404 | - '}' . "\n" |
|
| 393 | + '#header .logo {'. |
|
| 394 | + 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');'. |
|
| 395 | + 'background-size: contain;'. |
|
| 396 | + '}'."\n". |
|
| 397 | + '#header .logo-icon {'. |
|
| 398 | + 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');'. |
|
| 399 | + 'background-size: contain;'. |
|
| 400 | + '}'."\n". |
|
| 401 | + '#firstrunwizard .firstrunwizard-header .logo {'. |
|
| 402 | + 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');'. |
|
| 403 | + 'background-size: contain;'. |
|
| 404 | + '}'."\n" |
|
| 405 | 405 | ); |
| 406 | 406 | } |
| 407 | 407 | $backgroundLogo = $this->config->getAppValue($this->appName, 'backgroundMime'); |
| 408 | - if($backgroundLogo !== '') { |
|
| 409 | - $responseCss .= '#body-login {background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');}' . "\n"; |
|
| 410 | - $responseCss .= '#firstrunwizard .firstrunwizard-header {' . |
|
| 411 | - 'background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');' . |
|
| 412 | - '}' . "\n"; |
|
| 408 | + if ($backgroundLogo !== '') { |
|
| 409 | + $responseCss .= '#body-login {background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');}'."\n"; |
|
| 410 | + $responseCss .= '#firstrunwizard .firstrunwizard-header {'. |
|
| 411 | + 'background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');'. |
|
| 412 | + '}'."\n"; |
|
| 413 | 413 | } |
| 414 | - if($this->util->invertTextColor($color)) { |
|
| 415 | - $responseCss .= '#header .header-appname, #expandDisplayName { color: #000000; }' . "\n"; |
|
| 416 | - $responseCss .= '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . "\n"; |
|
| 417 | - $responseCss .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n"; |
|
| 418 | - $responseCss .= '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }' . "\n"; |
|
| 419 | - $responseCss .= '#body-login input.login { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/confirm.svg?v=2\'); }' . "\n"; |
|
| 420 | - $responseCss .= '.nc-theming-contrast {color: #000000}' . "\n"; |
|
| 421 | - $responseCss .= '.ui-widget-header { color: #000000; }' . "\n"; |
|
| 414 | + if ($this->util->invertTextColor($color)) { |
|
| 415 | + $responseCss .= '#header .header-appname, #expandDisplayName { color: #000000; }'."\n"; |
|
| 416 | + $responseCss .= '#header .icon-caret { background-image: url(\''.\OC::$WEBROOT.'/core/img/actions/caret-dark.svg\'); }'."\n"; |
|
| 417 | + $responseCss .= '.searchbox input[type="search"] { background: transparent url(\''.\OC::$WEBROOT.'/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }'."\n"; |
|
| 418 | + $responseCss .= '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }'."\n"; |
|
| 419 | + $responseCss .= '#body-login input.login { background-image: url(\''.\OC::$WEBROOT.'/core/img/actions/confirm.svg?v=2\'); }'."\n"; |
|
| 420 | + $responseCss .= '.nc-theming-contrast {color: #000000}'."\n"; |
|
| 421 | + $responseCss .= '.ui-widget-header { color: #000000; }'."\n"; |
|
| 422 | 422 | } else { |
| 423 | - $responseCss .= '.nc-theming-contrast {color: #ffffff}' . "\n"; |
|
| 423 | + $responseCss .= '.nc-theming-contrast {color: #ffffff}'."\n"; |
|
| 424 | 424 | } |
| 425 | 425 | |
| 426 | - if($logo !== '' or $color !== '') { |
|
| 427 | - $responseCss .= '.icon-file,.icon-filetype-text {' . |
|
| 428 | - 'background-image: url(\'./img/core/filetypes/text.svg?v='.$cacheBusterValue.'\');' . "}\n" . |
|
| 429 | - '.icon-folder, .icon-filetype-folder {' . |
|
| 430 | - 'background-image: url(\'./img/core/filetypes/folder.svg?v='.$cacheBusterValue.'\');' . "}\n" . |
|
| 431 | - '.icon-filetype-folder-drag-accept {' . |
|
| 432 | - 'background-image: url(\'./img/core/filetypes/folder-drag-accept.svg?v='.$cacheBusterValue.'\')!important;' . "}\n"; |
|
| 426 | + if ($logo !== '' or $color !== '') { |
|
| 427 | + $responseCss .= '.icon-file,.icon-filetype-text {'. |
|
| 428 | + 'background-image: url(\'./img/core/filetypes/text.svg?v='.$cacheBusterValue.'\');'."}\n". |
|
| 429 | + '.icon-folder, .icon-filetype-folder {'. |
|
| 430 | + 'background-image: url(\'./img/core/filetypes/folder.svg?v='.$cacheBusterValue.'\');'."}\n". |
|
| 431 | + '.icon-filetype-folder-drag-accept {'. |
|
| 432 | + 'background-image: url(\'./img/core/filetypes/folder-drag-accept.svg?v='.$cacheBusterValue.'\')!important;'."}\n"; |
|
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | $response = new DataDownloadResponse($responseCss, 'style', 'text/css'); |
@@ -448,12 +448,12 @@ discard block |
||
| 448 | 448 | $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); |
| 449 | 449 | $responseJS = '(function() { |
| 450 | 450 | OCA.Theming = { |
| 451 | - name: ' . json_encode($this->template->getName()) . ', |
|
| 452 | - url: ' . json_encode($this->template->getBaseUrl()) . ', |
|
| 453 | - slogan: ' . json_encode($this->template->getSlogan()) . ', |
|
| 454 | - color: ' . json_encode($this->template->getColorPrimary()) . ', |
|
| 455 | - inverted: ' . json_encode($this->util->invertTextColor($this->template->getColorPrimary())) . ', |
|
| 456 | - cacheBuster: ' . json_encode($cacheBusterValue). ' |
|
| 451 | + name: ' . json_encode($this->template->getName()).', |
|
| 452 | + url: ' . json_encode($this->template->getBaseUrl()).', |
|
| 453 | + slogan: ' . json_encode($this->template->getSlogan()).', |
|
| 454 | + color: ' . json_encode($this->template->getColorPrimary()).', |
|
| 455 | + inverted: ' . json_encode($this->util->invertTextColor($this->template->getColorPrimary())).', |
|
| 456 | + cacheBuster: ' . json_encode($cacheBusterValue).' |
|
| 457 | 457 | }; |
| 458 | 458 | })();'; |
| 459 | 459 | $response = new DataDownloadResponse($responseJS, 'javascript', 'text/javascript'); |