Merge in Derick's Renderer

This commit is contained in:
Derick Rethans
2025-06-19 17:25:32 +01:00
23 changed files with 15928 additions and 5 deletions

5
.gitignore vendored
View File

@@ -1,5 +1,8 @@
config.php
.htaccess
show
vendor
img
/presentations/
presentations
.idea
*.sw*

224
10gen-strict.css Normal file
View File

@@ -0,0 +1,224 @@
body, h1, h2
{
background-color: #013290;
color: #eeeeec;
font-size: 150%;
}
div.whole-slide
{
width: 1024px;
margin: 0 auto;
}
body.agenda-slide, body.slide
{
background-color: #eeeeec;
text-align: left;
color: #222;
}
div.agenda-slide h1, div.slide h1, div.slide h2
{
background-color: #eeeeec;
color: #222;
margin-bottom: 0.5em;
}
div.slide h2
{
font-size: 1.5em;
margin-top: -1.0em;
margin-bottom: 0.5em;
}
div.section-slide div p
{
color: #eee;
font-weight: bold;
text-align: left;
margin: 1em;
text-shadow: -2px -2px 3px #000, -1px -1px 1px #fff
}
ul ul li
{
font-size: 80%;
list-style-type: disc;
}
img.right
{
margin: 0em 2em 0em 0.5em;
}
h1
{
color: #abdc45;
margin-bottom: 0em;
font-family: "PT Sans", Arial;
font-size: 2em;
text-align: center;
}
h2
{
color: #abdc45;
margin-bottom: 0em;
text-align: center;
}
div.title-slide
{
color: #eeeeec;
margin-left: 60px;
margin-right: 100px;
text-align: left;
}
div.template-white div.title-slide
{
color: #000;
}
pre.code, pre.xdebug-var-dump
{
color: #000;
background: #fff;
}
pre.xdebug-var-dump
{
font-size: 100%;
}
p
{
font-family: "PT Sans", Arial;
font-size: 1.75em;
}
div.event-title p
{
font-family: "PT Sans Caption", Arial;
font-weight: bold;
font-size: 180%;
padding: 0;
text-shadow: -2px -2px 3px #000, -1px -1px 1px #fff
}
div.event-presenter
{
font-size: 1.25em;
}
div.pres-url-small
{
font-size: 85%;
}
div.footer
{
border-top: 3px solid #3366ff;
width: 870px;
top: 585px;
position: absolute;
background-color: #013290;
clear: both;
padding-top: 50px;
}
div.footer-thanks
{
border-top: 3px solid #3366ff;
top: 620px;
position: absolute;
background-color: #013290;
clear: both;
padding-top: 20px;
width: 1024px;
}
pre
{
font-size: 105%;
}
div.result pre {
background: none;
}
div.big-centre
{
font-size: 250%;
text-align: center;
}
div.centre
{
text-align: center;
}
a
{
color: #000;
}
div.html
{
font-size: 80%;
color: #000;
background-color: #fff;
margin-left: 2em;
margin-right: 2em;
}
div.html a
{
color: #777;
}
table
{
font-size: 22pt;
}
table.two
{
font-size: 85%;
text-align: left;
}
table.two tr
{
vertical-align: top;
}
pre.code strong
{
color: #f00;
}
div.float
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
table, td, tr
{
border: 0;
}
div.small
{
font-size: 80%;
}
h1.style-center
{
text-align: center;
}

50
10gen.css Normal file
View File

@@ -0,0 +1,50 @@
h1, h2
{
background-color: #1a3e7f;
}
div.footer
{
height: 105px;
width: 1024px;
top: 645px;
position: absolute;
background-color: #1a3e7f;
clear: both;
}
div.footer img
{
margin-left: 20px;
margin-right: 20px;
}
div.footer-thanks
{
border-top: 3px solid #3366ff;
top: 620px;
position: absolute;
background-color: #013290;
clear: both;
padding-top: 20px;
width: 1024px;
}
pre
{
font-size: 135%;
}
div.section-slide div p
{
text-align: center;
color: #000;
margin-top: 200px;
margin-bottom: 0px;
}
div.big-centre
{
font-size: 250%;
text-align: center;
}

2
IE8.js Normal file

File diff suppressed because one or more lines are too long

18
INSTALL Normal file
View File

@@ -0,0 +1,18 @@
Quick Install Guide
===================
mkdir /tmp/yourdir
cd /tmp/yourdir
git clone git@git.php.net:/web/pres2.git
git clone git@git.php.net:/presentations.git
php composer.phar require zetacomponents/template
cd pres2/
git checkout dericks-renderer
ln -s ../presentations .
cp config.php-dist config.php
pear install xml_parser
php -S localhost:8123
Go to presentation:
i.e.: http://localhost:8123/show2.php/mongo-tut-tek15

6
composer.json Normal file
View File

@@ -0,0 +1,6 @@
{
"require": {
"zetacomponents/template": "^1.5",
"mongodb/mongodb": "^1.0"
}
}

511
composer.lock generated Normal file
View File

@@ -0,0 +1,511 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "fda4c2208913c9c63f9bb0d64145769e",
"packages": [
{
"name": "jean85/pretty-package-versions",
"version": "2.0.5",
"source": {
"type": "git",
"url": "https://github.com/Jean85/pretty-package-versions.git",
"reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af",
"reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.0.0",
"php": "^7.1|^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.17",
"jean85/composer-provided-replaced-stub-package": "^1.0",
"phpstan/phpstan": "^0.12.66",
"phpunit/phpunit": "^7.5|^8.5|^9.4",
"vimeo/psalm": "^4.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Jean85\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alessandro Lai",
"email": "alessandro.lai85@gmail.com"
}
],
"description": "A library to get pretty versions strings of installed dependencies",
"keywords": [
"composer",
"package",
"release",
"versions"
],
"support": {
"issues": "https://github.com/Jean85/pretty-package-versions/issues",
"source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5"
},
"time": "2021-10-08T21:21:46+00:00"
},
{
"name": "mongodb/mongodb",
"version": "1.17.0",
"source": {
"type": "git",
"url": "https://github.com/mongodb/mongo-php-library.git",
"reference": "9d9c917cf7ff275ed6bd63c596efeb6e49fd0e53"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/9d9c917cf7ff275ed6bd63c596efeb6e49fd0e53",
"reference": "9d9c917cf7ff275ed6bd63c596efeb6e49fd0e53",
"shasum": ""
},
"require": {
"ext-hash": "*",
"ext-json": "*",
"ext-mongodb": "^1.17.0",
"jean85/pretty-package-versions": "^2.0.1",
"php": "^7.4 || ^8.0",
"psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php80": "^1.27",
"symfony/polyfill-php81": "^1.27"
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
"rector/rector": "^0.18",
"squizlabs/php_codesniffer": "^3.7",
"symfony/phpunit-bridge": "^5.2",
"vimeo/psalm": "^5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.17.x-dev"
}
},
"autoload": {
"files": [
"src/functions.php"
],
"psr-4": {
"MongoDB\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Andreas Braun",
"email": "andreas.braun@mongodb.com"
},
{
"name": "Jeremy Mikola",
"email": "jmikola@gmail.com"
},
{
"name": "Jérôme Tamarelle",
"email": "jerome.tamarelle@mongodb.com"
}
],
"description": "MongoDB driver library",
"homepage": "https://jira.mongodb.org/browse/PHPLIB",
"keywords": [
"database",
"driver",
"mongodb",
"persistence"
],
"support": {
"issues": "https://github.com/mongodb/mongo-php-library/issues",
"source": "https://github.com/mongodb/mongo-php-library/tree/1.17.0"
},
"time": "2023-11-15T09:21:50+00:00"
},
{
"name": "psr/log",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
"reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/3.0.0"
},
"time": "2021-07-14T16:46:02+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php81",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "c565ad1e63f30e7477fc40738343c62b40bc672d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d",
"reference": "c565ad1e63f30e7477fc40738343c62b40bc672d",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php81\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "zetacomponents/base",
"version": "1.9.4",
"source": {
"type": "git",
"url": "https://github.com/zetacomponents/Base.git",
"reference": "b6ae5f6177f6e51c5fc3514800e1c3fb076ec4be"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zetacomponents/Base/zipball/b6ae5f6177f6e51c5fc3514800e1c3fb076ec4be",
"reference": "b6ae5f6177f6e51c5fc3514800e1c3fb076ec4be",
"shasum": ""
},
"require-dev": {
"phpunit/php-invoker": "^2.0|^3.1",
"phpunit/phpunit": "~9.0",
"zetacomponents/coding-standard": "dev-main",
"zetacomponents/unit-test": "~1.2.3"
},
"type": "library",
"autoload": {
"classmap": [
"src"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Sergey Alexeev"
},
{
"name": "Sebastian Bergmann"
},
{
"name": "Jan Borsodi"
},
{
"name": "Raymond Bosman"
},
{
"name": "Frederik Holljen"
},
{
"name": "Kore Nordmann"
},
{
"name": "Derick Rethans"
},
{
"name": "Vadym Savchuk"
},
{
"name": "Tobias Schlitt"
},
{
"name": "Alexandru Stanoi"
}
],
"description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.",
"homepage": "https://github.com/zetacomponents",
"support": {
"issues": "https://github.com/zetacomponents/Base/issues",
"source": "https://github.com/zetacomponents/Base/tree/1.9.4"
},
"time": "2022-11-30T16:16:25+00:00"
},
{
"name": "zetacomponents/template",
"version": "1.5.3",
"source": {
"type": "git",
"url": "https://github.com/zetacomponents/Template.git",
"reference": "d5446832e56f4ffa52a98daadd02daeb164d1788"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zetacomponents/Template/zipball/d5446832e56f4ffa52a98daadd02daeb164d1788",
"reference": "d5446832e56f4ffa52a98daadd02daeb164d1788",
"shasum": ""
},
"require": {
"zetacomponents/base": "~1.8"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"squizlabs/php_codesniffer": "3.*",
"zetacomponents/database": "*",
"zetacomponents/template-translation-tiein": "^1.2",
"zetacomponents/translation": "*",
"zetacomponents/unit-test": "^1.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"classmap": [
"src"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Sergey Alexeev"
},
{
"name": "Sebastian Bergmann"
},
{
"name": "Jan Borsodi"
},
{
"name": "Raymond Bosman"
},
{
"name": "Frederik Holljen"
},
{
"name": "Kore Nordmann"
},
{
"name": "Derick Rethans"
},
{
"name": "Vadym Savchuk"
},
{
"name": "Tobias Schlitt"
},
{
"name": "Alexandru Stanoi"
}
],
"description": "A fully functional Templating system, supporting template compilation in different levels, user defined functions and operators, an optimizer, output escaping for different output handlers to prevent XSS and other security problems and a plug in system for extra functionality (such as a Translation system).",
"homepage": "https://github.com/zetacomponents",
"support": {
"issues": "https://github.com/zetacomponents/Template/issues",
"source": "https://github.com/zetacomponents/Template/tree/1.5.3"
},
"time": "2023-02-19T00:06:27+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.3.0"
}

View File

@@ -2,6 +2,7 @@
$presentationDir = 'presentations';
$baseDir = '/';
$showScript = 'show.php'; // In case you want to ForceType a shorter one
$showSpecialScript = 'show2.php';
$helpPage = 'help.php';
$baseFontSize = '12pt';
$flashFontScale = 18;

708
core.css Normal file
View File

@@ -0,0 +1,708 @@
body
{
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background: #d3d7cf;
overflow-x: hidden;
font-size: 125%;
}
div.twitter
{
visibility: hidden;
}
body.slide div.twitter
{
position: absolute;
right: 1em;
bottom: 2px;
visibility: visible;
}
.xlarge
{
font-size: 333%;
}
.large
{
font-size: 150%;
}
.large_center
{
font-size: 200%;
text-align: center;
}
.pre p
{
font-family: monospace;
white-space: pre;
}
div.whole-slide
{
width: 1024px;
}
div.title-slide
{
text-align: center;
font-family: Arial, sans-serif;
}
div.section-slide
{
font-size: 300%;
overflow: hidden;
}
div.section-slide div p
{
text-align: center;
color: #abdc45;
margin-top: 320px;
margin-bottom: 0px;
}
div.event-title
{
font-size: 2em;
margin-top: 2.5em;
margin-bottom: 1em;
}
div.event-date
{
font-size: 1.25em;
}
div.event-presenter
{
font-size: 1em;
}
pre
{
background: #eeeeec;
}
div.result pre
{
background: #ad7fa8;
}
div.result pre.xdebug-var-dump
{
background: #eeeeec;
}
div.result p
{
font-size: 100%;
}
ul.tiny
{
font-size: 50%;
}
ul.tiny li p strong
{
font-size: 150%;
}
div.slideCount
{
position: absolute;
width: 99%;
text-align: right;
right: 2em;
top: 0.2em;
font-size: small;
color: #aaa;
}
div.main div.article div.body, div.side div.body
{
border: solid 1px #babdb6;
background: #eeeeec;
}
div.articleListItem
{
padding-top: 3em;
}
div.articleListItem:first-child
{
padding-top: 0em;
}
p
{
font-family: serif;
margin-top: 0;
margin-bottom: 0.1em;
line-height: 110%;
font-size: 150%;
}
dd, dt
{
font-family: serif;
line-height: 140%;
}
li p
{
margin-bottom: 0.1em;
margin-top: 0.1em;
}
div.comment div.article div.body li p
{
margin-bottom: 0em;
margin-top: 0em;
padding-top: 0em;
padding-bottom: 0em;
}
div.comment div.article div.body ul
{
padding-bottom: 1em;
}
div.addComment p
{
font-family: sans-serif;
}
pre
{
margin: 0.5em;
border: solid 1px #babdb6;
overflow: auto;
}
p, pre, h1, h2, h3, h4, div.articleMetaData, div.commentMetaData, dl
{
padding: 0.25em;
}
div, ol, li, ul, table
{
margin: 0;
padding: 0;
}
li
{
margin-left: 2em;
}
h1
{
font-size: 166%;
color: #eeeeec;
background-color: #75507b;
}
h2
{
font-size: 125%;
color: #d3d7cf;
background-color: #75507b;
}
h3
{
font-size: 113%;
}
div.comment h1, div.comment h2
{
background-color: transparent;
color: #000;
}
div.addComment a
{
color: #000000;
}
h1 a
{
text-decoration: none;
background-color: #75507b;
color: #eeeeec;
}
h2 a, h3 a, h4 a
{
text-decoration: none;
color: #eeeeec;
}
h1, h2, h3, h4
{
margin-top: 0;
margin-bottom: 0.5em;
}
div.articleMetaData, div.commentMetaData
{
margin-top: 0.5em;
margin-bottom: 0.5em;
}
a
{
color: #5c3566;
}
a:hover, div.addComment a:hover
{
color: #75507b;
}
h1 a:hover
{
color: #d3d7cf;
}
div.commentList
{
clear: both;
}
div.commentListJoindin
{
margin-bottom: 2em;
}
div.comment, div.addComment
{
background-color: #ad7fa8;
margin-left: 1em;
margin-top: 0.5em;
margin-right: 0.5em;
}
div.previewComment div.article div.body div.comment
{
margin: 0.5em;
}
div.addComment form
{
background: #eeeeec;
border: 1px solid #cd9fc8;
margin-bottom: 1em;
}
div.location, div.commentName
{
font-weight: bold;
}
div.date
{
font-style: italic;
}
div.comment div.article div.body
{
border: 1px solid #cd9fc8;
}
img
{
text-align: center;
margin: 0 auto;
display: block;
}
p.attribution
{
text-align: center;
font-size: 50%;
margin-top: -16px;
color: white;
opacity: 0.5;
}
p.bgattribution {
text-align: center;
font-size: 50%;
margin-top: -16px;
color: black;
position: fixed;
bottom: 0px;
background: #ffffff;
opacity: 0.6;
}
img.inline
{
display: inline;
vertical-align: middle;
}
img.left
{
float: left;
margin: 0.5em 0.5em 0.5em 0;
}
img.right
{
float: right;
margin: 0.5em 0 0.5em 0.5em;
}
img.icon
{
display: inline;
border: 0;
}
div.addComment th
{
text-align: left;
}
div.addComment td, div.addComment th
{
vertical-align: top;
}
div.addComment table
{
padding-right: 1em;
}
div.addComment table, div.addComment td, div.addComment textarea
{
width: 100%;
}
div.addComment span.note
{
font-size: 75%;
color: #555753;
}
div.header
{
vertical-align: center;
}
div.header ul
{
position: relative;
left: 0.42em;
top: 3em;
}
div.header ul li
{
display: inline;
margin: 0.3em;
padding: 0em;
}
div.header ul li a
{
color: #eeeeec;
text-decoration: none;
font-size: 125%;
}
div.header ul li a:hover
{
text-decoration: underline;
}
div.footer
{
font-size: 75%;
padding: 0.5em;
text-align: center;
}
div.footer a
{
color: #eeeeec;
}
p.extend
{
text-align: right;
}
div#dopplr-blog-badge
{
margin: 0 auto;
padding-top: 2em;
padding-bottom: 2em;
}
ul.lifeline
{
list-style-type: none;
}
ul.lifeline li div div.source
{
color: #555753;
text-align: right;
}
ul.lifeline li
{
margin: 0.5em;
padding-top: 0.25em;
padding-bottom: 1em;
clear: both;
border-top: dashed 1px #888a85;
}
ul.lifeline li:first-child
{
border-top: none;
}
div.flickr div.center, div.center
{
text-align: center;
}
div.flickr div.center img
{
margin-top: 0.5em;
margin-bottom: 0.5em;
}
p.comment
{
margin: 0;
padding: 0;
}
span.hide
{
display: none;
}
div.commentErrors
{
background-color: #ef2929;
}
div.commentOk
{
background-color: #73d216;
}
div.validationMessage
{
margin-left: 1em;
border-right: solid 1px #babdb6;
background: #eeeeec;
}
div.validationMessage h1
{
margin-bottom: 0;
}
div.lines
{
padding: 1em 0;
}
div.line
{
font-family: monospace;
white-space: pre;
}
div.lineWithError
{
font-family: monospace;
white-space: pre;
background-color: #ef2929;
color: #eeeeec;
}
ul.errorMessages li
{
padding-top: 0.5em;
padding-bottom: 0.5em;
}
.footnote
{
vertical-align: super;
font-size: 80%;
}
ul.footnotes li p
{
display: inline;
}
code
{
margin: 0;
padding: 0 0.2em;
border: solid 1px #babdb6;
}
div.talk-comments
{
display: none;
}
div.rating
{
float: right;
}
p.extend
{
display: none;
}
table.xdebug-error
{
width: 100%;
margin: 0;
font-size: 150%;
font-family: serif;
text-align: left;
}
table.xdebug-error tr.yll th
{
background-color: #f57900;
color: black;
}
table.xdebug-error tr.tle th
{
background-color: #e9b96e;
color: black;
}
table.xdebug-error tr.hdr th
{
background-color: #eeeeec;
color: black;
}
.vim-export
{
color: #ffffff;
background-color: #000000;
overflow: auto;
white-space: nowrap;
font-size: 80%;
width: 80%;
margin: 0 auto;
}
div.center-page
{
font-size: 400%;
text-align: center;
}
div.quote-page
{
font-size: 250%;
text-align: center;
padding-top: 3em;
}
div.text-overlay
{
position: absolute;
top: 0px;
width: 100%;
}
div.text-overlay h1
{
font-size: 3em;
text-align: center;
opacity: 0.8;
}
div table
{
text-align: center;
width: 95%;
}
table
{
margin: 25px;
font-size: 24pt;
text-align: center;
border: solid 1px black;
}
table.columns
{
margin: 0.5em;
font-size: 1em;
text-align: left;
border: none;
width: 90%;
}
table.columns td
{
border: none;
}
table.columns tr
{
border: none;
}
table.leftalign td
{
text-align: left;
}
th
{
background: blue;
color: white;
}
th, td, tr
{
border: black;
border: solid 1px gray;
padding: 0px;
}
div.error
{
border: 1px solid white;
background-color: #f57900;
color: black;
}
div.error p
{
font-family: monospace !important;
}

294
derick.css Normal file
View File

@@ -0,0 +1,294 @@
body, h1, h2
{
background-color: #cbe6ac;
color: black;
font-size: 150%;
}
div.whole-slide
{
width: 90%;
margin: 0 auto;
}
body.agenda-slide, body.slide
{
background-color: #eeeeec;
text-align: left;
color: #222;
}
div.template-black
{
color: black;
}
div.agenda-slide h1, div.slide h1, div.slide h2
{
background-color: #eeeeec;
color: #222;
margin-bottom: 0.5em;
}
div.slide h2
{
font-size: 1.5em;
margin-top: -1.0em;
margin-bottom: 0.5em;
}
div.section-slide div p
{
color: #000;
font-weight: bold;
text-align: left;
margin: 1em;
text-shadow: -2px -2px 3px #fff, -1px -1px 1px #000
}
ul.noicon
{
list-style-type: none;
font-size: 75%;
}
ul ul li
{
font-size: 80%;
list-style-type: disc;
}
img.right
{
margin: 0em 2em 0em 0.5em;
}
h1
{
color: #abdc45;
margin-bottom: 0em;
font-family: "PT Sans", Arial;
font-size: 2em;
text-align: center;
}
h2
{
color: #abdc45;
margin-bottom: 0em;
text-align: center;
}
div.title-slide
{
color: black;
margin-left: 60px;
margin-right: 100px;
text-align: left;
}
div.template-white div.title-slide
{
color: #000;
}
div.template-draft::before
{
content: "DRAFT";
font-family: sans-serif;
position: fixed;
margin-left: auto;
left: 10%;
top: 30%;
font-size: 18em;
opacity: 0.15;
transform: rotate(-25deg);
}
pre.code, pre.xdebug-var-dump
{
color: #000;
background: #fff;
}
pre.xdebug-var-dump
{
font-size: 100%;
}
p
{
font-family: "PT Sans", Arial;
font-size: 1.75em;
}
div.event-title p
{
font-family: "PT Sans Caption", Arial;
font-weight: bold;
font-size: 180%;
padding: 0;
text-shadow: -2px -2px 3px #000, -1px -1px 1px #fff
}
div.event-presenter
{
font-size: 1.25em;
}
div.pres-url-small
{
font-size: 85%;
}
div.footer
{
border-top: 3px solid #3366ff;
width: 870px;
top: 585px;
position: absolute;
background-color: #013290;
clear: both;
padding-top: 50px;
}
div.footer-thanks
{
border-top: 3px solid #3366ff;
top: 620px;
position: absolute;
background-color: #013290;
clear: both;
padding-top: 20px;
width: 1024px;
}
div.big
{
font-size: 150%;
}
pre
{
font-size: 175%;
}
div.result pre {
background: none;
}
div.big-centre, div.quote
{
font-size: 200%;
text-align: center;
}
div.emoji
{
font-size: 800%;
text-align: center;
}
div.centre
{
text-align: center;
}
a
{
color: #000;
}
div.html
{
font-size: 80%;
color: #000;
background-color: #fff;
margin-left: 2em;
margin-right: 2em;
}
div.html a
{
color: #777;
}
table
{
font-size: 22pt;
}
table.two
{
font-size: 85%;
text-align: left;
}
table.big
{
font-size: 32pt;
text-align: left;
}
table.two tr, table.big tr
{
vertical-align: top;
}
pre.code strong
{
color: #f00;
}
div.float
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
table, td, tr
{
border: 0;
}
div.small
{
font-size: 80%;
}
div.medium pre
{
font-size: 125%;
}
div.small pre
{
font-size: 133%;
}
h1.style-center
{
text-align: center;
}
div.twitter
{
position: absolute;
right: 1em;
bottom: 2px;
visibility: visible;
}
tt
{
font-size: 125%;
}
@page {
margin: 0;
padding: 0;
size: 500mm 300mm;
}

View File

@@ -34,11 +34,13 @@
foreach($ps as $pres_id=>$filename) {
$fh = fopen($filename, "rb");
$p = new XML_Presentation($fh);
$p->setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_WARNING);
$check = $p->parse();
if ($p->isError($check)) {
continue;
}
$pres = $p->getObjects();
// Do we have a generated reveal.js version of this presentation?
@@ -90,6 +92,7 @@
if ($p->isError($check)) {
die("Could not parse index.xml, not sure what to do");
}
$pres = $p->getObjects();
$pres = $pres[1];
@@ -223,10 +226,13 @@ function cmp($a,$b) {
usort($pr,'cmp');
for($j=0; $j < $prnum; $j++) {
if(strtolower($pr[$j]['topic']) == strtolower($topic)) {
if(!$pr[$j]['generated']) {
echo "<tr><td class='index'><a href=\"$baseDir$showScript/{$pr[$j]['id']}\">{$pr[$j]['title']}</a></td><td class='index'>{$pr[$j]['date']}</td><td class='index'>{$pr[$j]['location']}</td><td class='index'>{$pr[$j]['speaker']}</td><td class='index'>{$pr[$j]['slidecount']}</td></tr>";
if (!$pr[$j]['generated']) {
if ($pr[$j]['speaker'] === 'Derick Rethans') {
echo "<tr><td class='index'><a href=\"$baseDir$showSpecialScript/{$pr[$j]['id']}\">{$pr[$j]['title']}</a></td><td class='index'>{$pr[$j]['date']}</td><td class='index'>{$pr[$j]['location']}</td><td class='index'>{$pr[$j]['speaker']}</td><td class='index'>{$pr[$j]['slidecount']}</td></tr>";
} else {
echo "<tr><td class='index'><a href=\"$baseDir$showScript/{$pr[$j]['id']}\">{$pr[$j]['title']}</a></td><td class='index'>{$pr[$j]['date']}</td><td class='index'>{$pr[$j]['location']}</td><td class='index'>{$pr[$j]['speaker']}</td><td class='index'>{$pr[$j]['slidecount']}</td></tr>";
}
} else {
echo "<tr><td class='index'><a href=\"$baseDir{$pr[$j]['generated']}\">{$pr[$j]['title']}</a></td><td class='index'>{$pr[$j]['date']}</td><td class='index'>{$pr[$j]['location']}</td><td class='index'>{$pr[$j]['speaker']}</td><td class='index'>{$pr[$j]['slidecount']}</td></tr>";

10364
jquery-3.3.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@ function _init_gettext() {
}
$tdom = textdomain('pres2');
$btex = bindtextdomain('pres2', PRES2_LOCALEDIR);
return ($loc !== false)
return ($loc !== false)
&& ($btex == realpath(PRES2_LOCALEDIR))
&& ($tdom == 'pres2');
}

3312
phpqrcode.php Normal file

File diff suppressed because it is too large Load Diff

51
pres2.js Normal file
View File

@@ -0,0 +1,51 @@
$(document).ready(function() {
$("*[class^='effect']").hide();
$("*[class^='effect-fade-out']").show();
});
function processNextEvent()
{
var effect = $("*[class^='effect']:first");
if (effect.length) {
var class = effect.attr('class');
if (class == 'effect-slide') {
$(effect).slideDown();
$(effect).removeClass(class);
} else if (class == 'effect-fade-in-out') {
$(effect).fadeIn( 250 );
$(effect).removeClass(class);
$(effect).addClass( 'effect-fade-out' );
} else if (class == 'effect-fade-out') {
$(effect).fadeOut( 250, function() { processNextEvent(); } );
$(effect).removeClass(class);
} else if (class == 'effect-fade-in') {
$(effect).fadeIn( 250 );
$(effect).removeClass(class);
} else if (class == 'effect-hide') {
$(effect).show();
$(effect).removeClass(class);
}
} else {
document.location = '/show2.php/profiling-4dev11/3';
}
}
function processPrevEvent()
{
document.location = '/show2.php/profiling-4dev11/1';
}
$('*').keypress(function(event) {
if (event.keyCode == '39') {
processNextEvent();
event.preventDefault();
}
if (event.keyCode == '37') {
processPrevEvent();
event.preventDefault();
}
});

6
qrcode.php Normal file
View File

@@ -0,0 +1,6 @@
<?php
header( 'Content-Type: image/png' );
include 'phpqrcode.php';
QRcode::png($_GET['d'], false, "M", 10, 2);
?>

237
show2.php Normal file
View File

@@ -0,0 +1,237 @@
<?php
require 'vendor/autoload.php';
class PresFormatter implements ezcTemplateCustomFunction
{
public static function getCustomFunctionDefinition( $name )
{
switch ( $name )
{
case 'format_text':
case 'has_attribute':
case 'get_attribute':
case 'replace_properties':
case 'run_code':
$def = new ezcTemplateCustomFunctionDefinition();
$def->class = __CLASS__;
$def->method = $name;
return $def;
}
}
static public function run_code( $code )
{
ob_start();
try
{
eval( "?>$code" );
}
catch( Exception $e )
{
// ignore
}
$val = ob_get_contents();
ob_clean();
return $val;
}
static public function format_text( $pres, $text )
{
$ret = $text;
# $ret = preg_replace('/\*([\S ]+?)([^\\\])\*/','<strong>\1\2</strong>',$str);
$ret = preg_replace('/#([[:alnum:]]+?)#/','&\1;',$ret);
$ret = preg_replace('/\b_([\S ]+?)_\b/','<u>\1</u>',$ret);
// blink
$ret = str_replace('\*',chr(1),$ret);
$ret = preg_replace('/\*\*([\S ]+?)\*\*/','<blink>\1</blink>',$ret);
$ret = str_replace(chr(1),'\*',$ret);
// bold
$ret = str_replace('\*',chr(1),$ret);
$ret = preg_replace('/\*([\S ]+?)\*/','<strong>\1</strong>',$ret);
$ret = str_replace(chr(1),'\*',$ret);
// strike
$ret = str_replace('\-\-\-',chr(1),$ret);
$ret = preg_replace('/\-\-\-([\S ]+?)\-\-\-/','<s>\1</s>',$ret);
$ret = str_replace(chr(1),'\-\-\-',$ret);
// italics
$ret = str_replace('\~',chr(1),$ret);
$ret = preg_replace('/~([\S ]+?)~/','<i>\1</i>',$ret);
$ret = str_replace(chr(1),'\~',$ret);
// monospace font
$ret = str_replace('\%',chr(1),$ret);
$ret = preg_replace('/%([\S ]+?)%/', '<tt>\1</tt>', $ret);
$ret = str_replace(chr(1),'%',$ret);
// Hack by arjen: allow more than one word to be coloured
$ret = preg_replace('/\|([0-9a-fA-F]+?)\|([\S ]+?)\|/','<span style="color: #\1">\2</span>',$ret);
$ret = preg_replace('/\^([[:alnum:]]+?)\^/','<sup>\1</sup>',$ret);
$ret = preg_replace('/\@([[:alnum:]]+?)\@/','<sub>\1</sub>',$ret);
// Quick hack by arjen: BR/ and TAB/ pseudotags from conversion
$ret = preg_replace('/BR\//','<BR/>',$ret);
$ret = preg_replace('/TAB\//',' ',$ret);
$ret = preg_replace('/([\\\])([*#_|^@%])/', '\2', $ret);
$ret = preg_replace_callback(
'/:-:(.*?):-:/',
function($matches) use ($pres) {
return $pres->{$matches[1]}; // Careful!
},
$ret
);
return $ret;
}
static public function replace_properties( $pres, $value )
{
$value = preg_replace_callback(
'/:-:(.*?):-:/',
function($matches) use ($pres) {
return $pres->{$matches[1]}; // Careful!
},
$value
);
return $value;
}
static public function get_attribute( $node, $attribute )
{
$attr_value = $node->getAttribute( $attribute );
return PresFormatter::replace_properties( $GLOBALS['pres'], $attr_value );
}
static public function has_attribute( $node, $attribute )
{
$attr_value = $node->hasAttribute( $attribute );
return $attr_value;
}
}
class PresRst implements ezcTemplateCustomFunction
{
public static function getCustomFunctionDefinition( $name )
{
switch ( $name )
{
case 'title':
$def = new ezcTemplateCustomFunctionDefinition();
$def->class = __CLASS__;
$def->method = $name;
return $def;
}
}
public function title( $text, $marker )
{
return $text . "\n" . str_repeat( $marker, strlen( $text ) ) . "\n\n";
}
}
$tc = ezcTemplateConfiguration::getInstance();
$tc->addExtension( 'PresFormatter' );
$tc->addExtension( 'PresRst' );
$base = $_SERVER['DOCUMENT_ROOT'] . '/presentations/';
@list( $dummy, $prest, $slideNr ) = explode( '/', $_SERVER['PATH_INFO'] );
if ( $slideNr === null || $slideNr === '' )
{
$slideNr = 0;
}
$pres = new Presentation( $prest );
if ( $slideNr === 'pdf' )
{
header( 'Content-type: text/plain' );
$pres->renderToRst( "/tmp/{$prest}.rst" );
}
else
{
echo $pres->display( $slideNr );
}
#[\AllowDynamicProperties]
class Presentation
{
private $properties;
public $slideFiles;
public $base;
public $presName;
public $css;
function __get( $name )
{
return $this->properties[$name];
}
function __construct( $pres )
{
$this->presName = $pres;
$presFile = $GLOBALS['base'] . $pres . '.xml';
$xml = simplexml_load_file( $presFile );
foreach (
array(
'title', 'event', 'location', 'date', 'speaker',
'email', 'url', 'joindin', 'twitter', 'mastodon',
'lat', 'lon',
) as $prop )
{
$this->properties[$prop] = (string) $xml->$prop;
}
$this->properties['talk_id'] = $pres;
$this->slideFiles = array();
foreach ( $xml->slide as $slide )
{
$this->slideFiles[] = (string) $slide;
}
// template configuration
$templateDir = 'default';
if ( isset( $xml['templatePath'] ) )
{
$templateDir = (string) $xml['templateDir'];
}
$this->css = array( "core.css" );
if ( isset( $xml['css'] ) )
{
$this->css[] = $xml['css'];
}
$tc = ezcTemplateConfiguration::getInstance();
$tc->templatePath = $GLOBALS['base'] . 'templates/' . $templateDir;
$tc->compilePath = '/tmp/template-cache';
}
function display( $slideNr )
{
$xml = new DomDocument;
$xml->load( $GLOBALS['base'] . $this->slideFiles[$slideNr] );
$parts = explode( '/', $this->slideFiles[$slideNr] );
$this->base = '/presentations/slides/' . join( '', array_slice( $parts, -2, 1 ) ) . '/';
$tpl = new ezcTemplate();
$tpl->send->node = $xml->documentElement;
$tpl->send->pres = $this;
$tpl->send->pres->forPdf = isset( $_GET['pdf'] );
$tpl->send->pres->pdfIndex = isset( $_GET['pdf'] ) ? (int) $_GET['pdf'] : 0;
$tpl->send->slideNr = $slideNr;
$tpl->send->css = $this->css;
echo $tpl->process( 'slide.ezt' );
}
function renderToRst( $filename )
{
$tpl = new ezcTemplate();
$tpl->send->pres = $this;
echo $tpl->process( 'rst/presentation.ezt' );
}
}

16
style-black.css Normal file
View File

@@ -0,0 +1,16 @@
body
{
background-color: black !important;
color: white !important;
}
h1 {
position: absolute;
background-color: rgba( 255, 255, 255, 0.8) !important;
width: 100%;
text-align: center;
}
img {
z-index: -4;
}

4
style-future.css Normal file
View File

@@ -0,0 +1,4 @@
h1
{
font-family: "SF Archery Black" !important;
}

44
style-imagebg.css Normal file
View File

@@ -0,0 +1,44 @@
body
{
background-color: black !important;
color: white !important;
}
div.whole-slide
{
width: 100% !important;
}
h1 {
position: fixed;
background-color: rgba( 255, 255, 255, 0.8) !important;
width: 100%;
text-align: center;
}
img {
position: absolute;
z-index: -4;
margin: 0;
padding: 0;
width: 1024px;
height: 767px;
}
div.center-blurb {
color: black;
background-color: rgba( 255, 255, 255, 0.6 );
margin: 0 auto;
width: 50%;
}
div.center-blurb-wide {
color: black;
background-color: rgba( 255, 255, 255, 0.6 );
margin: 0 auto;
width: 66%;
}
div.center-blurb div {
text-align: left;
}

4
style-past.css Normal file
View File

@@ -0,0 +1,4 @@
h1
{
font-family: "eufm10" !important;
}

43
style-title.css Normal file
View File

@@ -0,0 +1,43 @@
body
{
background-color: black !important;
color: white !important;
}
div.whole-slide
{
width: 100% !important;
}
h1 {
position: fixed;
top: 60%;
background-color: rgba( 255, 255, 255, 0.8) !important;
text-align: center;
width: 100%;
vertical-align: bottom;
}
img {
position: relative;
z-index: -4;
margin: 0;
padding: 0;
width: 100%;
height: 766px;
overflow-y: hidden;
}
p.attribution {
display: block;
position: absolute;
bottom: 0px;
background: white;
color: black;
right: 0px;
opacity: 0.6;
}
div {
position: relative;
}

19
style-white.css Normal file
View File

@@ -0,0 +1,19 @@
body
{
background-color: white !important;
}
h1 {
color: white !important;
background-color: rgba( 0, 0, 0, 0.6) !important;
text-align: center;
}
img {
position: absolute;
z-index: -4;
margin: 0;
padding: 0;
width: 1024px;
height: 767px;
}