From aaefd2917e397b3b0136173df3d5551dbc05e41e Mon Sep 17 00:00:00 2001 From: NOrtmann1 Date: Fri, 22 May 2026 14:26:35 +0200 Subject: [PATCH 001/164] Create article.php --- php/article/article.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 php/article/article.php diff --git a/php/article/article.php b/php/article/article.php new file mode 100644 index 0000000..e69de29 -- 2.47.3 From c41302d04686d8d74c7f98b2943681bf026fe49e Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Fri, 22 May 2026 17:09:20 +0200 Subject: [PATCH 002/164] Klassen article und articleDAO --- php/article/article.php | 0 php/model/article.php | 10 +++++++ php/model/articleDAO.php | 59 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) delete mode 100644 php/article/article.php create mode 100644 php/model/article.php create mode 100644 php/model/articleDAO.php diff --git a/php/article/article.php b/php/article/article.php deleted file mode 100644 index e69de29..0000000 diff --git a/php/model/article.php b/php/model/article.php new file mode 100644 index 0000000..656d22d --- /dev/null +++ b/php/model/article.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/php/model/articleDAO.php b/php/model/articleDAO.php new file mode 100644 index 0000000..568c950 --- /dev/null +++ b/php/model/articleDAO.php @@ -0,0 +1,59 @@ + \ No newline at end of file -- 2.47.3 From a1184299b1777c17e2b574647982bbdf1e7f5410 Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Tue, 26 May 2026 10:36:56 +0200 Subject: [PATCH 003/164] erste article-Implementation article-Interface & -Klasse + createArticle.php mit article.css (Editor) + neuer "Beitrag erstellen"-Button in Navbar --- content/createArticle.php | 36 ++++++++++++++ css/article.css | 99 +++++++++++++++++++++++++++++++++++++++ includes/navbar.php | 5 +- index.php | 1 + php/model/article.php | 47 ++++++++++++++++++- php/model/articleDAO.php | 3 ++ 6 files changed, 187 insertions(+), 4 deletions(-) create mode 100644 content/createArticle.php create mode 100644 css/article.css diff --git a/content/createArticle.php b/content/createArticle.php new file mode 100644 index 0000000..d447043 --- /dev/null +++ b/content/createArticle.php @@ -0,0 +1,36 @@ + +
+ +
+ + +
+ + + + +
diff --git a/css/article.css b/css/article.css new file mode 100644 index 0000000..5a859a7 --- /dev/null +++ b/css/article.css @@ -0,0 +1,99 @@ +/* editor in Flexbox */ +.wp-editor-scope.editor-container { + display: flex; + min-height: 100vh; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + color: #1e1e1e; + background-color: #f0f2f5; + box-sizing: border-box; +} + +.wp-editor-scope * { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +/* Hauptbereich */ +.wp-editor-scope .editor-main { + flex: 1; + padding: 40px; + display: flex; + flex-direction: column; + gap: 20px; + background: #ffffff; +} + +.wp-editor-scope #post-title { + font-size: 2.5rem; + font-weight: 700; + border: none; + outline: none; + width: 100%; + background: transparent; +} + +.wp-editor-scope #post-content { + flex: 1; + font-size: 1.1rem; + line-height: 1.6; + border: none; + outline: none; + resize: none; + width: 100%; + background: transparent; +} + +/* Seitenleiste */ +.wp-editor-scope .editor-sidebar { + width: 300px; + background-color: #ffffff; + border-left: 1px solid #e0e0e0; + padding: 20px; + display: flex; + flex-direction: column; + gap: 24px; +} + +.wp-editor-scope .sidebar-block { + display: flex; + flex-direction: column; + gap: 8px; +} + +.wp-editor-scope .sidebar-block label { + font-weight: 600; + font-size: 0.9rem; +} + +.wp-editor-scope .required { + color: #d94f4f; +} + +/* Formularelemente innerhalb der Editor-Sidebar */ +.wp-editor-scope .editor-sidebar select, +.wp-editor-scope .editor-sidebar input[type="text"] { + width: 100%; + padding: 8px; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 0.9rem; + background: #ffffff; +} + +/* Button-Zeugs */ +.wp-editor-scope .btn-publish { + background-color: #007cba; + color: white; + border: none; + padding: 12px; + border-radius: 4px; + font-weight: 600; + cursor: pointer; + font-size: 1rem; + width: 100%; +} + +.wp-editor-scope .btn-publish:hover { + background-color: #006ba1; +} diff --git a/includes/navbar.php b/includes/navbar.php index 564e929..2fa3bbb 100644 --- a/includes/navbar.php +++ b/includes/navbar.php @@ -126,7 +126,8 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden include_once 'search.php'; ?> - Anmelden - Registrieren + Anmelden + Registrieren + Beitrag erstellen \ No newline at end of file diff --git a/index.php b/index.php index 98209de..94f55a2 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,7 @@ + EduForge diff --git a/php/model/article.php b/php/model/article.php index 656d22d..1169464 100644 --- a/php/model/article.php +++ b/php/model/article.php @@ -1,10 +1,53 @@ $title, + "content" => $content, + "author" => $author, + "email" => $_POST["Email"], + "date" => date("d.m.Y, H:i") + ); + $newData = base64_encode(serialize($newData)); + if (!file_exists("articles.txt")) { + $newData = fopen("articles.txt", "xb"); + fclose($newData); + } + $previousData = file_get_contents("gaestebuch.txt"); + if (file_put_contents("gaestebuch.txt", "$newData\n$previousData")) { + // TODO: Vernünftige Rückmeldung implementieren. + echo "Artikel erfolgreich gespeichert!"; + } else { + // TODO: passende Exceptions werfen. + echo "Fehler!"; + } + } + + public function updateArticle($id, $title, $content, $author) + { + // TODO: Implement updateArticle() method. + } + + public function deleteArticle($id) + { + // TODO: Implement deleteArticle() method. + } + + public function getArticle($id) + { + // TODO: Implement getArticle() method. + } + + public function getAllArticles() + { + // TODO: Implement getAllArticles() method. + } } ?> \ No newline at end of file diff --git a/php/model/articleDAO.php b/php/model/articleDAO.php index 568c950..6d66256 100644 --- a/php/model/articleDAO.php +++ b/php/model/articleDAO.php @@ -1,4 +1,7 @@ Date: Tue, 26 May 2026 10:42:32 +0200 Subject: [PATCH 004/164] Update createArticle.php --- content/createArticle.php | 43 +++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/content/createArticle.php b/content/createArticle.php index d447043..3f63477 100644 --- a/content/createArticle.php +++ b/content/createArticle.php @@ -20,15 +20,50 @@ -- 2.47.3 From 365f37dcea72bf226879a8803cd77ebbb5b7060c Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Tue, 26 May 2026 10:47:03 +0200 Subject: [PATCH 005/164] =?UTF-8?q?responsive=20Design=20f=C3=BCr=20Smartp?= =?UTF-8?q?hones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/article.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/css/article.css b/css/article.css index 5a859a7..7879667 100644 --- a/css/article.css +++ b/css/article.css @@ -97,3 +97,27 @@ .wp-editor-scope .btn-publish:hover { background-color: #006ba1; } + +@media (max-width: 760px) { + .wp-editor-scope.editor-container { + /* Sidebar nach unten */ + flex-direction: column; + } + + .wp-editor-scope .editor-main { + /* weniger Innenabstand */ + padding: 20px; + } + + .wp-editor-scope #post-content { + /* Verhindert, dass das Textfeld auf kleinen Displays kollabiert */ + min-height: 300px; + } + + .wp-editor-scope .editor-sidebar { + width: 100%; + /* Entfernt den linken Rand und setzt ihn nach oben als Trenner */ + border-left: none; + border-top: 1px solid #e0e0e0; + } +} \ No newline at end of file -- 2.47.3 From f508a222c6ced93ff9fd6f8ad70b8cc55ee5cfae Mon Sep 17 00:00:00 2001 From: NOrtmann1 <145041949+NOrtmann1@users.noreply.github.com> Date: Tue, 26 May 2026 11:07:34 +0200 Subject: [PATCH 006/164] mobile-nav- "Beitrag erstellen" Button --- includes/navbar.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/navbar.php b/includes/navbar.php index 2fa3bbb..e151bb5 100644 --- a/includes/navbar.php +++ b/includes/navbar.php @@ -18,6 +18,7 @@ Globales Menü, wird via PHP später in alle Seiten eingebunden
  • Profil
  • Anmelden
  • Registrieren
  • +
  • Beitrag erstellen