-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
140 lines (114 loc) · 4.35 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
/**
* Copyright (c) 2014-2017, 2018 Eclipse Foundation.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* Christopher Guindon (Eclipse Foundation) - Initial implementation
* Eric Poirier (Eclipse Foundation)
*
* SPDX-License-Identifier: EPL-2.0
*/
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
$App = new App();
$Theme = $App->getThemeClass();
// Shared variables/configs for all pages of your website.
require_once ('_projectCommon.php');
// Begin: page-specific settings. Change these.
$pageTitle = "Eclipse Paho";
$Theme->setPageAuthor('Ian Craggs');
$Theme->setPageKeywords('Add maximal 20 keywords and separate them from each other by a comma en a space.');
$Theme->setPageTitle($pageTitle);
$Theme->setLayout($acceptable_layouts[0]);
//if (isset($Nav)) {
// $Theme->setNav($Nav);
//}
// Initialize custom solstice $variables.
$variables = array();
// Add classes to <body>. (String)
$variables['body_classes'] = '';
// Insert custom HTML in the breadcrumb region. (String)
$variables['breadcrumbs_html'] = "";
// Hide the breadcrumbs. (Bool)
$variables['hide_breadcrumbs'] = FALSE;
// Insert HTML before the left nav. (String)
$variables['leftnav_html'] = '';
// Update the main container class (String)
$variables['main_container_classes'] = 'container';
// Insert HTML after opening the main content container, before the left sidebar. (String)
//if ($Theme->hasCookieConsent()) {
$variables['main_container_html'] = '';
//}
// Insert header navigation for project websites.
// Bug 436108 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=436108
$links = array();
$links[] = array(
'icon' => 'fa-download', // Required
'url' => 'index.php?page=downloads.php', // Required
'title' => 'Download', // Required
// 'target' => '_blank', // Optional
'text' => 'Details and comparison of all Paho components' // Optional
);
$links[] = array(
'icon' => 'fa-users', // Required
'url' => 'index.php?page=users.php', // Required
'title' => 'Getting Involved', // Required
// 'target' => '_blank', // Optional
'text' => 'Github, Contributions, Committers' // Optional
);
$links[] = array(
'icon' => 'fa-book', // Required
'url' => 'index.php?page=documentation.php', // Required
'title' => 'Documentation', // Required
// 'target' => '_blank', // Optional
'text' => 'Tutorials, Examples, Videos, Online Reference' // Optional
);
$links[] = array(
'icon' => 'fa-support', // Required
'url' => 'index.php?page=support.php', // Required
'title' => 'Support', // Required
// 'target' => '_blank', // Optional
'text' => 'Issues, Chat, Mailing List, Team' // Optional
);
$variables['header_nav'] = array(
'links' => $links, // Required
'logo' => array( // Required
'src' => 'images/paho_logo_400.png', // Required
'alt' => 'pāho (verb) to broadcast, make widely known, announce, disseminate, transmit (via the Maori dictionary) ', // Optional
'url' => 'https://www.eclipse.org/paho' // Optional
// 'target' => '_blank' // Optional
)
);
// CFA Link - Big orange button in header
$variables['btn_cfa'] = array(
'hide' => FALSE, // Optional - Hide the CFA button.
'html' => '', // Optional - Replace CFA html and insert custom HTML.
'class' => 'btn btn-huge btn-warning', // Optional - Replace class on CFA link.
'href' => '//www.eclipse.org/downloads/', // Optional - Replace href on CFA link.
'text' => '<i class="fa fa-download"></i> Download' // Optional - Replace text of CFA link.
);
// Set Solstice theme variables. (Array)
$App->setThemeVariables($variables);
$page = $_GET['page'];
if ($page === null) {
$page = $App->getScriptName();
}
//print
//'<script src="js/jquery.min.js"></script><script src="js/bootstrap.min.js"></script>';
// Place your html content in a file called content/en_pagename.php
ob_start();
include ("contents/" . $page);
$html = ob_get_clean();
$Theme->setHtml($html);
// Insert extra html before closing </head> tag.
// $App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css"
// href="style.css" media="screen" />');
// Insert script/html before closing </body> tag.
// $App->AddExtraJSFooter('<script type="text/javascript"
// src="script.min.js"></script>');
// Generate the web page
$Theme->generatePage();
?>