From e3224c30b884a8c126b0006bb49fce0287351331 Mon Sep 17 00:00:00 2001 From: Aaron Junker Date: Sat, 11 Jun 2022 09:48:15 +0200 Subject: [PATCH] push --- .gitignore | 1 + .gitmodules | 4 +- css.php => css.css | 49 +++--------- display.php | 170 +++++++++++++++++++---------------------- favicon.ico | Bin 822 -> 0 bytes index.php | 110 ++++++++++---------------- objects.php | 2 +- presentations/foo.xml | 2 +- presentations/foo3.xml | 14 ++++ presentations/foo4.xml | 14 ++++ presentations/foo5.xml | 14 ++++ presentations/foo6.xml | 14 ++++ presentations/foo7.xml | 14 ++++ shared | 1 + show.php | 6 +- slidelist.php | 1 + 16 files changed, 208 insertions(+), 208 deletions(-) rename css.php => css.css (59%) delete mode 100644 favicon.ico create mode 100644 presentations/foo3.xml create mode 100644 presentations/foo4.xml create mode 100644 presentations/foo5.xml create mode 100644 presentations/foo6.xml create mode 100644 presentations/foo7.xml create mode 160000 shared diff --git a/.gitignore b/.gitignore index fc96a7e..17c05e0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ config.php .htaccess show img +/presentations/ diff --git a/.gitmodules b/.gitmodules index 0c858fe..4c115c8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "reveal.js"] path = reveal.js url = https://github.com/hakimel/reveal.js.git -[submodule "web-shared"] +[submodule "shared"] path = shared - url = https://github.com/php/web-shared.git + url = https://github.com/php/web-shared diff --git a/css.php b/css.css similarity index 59% rename from css.php rename to css.css index 047c127..eb57d69 100644 --- a/css.php +++ b/css.css @@ -1,20 +1,9 @@ - - \ No newline at end of file diff --git a/display.php b/display.php index b01c9fe..24f07ff 100644 --- a/display.php +++ b/display.php @@ -54,31 +54,77 @@ class html extends display { // allow caching if($cache_ok) header("Last-Modified: " . date("r", filemtime($this->presentationDir.'/'.$presentation->slides[$this->slideNum]->filename))); - echo <<
+function change_mode() { + document.cookie="display_mode="+document.modes_form.modes.options[document.modes_form.modes.selectedIndex].value+"|"+document.modes_form.speaker.checked; + top.location=top.location.href; +} + + + + + + +HEAD_RAND; + + $HEAD_RAND = str_replace("%1", htmlspecialchars($_SERVER['HTTP_HOST']).$baseDir, $HEAD_RAND); + + $TITLE = "Presentation System"; + + $CSS = array("/../css.css"); + + $SUBDOMAIN = "talks"; + + $LINKS = array( + array("href" => "https://php.net/downloads.php", "text" => "Downloads"), + array("href" => "https://php.net/docs.php", "text" => "Documentation"), + array("href" => "https://php.net/get-involved.php", "text" => "Get Involved"), + array("href" => "https://php.net/support.php", "text" => "Help") + ); + + $showHeaderFooter = $presentation->stylesheet == "css.css"; + + if($showHeaderFooter) { + include_once "shared/templates/header.inc"; + }else{ + $HEADER = <<
{$presentation->title} + HEADER; + echo $HEADER; + } + include 'getwidth.php'; + if(!$showHeaderFooter) { + include $presentation->stylesheet; + }else{ + echo ""; + } switch($presentation->template) { - case 'simple': - $body_style = "margin-top: 1em;"; - break; - case 'empty': - $body_style = "margin-top: 0em;"; - break; - case 'php2': - $body_style = "margin-top: 5em;"; - break; - default: - $body_style = "margin-top: 8em;"; - break; + case 'css': + $body_style = "margin-top: 8em;"; + break; + default: + $body_style = "margin-top: 0em;"; + break; } $this->body_style = $body_style; - include 'getwidth.php'; - include $presentation->stylesheet; /* the following includes scripts necessary for various animations */ if($presentation->animate || $presentation->jskeyboard) include 'keyboard.js.php'; // Link Navigation (and next slide pre-fetching) @@ -91,9 +137,9 @@ HEADER; foreach($this->objs as $obj) { $obj->display(); } - echo <<