Skip to content

Commit 03b6256

Browse files
Add OpenMinTeD theme files
1 parent 2d37508 commit 03b6256

File tree

9 files changed

+718
-0
lines changed

9 files changed

+718
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
if(!empty($this->data['htmlinject']['htmlContentPost'])) {
3+
foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
4+
echo $c;
5+
}
6+
}
7+
?>
8+
</div><!-- #content -->
9+
<div id="footer">
10+
<hr />
11+
12+
Copyright &copy; 2016 <a href="https://openminted.eu/">OpenMinTeD</a> | Powered by <a href="https://github.com/rciam">RCIAM</a>
13+
14+
<br style="clear: right" /><br/>
15+
16+
</div><!-- #footer -->
17+
18+
</div><!-- #wrap -->
19+
20+
</body>
21+
</html>
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
<?php
2+
3+
4+
5+
/**
6+
* Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
7+
*/
8+
$this->data['htmlinject'] = array(
9+
'htmlContentPre' => array(),
10+
'htmlContentPost' => array(),
11+
'htmlContentHead' => array(),
12+
);
13+
14+
15+
$jquery = array();
16+
if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery'];
17+
18+
if (array_key_exists('pageid', $this->data)) {
19+
$hookinfo = array(
20+
'pre' => &$this->data['htmlinject']['htmlContentPre'],
21+
'post' => &$this->data['htmlinject']['htmlContentPost'],
22+
'head' => &$this->data['htmlinject']['htmlContentHead'],
23+
'jquery' => &$jquery,
24+
'page' => $this->data['pageid']
25+
);
26+
27+
SimpleSAML_Module::callHooks('htmlinject', $hookinfo);
28+
}
29+
// - o - o - o - o - o - o - o - o - o - o - o - o -
30+
31+
/**
32+
* Do not allow to frame SimpleSAMLphp pages from another location.
33+
* This prevents clickjacking attacks in modern browsers.
34+
*
35+
* If you don't want any framing at all you can even change this to
36+
* 'DENY', or comment it out if you actually want to allow foreign
37+
* sites to put SimpleSAMLphp in a frame. The latter is however
38+
* probably not a good security practice.
39+
*/
40+
header('X-Frame-Options: SAMEORIGIN');
41+
42+
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
43+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
44+
<head>
45+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
46+
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0" />
47+
<script type="text/javascript" src="/<?php echo $this->data['baseurlpath']; ?>resources/script.js"></script>
48+
<title>OpenMinTeD SSO | <?php
49+
if(array_key_exists('header', $this->data)) {
50+
echo $this->data['header'];
51+
} else {
52+
echo 'SimpleSAMLphp';
53+
}
54+
?></title>
55+
56+
<link rel="stylesheet" type="text/css" href="<?php echo htmlspecialchars(SimpleSAML_Module::getModuleURL('openminted/resources/style.css')); ?>" />
57+
<link rel="shortcut icon" href="<?php echo htmlspecialchars(SimpleSAML_Module::getModuleURL('openminted/resources/icons/favicon-16x16.png')); ?>" />
58+
59+
<?php
60+
61+
if(!empty($jquery)) {
62+
$version = '1.8';
63+
if (array_key_exists('version', $jquery))
64+
$version = $jquery['version'];
65+
66+
if ($version == '1.8') {
67+
if (isset($jquery['core']) && $jquery['core'])
68+
echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-1.8.js"></script>' . "\n");
69+
70+
if (isset($jquery['ui']) && $jquery['ui'])
71+
echo('<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui-1.8.js"></script>' . "\n");
72+
73+
if (isset($jquery['css']) && $jquery['css'])
74+
echo('<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] .
75+
'resources/uitheme1.8/jquery-ui.css" />' . "\n");
76+
}
77+
}
78+
79+
if (isset($this->data['clipboard.js'])) {
80+
echo '<script type="text/javascript" src="/'. $this->data['baseurlpath'] .
81+
'resources/clipboard.min.js"></script>'."\n";
82+
}
83+
84+
if(!empty($this->data['htmlinject']['htmlContentHead'])) {
85+
foreach($this->data['htmlinject']['htmlContentHead'] AS $c) {
86+
echo $c;
87+
}
88+
}
89+
90+
91+
92+
93+
if ($this->isLanguageRTL()) {
94+
?>
95+
<link rel="stylesheet" type="text/css" href="/<?php echo $this->data['baseurlpath']; ?>resources/default-rtl.css" />
96+
<?php
97+
}
98+
?>
99+
100+
101+
<meta name="robots" content="noindex, nofollow" />
102+
103+
104+
<?php
105+
if(array_key_exists('head', $this->data)) {
106+
echo '<!-- head -->' . $this->data['head'] . '<!-- /head -->';
107+
}
108+
?>
109+
</head>
110+
<?php
111+
$onLoad = '';
112+
if(array_key_exists('autofocus', $this->data)) {
113+
$onLoad .= 'SimpleSAML_focus(\'' . $this->data['autofocus'] . '\');';
114+
}
115+
if (isset($this->data['onLoad'])) {
116+
$onLoad .= $this->data['onLoad'];
117+
}
118+
119+
if($onLoad !== '') {
120+
$onLoad = ' onload="' . $onLoad . '"';
121+
}
122+
?>
123+
<body<?php echo $onLoad; ?>>
124+
125+
<div id="wrap">
126+
127+
<div id="header">
128+
<img src="<?php echo SimpleSAML_Module::getModuleURL('openminted/resources/logo.png'); ?>" alt="OpenMinTeD" />
129+
<h1><a style="text-decoration: none;" href="/<?php echo $this->data['baseurlpath']; ?>">OpenMinTeD SSO</a> | <?php
130+
echo (isset($this->data['header']) ? $this->data['header'] : 'SimpleSAMLphp');
131+
?></h1>
132+
</div>
133+
134+
135+
<?php
136+
137+
$includeLanguageBar = TRUE;
138+
if (!empty($_POST))
139+
$includeLanguageBar = FALSE;
140+
if (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === TRUE)
141+
$includeLanguageBar = FALSE;
142+
143+
if ($includeLanguageBar) {
144+
145+
$languages = $this->getLanguageList();
146+
if ( count($languages) > 1 ) {
147+
echo '<div id="languagebar">';
148+
$langnames = array(
149+
'no' => 'Bokmål', // Norwegian Bokmål
150+
'nn' => 'Nynorsk', // Norwegian Nynorsk
151+
'se' => 'Sámegiella', // Northern Sami
152+
'sam' => 'Åarjelh-saemien giele', // Southern Sami
153+
'da' => 'Dansk', // Danish
154+
'en' => 'English',
155+
'de' => 'Deutsch', // German
156+
'sv' => 'Svenska', // Swedish
157+
'fi' => 'Suomeksi', // Finnish
158+
'es' => 'Español', // Spanish
159+
'fr' => 'Français', // French
160+
'it' => 'Italiano', // Italian
161+
'nl' => 'Nederlands', // Dutch
162+
'lb' => 'Lëtzebuergesch', // Luxembourgish
163+
'cs' => 'Čeština', // Czech
164+
'sl' => 'Slovenščina', // Slovensk
165+
'lt' => 'Lietuvių kalba', // Lithuanian
166+
'hr' => 'Hrvatski', // Croatian
167+
'hu' => 'Magyar', // Hungarian
168+
'pl' => 'Język polski', // Polish
169+
'pt' => 'Português', // Portuguese
170+
'pt-br' => 'Português brasileiro', // Portuguese
171+
'ru' => 'русский язык', // Russian
172+
'et' => 'eesti keel', // Estonian
173+
'tr' => 'Türkçe', // Turkish
174+
'el' => 'ελληνικά', // Greek
175+
'ja' => '日本語', // Japanese
176+
'zh' => '简体中文', // Chinese (simplified)
177+
'zh-tw' => '繁體中文', // Chinese (traditional)
178+
'ar' => 'العربية', // Arabic
179+
'fa' => 'پارسی', // Persian
180+
'ur' => 'اردو', // Urdu
181+
'he' => 'עִבְרִית', // Hebrew
182+
'id' => 'Bahasa Indonesia', // Indonesian
183+
'sr' => 'Srpski', // Serbian
184+
'lv' => 'Latviešu', // Latvian
185+
'ro' => 'Românește', // Romanian
186+
'eu' => 'Euskara', // Basque
187+
);
188+
189+
$textarray = array();
190+
foreach ($languages AS $lang => $current) {
191+
$lang = strtolower($lang);
192+
if ($current) {
193+
$textarray[] = $langnames[$lang];
194+
} else {
195+
$textarray[] = '<a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->languageParameterName => $lang))) . '">' .
196+
$langnames[$lang] . '</a>';
197+
}
198+
}
199+
echo join(' | ', $textarray);
200+
echo '</div>';
201+
}
202+
203+
}
204+
205+
206+
207+
?>
208+
<div id="content">
209+
210+
211+
212+
<?php
213+
214+
if(!empty($this->data['htmlinject']['htmlContentPre'])) {
215+
foreach($this->data['htmlinject']['htmlContentPre'] AS $c) {
216+
echo $c;
217+
}
218+
}
24.7 KB
Loading
2.55 KB
Loading
3.03 KB
Loading
4.26 KB
Loading
448 Bytes
Loading

www/resources/logo.png

6.54 KB
Loading

0 commit comments

Comments
 (0)