From c48917ff1c4f4145e5e7a1915a6f9d1f34654ed9 Mon Sep 17 00:00:00 2001 From: xoy Date: Thu, 13 Apr 2023 18:44:38 +0200 Subject: [PATCH] =?UTF-8?q?=C3=84nderung=20der=20Projektstruktur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes composer.json | 2 +- composer.lock | 2 +- {styles => css}/dashboard.css | 0 {styles => css}/elements_custom.css | 0 {styles => css}/events.css | 0 {styles => css}/events_custom.css | 0 {styles => css}/home.css | 0 {styles => css}/kontakt.css | 0 {styles => css}/main.css | 0 elements/footer.html | 6 --- elements/nav.html | 11 ---- index.php | 48 +++++++++++++++--- pages/404.html.twig | 1 + pages/{about.html => about.html.twig} | 0 ...datenschutz.html => datenschutz.html.twig} | 0 pages/{event.html => event.html.twig} | 0 pages/{events.html => events.html.twig} | 0 pages/{impressum.html => impressum.html.twig} | 0 pages/{index.html => index.html.twig} | 40 ++------------- pages/{kontakt.html => kontakt.html.twig} | 0 .../{adresse.html => adresse.html.twig} | 0 pages/kontakt/{irc.html => irc.html.twig} | 0 pages/kontakt/{mail.html => mail.html.twig} | 0 pages/kontakt/{tel.html => tel.html.twig} | 0 pages/{support.html => support.html.twig} | 0 pages/{treff.html => treff.html.twig} | 0 pages/{verein.html => verein.html.twig} | 0 php/generator.php | 7 --- php/raumstatus.php | 5 -- php/topictreff.php | 0 templates/bottom.html.twig | 12 +++++ templates/event.html | 32 ------------ templates/nextevents.html.twig | 1 + templates/page.html | 31 ----------- templates/top.html.twig | 31 +++++++++++ templates/topictreff.html.twig | 1 + vendor/.DS_Store | Bin 0 -> 6148 bytes vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 ++-- vendor/composer/autoload_static.php | 8 +-- vendor/composer/installed.php | 12 ++--- vendor/symfony/.DS_Store | Bin 0 -> 6148 bytes 43 files changed, 109 insertions(+), 153 deletions(-) create mode 100644 .DS_Store rename {styles => css}/dashboard.css (100%) rename {styles => css}/elements_custom.css (100%) rename {styles => css}/events.css (100%) rename {styles => css}/events_custom.css (100%) rename {styles => css}/home.css (100%) rename {styles => css}/kontakt.css (100%) rename {styles => css}/main.css (100%) delete mode 100644 elements/footer.html delete mode 100644 elements/nav.html create mode 100644 pages/404.html.twig rename pages/{about.html => about.html.twig} (100%) rename pages/{datenschutz.html => datenschutz.html.twig} (100%) rename pages/{event.html => event.html.twig} (100%) rename pages/{events.html => events.html.twig} (100%) rename pages/{impressum.html => impressum.html.twig} (100%) rename pages/{index.html => index.html.twig} (53%) rename pages/{kontakt.html => kontakt.html.twig} (100%) rename pages/kontakt/{adresse.html => adresse.html.twig} (100%) rename pages/kontakt/{irc.html => irc.html.twig} (100%) rename pages/kontakt/{mail.html => mail.html.twig} (100%) rename pages/kontakt/{tel.html => tel.html.twig} (100%) rename pages/{support.html => support.html.twig} (100%) rename pages/{treff.html => treff.html.twig} (100%) rename pages/{verein.html => verein.html.twig} (100%) delete mode 100644 php/generator.php delete mode 100644 php/raumstatus.php delete mode 100644 php/topictreff.php create mode 100644 templates/bottom.html.twig delete mode 100644 templates/event.html create mode 100644 templates/nextevents.html.twig delete mode 100644 templates/page.html create mode 100644 templates/top.html.twig create mode 100644 templates/topictreff.html.twig create mode 100644 vendor/.DS_Store create mode 100644 vendor/symfony/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..accf4b2fdef0adeac9cf645088ea66a462fb5442 GIT binary patch literal 6148 zcmeHKF;2rk5Znz$ibRu=@+wNC{NRYp3-W;|L<&fWoC5mmcn(FL5Wc{FnB6^)Ei051 zFe~kiZ+FLMPvP~7h%R0>bCH>dOyP#|YRlLxZ$7d~jWj^Dd+fIJZM)ueYsBy{<>vJ9emBf-e#{>pd(U>c0+mJur~nn90#x8%DuAAC zHoXeuN(HC@75G-bz7Gj*m@Ae*|8!vS5ddhv@ou>GSpt|W0L&FjAR;ggDln*8M+^-* z;;Gi&Q%}}9p{SpZc=B@59LSXlP=TQW7qOjL|G$Tyng53*?x+A2_)`jK z(=OWuUa9uh(aTw{P4E@`%TVj(SiBVjy%l3)t@yfEm+Tt(T(JZ?9dV}v`6FPu(5S#~ GDDVk!^e9OH literal 0 HcmV?d00001 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 -
- -
- !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 -
-
- !FOOTERNAV -
- - \ 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 }} -
- -
- {{ footer }} -
- - \ 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 }} -
- -
- {{ footer }} -
- - \ 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 0000000000000000000000000000000000000000..4d7ddbfd895d5085c35c62841dd0d5ec650d027f GIT binary patch literal 6148 zcmeHK%}T^T49?WTRutTu9{U0w`UZ8WccCw^?5?gt>lFX@))({U#e;9-1Ndb!RHyBN z2N973GT$_lH0jsU%n*^8-LEpDDG?=5#%LGAi10e=Kq7D12O4(|OSg1RH`O{T2i|J< ziwy9)OK3@!YHBcc?{8`AMhbp@8}q4cQ7kIEaBD;l$L}vE<9@4e`8AhW+2u56oO*(4 zHmK_YbzRejzp77#s9$RV}c#T%n^9t&T=3Gxqcl1bCv<@nnREJ;JdNn+GUb@)Y z2H6MeLEZy?NEKy38Bhj(oB{M~mSj&*M`b`6PzE{%`2UbX8FP=Vp!;=Ta7O@O46_r= z-JS)QvH_TTYz1L~7zqVRsPRV(BjK>8-Y@sq3Q9N`ml^l*nTregister(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 0000000000000000000000000000000000000000..c959231b64001dd60df074dcaf0786eb26cdab91 GIT binary patch literal 6148 zcmeHKQA)!=5S^+0s0dQ=$Irb$k=`Jdc!FL)(rOhF6SNBc}feA8WYh7O>l6Cu0v#9T1y6|kwuPs+|V86_)TchvUbH^ zWI*ojm?|o9YcI5Ye{0Muy3SYA`JyZ;J^cCSKKr6f(=0DD*va0{laIHH{XWZY`&75v z=ZeQW>4>ACj2>xC4|p^0Y1N2^Ur%we9$q_Q>gCxPSr5-feEg1sx;O*QfHUx83?OHV zjE)q&cLtmRXJEsCd>;auU}9J+#!m;jSONftP)EU7Y6;I;c&zu2g;9oJo z!*rg`5R&EAR&bJQ1KJguh}hMN8y5^>Du%73;xn`;&<7a+6T?~&8i@Z9h%|WT4E!ns EUyYS!IsgCw literal 0 HcmV?d00001