You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

defaults.php 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. /**
  3. * @author Björn Schießle <schiessle@owncloud.com>
  4. * @author Jan-Christoph Borchardt, http://jancborchardt.net
  5. * @copyright Copyright (c) 2016, ownCloud, Inc.
  6. * @license AGPL-3.0
  7. *
  8. * This code is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License, version 3,
  10. * as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License, version 3,
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>
  19. */
  20. class OC_Theme {
  21. /**
  22. * Returns the base URL
  23. * @return string URL
  24. */
  25. public function getBaseUrl(): string {
  26. return 'https://nextcloud.com';
  27. }
  28. /**
  29. * Returns the documentation URL
  30. * @return string URL
  31. */
  32. public function getDocBaseUrl(): string {
  33. return 'https://docs.nextcloud.com';
  34. }
  35. /**
  36. * Returns the title
  37. * @return string title
  38. */
  39. public function getTitle(): string {
  40. return 'Custom Cloud';
  41. }
  42. /**
  43. * Returns the short name of the software
  44. * @return string title
  45. */
  46. public function getName(): string {
  47. return 'Custom Cloud';
  48. }
  49. /**
  50. * Returns the short name of the software containing HTML strings
  51. * @return string title
  52. */
  53. public function getHTMLName(): string {
  54. return 'Custom Cloud';
  55. }
  56. /**
  57. * Returns entity (e.g. company name) - used for footer, copyright
  58. * @return string entity name
  59. */
  60. public function getEntity(): string {
  61. return 'Custom Cloud Co.';
  62. }
  63. /**
  64. * Returns slogan
  65. * @return string slogan
  66. */
  67. public function getSlogan(): string {
  68. return 'Your custom cloud, personalized for you!';
  69. }
  70. /**
  71. * Returns short version of the footer
  72. * @return string short footer
  73. */
  74. public function getShortFooter(): string {
  75. $entity = $this->getEntity();
  76. $footer = '© ' . date('Y');
  77. // Add link if entity name is not empty
  78. if ($entity !== '') {
  79. $footer .= ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $entity . '</a>' . '<br/>';
  80. }
  81. $footer .= $this->getSlogan();
  82. return $footer;
  83. }
  84. /**
  85. * Returns long version of the footer
  86. * @return string long footer
  87. */
  88. public function getLongFooter(): string {
  89. $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
  90. '<br/>' . $this->getSlogan();
  91. return $footer;
  92. }
  93. /**
  94. * Generate a documentation link for a given key
  95. * @return string documentation link
  96. */
  97. public function buildDocLinkToKey($key): string {
  98. return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key;
  99. }
  100. /**
  101. * Returns mail header color
  102. * @return string
  103. */
  104. public function getColorPrimary(): string {
  105. return '#745bca';
  106. }
  107. /**
  108. * Returns variables to overload defaults from core/css/variables.scss
  109. * @return array
  110. */
  111. public function getScssVariables(): array {
  112. return [
  113. 'color-primary' => '#745bca'
  114. ];
  115. }
  116. }