diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..accf4b2 Binary files /dev/null and b/.DS_Store differ diff --git a/composer.json b/composer.json index 8d8c008..7f408b7 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { "require": { - "twig/twig": "^3.0" + "twig/twig": "^3.5" } } diff --git a/composer.lock b/composer.lock index 4b80c43..a2bc381 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6a6772df2521c6860a448e9115f2793a", + "content-hash": "371cfc453eaacca81446019cafa74691", "packages": [ { "name": "symfony/polyfill-ctype", diff --git a/styles/dashboard.css b/css/dashboard.css similarity index 100% rename from styles/dashboard.css rename to css/dashboard.css diff --git a/styles/elements_custom.css b/css/elements_custom.css similarity index 100% rename from styles/elements_custom.css rename to css/elements_custom.css diff --git a/styles/events.css b/css/events.css similarity index 100% rename from styles/events.css rename to css/events.css diff --git a/styles/events_custom.css b/css/events_custom.css similarity index 100% rename from styles/events_custom.css rename to css/events_custom.css diff --git a/styles/home.css b/css/home.css similarity index 100% rename from styles/home.css rename to css/home.css diff --git a/styles/kontakt.css b/css/kontakt.css similarity index 100% rename from styles/kontakt.css rename to css/kontakt.css diff --git a/styles/main.css b/css/main.css similarity index 100% rename from styles/main.css rename to css/main.css diff --git a/elements/footer.html b/elements/footer.html deleted file mode 100644 index 6440473..0000000 --- a/elements/footer.html +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/elements/nav.html b/elements/nav.html deleted file mode 100644 index ee528ee..0000000 --- a/elements/nav.html +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/index.php b/index.php index 01f9c87..2b7bf6c 100644 --- a/index.php +++ b/index.php @@ -1,12 +1,44 @@ './compilation_cache/', - ]); +require __DIR__ . '/vendor/autoload.php'; - if (isset($_GET["page"]) && $_GET["page"] != "") { - echo $twig->render('page.html', ['title' => $_GET["page"]]); +use Twig\Environment; +use Twig\Loader\FilesystemLoader; + +$pageloader = new FilesystemLoader(__DIR__ . '/pages'); +$templateloader = new FilesystemLoader(__DIR__ . '/templates'); +$twig_pages = new Environment($pageloader); +$twig_templates = new Environment($templateloader); + +$title = ''; +$content = ''; +$csspath = ''; + +$topictreff = $twig_templates->render('topictreff.html.twig'); +$nextevents = $twig_templates->render('nextevents.html.twig'); + +$raumstatus = 'unbekannt'; + +if(isset($_GET['page'])) { + $page = $_GET['page']; + switch ($page) { + case 'index': + $title = 'index'; + $content = $twig_pages->render('index.html.twig', ['raumstatus' => 'unbekannt']); + break; + default: + $content = $twig_pages->render('404.html.twig', ['page' => $_GET['page']]); + break; } -?> \ No newline at end of file +} else { + $title = 'index'; + $content = $twig_pages->render('index.html.twig', ['raumstatus' => 'unbekannt']); +} + +$twig_templates->render('top.html.twig', ['title' => $title, 'csspath' => $csspath]); + +echo $content; + +$twig_templates->render('bottom.html.twig'); + +?> diff --git a/pages/404.html.twig b/pages/404.html.twig new file mode 100644 index 0000000..ee8dc80 --- /dev/null +++ b/pages/404.html.twig @@ -0,0 +1 @@ +

404 Page {{ page }} not found!

\ No newline at end of file diff --git a/pages/about.html b/pages/about.html.twig similarity index 100% rename from pages/about.html rename to pages/about.html.twig diff --git a/pages/datenschutz.html b/pages/datenschutz.html.twig similarity index 100% rename from pages/datenschutz.html rename to pages/datenschutz.html.twig diff --git a/pages/event.html b/pages/event.html.twig similarity index 100% rename from pages/event.html rename to pages/event.html.twig diff --git a/pages/events.html b/pages/events.html.twig similarity index 100% rename from pages/events.html rename to pages/events.html.twig diff --git a/pages/impressum.html b/pages/impressum.html.twig similarity index 100% rename from pages/impressum.html rename to pages/impressum.html.twig diff --git a/pages/index.html b/pages/index.html.twig similarity index 53% rename from pages/index.html rename to pages/index.html.twig index adecf1d..bd6c9b7 100644 --- a/pages/index.html +++ b/pages/index.html.twig @@ -1,25 +1,3 @@ - - - - - - - - ctdo - home - - - - - - -
Rundgang
- -
- ctdo logo - !NAV -
- -
@@ -29,26 +7,18 @@
- !RAUMSTATUS +

Raumstatus: {{ raumstatus }}

Hi

Wir sind eine bunt gemischte Gruppe aus computer-, technikbegeisterten und kreativen Menschen. Wir betreiben den Chaostreff aus Spaß an der Sache und um interessierten Menschen eine Plattform zu bieten, über die man sich austauschen kann.

- Wenn du Lust hast dir das mal anzuschauen, dann komm gerne vorbei. zeiten & location
+ Wenn du Lust hast dir das mal anzuschauen, dann komm gerne vorbei. zeiten & location

Egal wer du bist, egal was du machst bei uns sind alle Menschen willkommen. Leider sind unsere Räume aktuell nicht barrierefrei. - Falls du Fragen hast schreibe uns an. kontakt
+ Falls du Fragen hast schreibe uns an. kontakt

- Wenn du mehr über uns wissen möchtest, schau hier: über uns + Wenn du mehr über uns wissen möchtest, schau hier: über uns

-

Die nächsten Events

- !TOPICTREFF - !NEXTEVENTS -
- - - \ No newline at end of file +

Die nächsten Events

\ No newline at end of file diff --git a/pages/kontakt.html b/pages/kontakt.html.twig similarity index 100% rename from pages/kontakt.html rename to pages/kontakt.html.twig diff --git a/pages/kontakt/adresse.html b/pages/kontakt/adresse.html.twig similarity index 100% rename from pages/kontakt/adresse.html rename to pages/kontakt/adresse.html.twig diff --git a/pages/kontakt/irc.html b/pages/kontakt/irc.html.twig similarity index 100% rename from pages/kontakt/irc.html rename to pages/kontakt/irc.html.twig diff --git a/pages/kontakt/mail.html b/pages/kontakt/mail.html.twig similarity index 100% rename from pages/kontakt/mail.html rename to pages/kontakt/mail.html.twig diff --git a/pages/kontakt/tel.html b/pages/kontakt/tel.html.twig similarity index 100% rename from pages/kontakt/tel.html rename to pages/kontakt/tel.html.twig diff --git a/pages/support.html b/pages/support.html.twig similarity index 100% rename from pages/support.html rename to pages/support.html.twig diff --git a/pages/treff.html b/pages/treff.html.twig similarity index 100% rename from pages/treff.html rename to pages/treff.html.twig diff --git a/pages/verein.html b/pages/verein.html.twig similarity index 100% rename from pages/verein.html rename to pages/verein.html.twig diff --git a/php/generator.php b/php/generator.php deleted file mode 100644 index dbf6e05..0000000 --- a/php/generator.php +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/php/raumstatus.php b/php/raumstatus.php deleted file mode 100644 index 754a987..0000000 --- a/php/raumstatus.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/php/topictreff.php b/php/topictreff.php deleted file mode 100644 index e69de29..0000000 diff --git a/templates/bottom.html.twig b/templates/bottom.html.twig new file mode 100644 index 0000000..d466ab2 --- /dev/null +++ b/templates/bottom.html.twig @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/templates/event.html b/templates/event.html deleted file mode 100644 index eccd33e..0000000 --- a/templates/event.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - ctdo - {{ title }} - - - - - - - -
Rundgang
- -
- ctdo logo - {{ nav }} -
- -
-

{{ title }}

- {{ content }} -
- - - - \ No newline at end of file diff --git a/templates/nextevents.html.twig b/templates/nextevents.html.twig new file mode 100644 index 0000000..2ab6af2 --- /dev/null +++ b/templates/nextevents.html.twig @@ -0,0 +1 @@ + nextevents \ No newline at end of file diff --git a/templates/page.html b/templates/page.html deleted file mode 100644 index 0e7c039..0000000 --- a/templates/page.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - ctdo - {{ title }} - - - - - - -
Rundgang
- -
- ctdo logo - {{ nav }} -
- -
-

{{ title }}

- {{ content }} -
- - - - \ No newline at end of file diff --git a/templates/top.html.twig b/templates/top.html.twig new file mode 100644 index 0000000..593c2cf --- /dev/null +++ b/templates/top.html.twig @@ -0,0 +1,31 @@ + + + + + + + + ctdo - {{ title }} + + + + + +
Rundgang
+ +
+ ctdo logo + +
+ +
diff --git a/templates/topictreff.html.twig b/templates/topictreff.html.twig new file mode 100644 index 0000000..f595525 --- /dev/null +++ b/templates/topictreff.html.twig @@ -0,0 +1 @@ + topictreff \ No newline at end of file diff --git a/vendor/.DS_Store b/vendor/.DS_Store new file mode 100644 index 0000000..4d7ddbf Binary files /dev/null and b/vendor/.DS_Store differ diff --git a/vendor/autoload.php b/vendor/autoload.php index 9b912f0..d54ca61 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitf2ee1f9d8036c28086d9e9f2f204db28::getLoader(); +return ComposerAutoloaderInitce41dc6e38789c9f43c485905030864d::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 5e0273b..a6c3e5c 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitf2ee1f9d8036c28086d9e9f2f204db28 +class ComposerAutoloaderInitce41dc6e38789c9f43c485905030864d { private static $loader; @@ -24,16 +24,16 @@ class ComposerAutoloaderInitf2ee1f9d8036c28086d9e9f2f204db28 require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInitf2ee1f9d8036c28086d9e9f2f204db28', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitce41dc6e38789c9f43c485905030864d', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInitf2ee1f9d8036c28086d9e9f2f204db28', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitce41dc6e38789c9f43c485905030864d', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitce41dc6e38789c9f43c485905030864d::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitce41dc6e38789c9f43c485905030864d::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 724b970..7979c91 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28 +class ComposerStaticInitce41dc6e38789c9f43c485905030864d { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', @@ -45,9 +45,9 @@ class ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitf2ee1f9d8036c28086d9e9f2f204db28::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitce41dc6e38789c9f43c485905030864d::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitce41dc6e38789c9f43c485905030864d::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitce41dc6e38789c9f43c485905030864d::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index f927512..8fc3929 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => '__root__', - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => 'b8f36a8eb43f5717fe9982dba2a852d772b17266', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,9 +11,9 @@ ), 'versions' => array( '__root__' => array( - 'pretty_version' => 'dev-master', - 'version' => 'dev-master', - 'reference' => 'b8f36a8eb43f5717fe9982dba2a852d772b17266', + 'pretty_version' => '1.0.0+no-version-set', + 'version' => '1.0.0.0', + 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/symfony/.DS_Store b/vendor/symfony/.DS_Store new file mode 100644 index 0000000..c959231 Binary files /dev/null and b/vendor/symfony/.DS_Store differ