Passed
Push — master ( be0002...f0c8f7 )
by Roeland
116:12 queued 05:20
created

OC_Theme::buildDocLinkToKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @author Björn Schießle <[email protected]>
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
21
class OC_Theme {
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 documentation URL
33
	 * @return string URL
34
	 */
35
	public function getDocBaseUrl() {
36
		return 'https://docs.nextcloud.com';
37
	}
38
39
	/**
40
	 * Returns the title
41
	 * @return string title
42
	 */
43
	public function getTitle() {
44
		return 'Custom Cloud';
45
	}
46
47
	/**
48
	 * Returns the short name of the software
49
	 * @return string title
50
	 */
51
	public function getName() {
52
		return 'Custom Cloud';
53
	}
54
55
	/**
56
	 * Returns the short name of the software containing HTML strings
57
	 * @return string title
58
	 */
59
	public function getHTMLName() {
60
		return 'Custom Cloud';
61
	}
62
63
	/**
64
	 * Returns entity (e.g. company name) - used for footer, copyright
65
	 * @return string entity name
66
	 */
67
	public function getEntity() {
68
		return 'Custom Cloud Co.';
69
	}
70
71
	/**
72
	 * Returns slogan
73
	 * @return string slogan
74
	 */
75
	public function getSlogan() {
76
		return 'Your custom cloud, personalized for you!';
77
	}
78
79
	/**
80
	 * Returns short version of the footer
81
	 * @return string short footer
82
	 */
83
	public function getShortFooter() {
84
		$footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
85
			'<br/>' . $this->getSlogan();
86
87
		return $footer;
88
	}
89
90
	/**
91
	 * Returns long version of the footer
92
	 * @return string long footer
93
	 */
94
	public function getLongFooter() {
95
		$footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
96
			'<br/>' . $this->getSlogan();
97
98
		return $footer;
99
	}
100
101
	/**
102
	 * Generate a documentation link for a given key
103
	 * @return string documentation link
104
	 */
105
	public function buildDocLinkToKey($key) {
106
		return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key;
107
	}
108
109
110
	/**
111
	 * Returns mail header color
112
	 * @return string
113
	 */
114
	public function getColorPrimary() {
115
		return '#745bca';
116
	}
117
118
	/**
119
	 * Returns variables to overload defaults from core/css/variables.scss
120
	 * @return array
121
	 */
122
	public function getScssVariables() {
123
		return [
124
			'color-primary' => '#745bca'
125
		];
126
	}
127
}
128