defaults.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. class OC_Theme {
  8. /**
  9. * Returns the base URL
  10. * @return string URL
  11. */
  12. public function getBaseUrl(): string {
  13. return 'https://nextcloud.com';
  14. }
  15. /**
  16. * Returns the documentation URL
  17. * @return string URL
  18. */
  19. public function getDocBaseUrl(): string {
  20. return 'https://docs.nextcloud.com';
  21. }
  22. /**
  23. * Returns the title
  24. * @return string title
  25. */
  26. public function getTitle(): string {
  27. return 'Custom Cloud';
  28. }
  29. /**
  30. * Returns the short name of the software
  31. * @return string title
  32. */
  33. public function getName(): string {
  34. return 'Custom Cloud';
  35. }
  36. /**
  37. * Returns the short name of the software containing HTML strings
  38. * @return string title
  39. */
  40. public function getHTMLName(): string {
  41. return 'Custom Cloud';
  42. }
  43. /**
  44. * Returns entity (e.g. company name) - used for footer, copyright
  45. * @return string entity name
  46. */
  47. public function getEntity(): string {
  48. return 'Custom Cloud Co.';
  49. }
  50. /**
  51. * Returns slogan
  52. * @return string slogan
  53. */
  54. public function getSlogan(): string {
  55. return 'Your custom cloud, personalized for you!';
  56. }
  57. /**
  58. * Returns short version of the footer
  59. * @return string short footer
  60. */
  61. public function getShortFooter(): string {
  62. $entity = $this->getEntity();
  63. $footer = '© ' . date('Y');
  64. // Add link if entity name is not empty
  65. if ($entity !== '') {
  66. $footer .= ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $entity . '</a>' . '<br/>';
  67. }
  68. $footer .= $this->getSlogan();
  69. return $footer;
  70. }
  71. /**
  72. * Returns long version of the footer
  73. * @return string long footer
  74. */
  75. public function getLongFooter(): string {
  76. $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
  77. '<br/>' . $this->getSlogan();
  78. return $footer;
  79. }
  80. /**
  81. * Generate a documentation link for a given key
  82. * @return string documentation link
  83. */
  84. public function buildDocLinkToKey($key): string {
  85. return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key;
  86. }
  87. /**
  88. * Returns mail header color
  89. * @return string
  90. */
  91. public function getColorPrimary(): string {
  92. return '#745bca';
  93. }
  94. /**
  95. * Returns background color to be used
  96. * @return string
  97. */
  98. public function getColorBackground(): string {
  99. return '#3d85c6';
  100. }
  101. /**
  102. * Returns variables to overload defaults from core/css/variables.scss
  103. * @return array
  104. */
  105. public function getScssVariables(): array {
  106. return [
  107. 'color-primary' => '#745bca'
  108. ];
  109. }
  110. }