Skip to content

Commit

Permalink
Merge pull request #39211 from shdehnavi/refactor_themes_defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Sep 9, 2023
2 parents 938a558 + 1196b5c commit 023d796
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions themes/example/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,63 +24,63 @@ class OC_Theme {
* Returns the base URL
* @return string URL
*/
public function getBaseUrl() {
public function getBaseUrl(): string {
return 'https://nextcloud.com';
}

/**
* Returns the documentation URL
* @return string URL
*/
public function getDocBaseUrl() {
public function getDocBaseUrl(): string {
return 'https://docs.nextcloud.com';
}

/**
* Returns the title
* @return string title
*/
public function getTitle() {
public function getTitle(): string {
return 'Custom Cloud';
}

/**
* Returns the short name of the software
* @return string title
*/
public function getName() {
public function getName(): string {
return 'Custom Cloud';
}

/**
* Returns the short name of the software containing HTML strings
* @return string title
*/
public function getHTMLName() {
public function getHTMLName(): string {
return 'Custom Cloud';
}

/**
* Returns entity (e.g. company name) - used for footer, copyright
* @return string entity name
*/
public function getEntity() {
public function getEntity(): string {
return 'Custom Cloud Co.';
}

/**
* Returns slogan
* @return string slogan
*/
public function getSlogan() {
public function getSlogan(): string {
return 'Your custom cloud, personalized for you!';
}

/**
* Returns short version of the footer
* @return string short footer
*/
public function getShortFooter() {
public function getShortFooter(): string {
$footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
'<br/>' . $this->getSlogan();

Expand All @@ -91,7 +91,7 @@ public function getShortFooter() {
* Returns long version of the footer
* @return string long footer
*/
public function getLongFooter() {
public function getLongFooter(): string {
$footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
'<br/>' . $this->getSlogan();

Expand All @@ -102,7 +102,7 @@ public function getLongFooter() {
* Generate a documentation link for a given key
* @return string documentation link
*/
public function buildDocLinkToKey($key) {
public function buildDocLinkToKey($key): string {
return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key;
}

Expand All @@ -111,15 +111,15 @@ public function buildDocLinkToKey($key) {
* Returns mail header color
* @return string
*/
public function getColorPrimary() {
public function getColorPrimary(): string {
return '#745bca';
}

/**
* Returns variables to overload defaults from core/css/variables.scss
* @return array
*/
public function getScssVariables() {
public function getScssVariables(): array {
return [
'color-primary' => '#745bca'
];
Expand Down

0 comments on commit 023d796

Please sign in to comment.