Ejemplo n.º 1
0
include 'src/Page.php';
include 'src/PageContent.php';
// classes
include 'src/Asset.php';
include 'src/Documentation.php';
include 'src/ExternalPage.php';
include 'src/Header.php';
include 'src/InternalPage.php';
include 'src/Link.php';
include 'src/Links.php';
include 'src/Navigation.php';
include 'src/OronjoBuy.php';
include 'src/PageFactory.php';
include 'src/SimpleContent.php';
include 'src/Site.php';
include 'src/SoftwareContent.php';
$useLocalAssets = true;
if (count($argv) > 1 && $argv[1] === 'absolute-links') {
    $useLocalAssets = false;
}
if ($useLocalAssets) {
    Asset::useRelative();
    Link::useRelative();
}
$pages = new PageFactory();
$navigation = new Navigation($pages->home());
$navigation->addItem($pages->music())->addDropdown('Software', array_merge(array($pages->software()), $pages->linkedSoftwarePages()))->addItem($pages->contact());
$site = new Site(array($pages->home(), $pages->music(), $pages->contact(), $pages->software(), $pages->error(), $pages->m4lWAI(), $pages->m4lDSM(), $pages->m4lMCM(), $pages->wacNetworkMidi(), $pages->miniakPatchEditor(), $pages->metronome(), $pages->pushWrapper()), $navigation);
$site->clearLastBuild();
$site->render();
echo sprintf("Site built in %fms\n", microtime(true) - $start);