forked from eclipse-ee4j/ee4j-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
relationships.php
52 lines (42 loc) · 1.66 KB
/
relationships.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
<?php
/*******************************************************************************
* Copyright (c) 2018 Eclipse Foundation and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php");
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php");
$App = new App();
$Nav = new Nav();
$Menu = new Menu();
require_once ('_projectCommon.php');
$pageTitle = "EE4J Relationships";
$pageKeywords = "EE4J";
$pageAuthor = "Wayne Beaton";
$App->addExtraHtmlHeader("<base href=\"./generated/\"/>");
$App->addExtraHtmlHeader("<style>.imageblock img {width: 100%;height:auto}</style>");
// FIXME Workaround because I can't get Asciidoctor to generate embeddable HTML
function getBodyContent($path)
{
$DOMDocument = new DOMDocument();
$DOMDocument->loadHTMLFile($path);
$body = $DOMDocument->getElementsByTagName('body')->item(0);
$content = "";
foreach ($body->childNodes as $childNode) {
$content .= $DOMDocument->saveHTML($childNode);
}
return $content;
}
ob_start();
?>
<div id="midcolumn">
<?php print getBodyContent(dirname(__FILE__) . '/generated/relationships.html'); ?>
</div>
<?php
$html = ob_get_clean();
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);