diff --git a/CSS/Block/header.css b/CSS/Block/header.css index 54ac0e9..03ae75e 100644 --- a/CSS/Block/header.css +++ b/CSS/Block/header.css @@ -35,29 +35,4 @@ nav li a { nav li a:hover { background-color: orange; -} - -#metanavi { - color: #4d4d4d; - font-weight: bold; - margin-bottom: 5px; -} - -#metanavi a { - background: #09add0; - border: none; - width: 100px; - margin: 0 5px 0 5px; - float: right; - padding: 2px; - border-radius: 5px; - color:#fff; - cursor:pointer; - font-size: 12px; - text-decoration: none; - text-align: center; -} - -#metanavi a:hover { - background: orange; } \ No newline at end of file diff --git a/CSS/Element/button.css b/CSS/Element/button.css new file mode 100644 index 0000000..13914dd --- /dev/null +++ b/CSS/Element/button.css @@ -0,0 +1,9 @@ +.btn{ + background: var(--brand-primary); + color: var(--brand-white); + padding: 5px 10px; + font-weight: var(--font-weight-semibold); + font-size: var(--font-size-text); + border-radius: 3px; + text-decoration: none; +} \ No newline at end of file diff --git a/CSS/Element/logo.scss b/CSS/Element/logo.css similarity index 100% rename from CSS/Element/logo.scss rename to CSS/Element/logo.css diff --git a/CSS/style.css b/CSS/style.css index 641e880..0b6549c 100644 --- a/CSS/style.css +++ b/CSS/style.css @@ -1,7 +1,8 @@ @import url(variables.css); @import url(Block/header.css); @import url(Block/footer.css); -@import url(Element/logo.scss); +@import url(Element/logo.css); +@import url(Element/button.css); *, *:before, *:after { -moz-box-sizing: border-box; diff --git a/CSS/variables.css b/CSS/variables.css index 9192d74..af9c0e0 100644 --- a/CSS/variables.css +++ b/CSS/variables.css @@ -7,7 +7,7 @@ --input-placeholder: #998E82; /*Fonts*/ - --font-family-main: font-family: "Inter", sans-serif; + --font-family-main: "Inter", sans-serif; --font-family-headline: "Source Serif 4", serif; /* Font-size*/ diff --git a/Controller/UserController.php b/Controller/UserController.php new file mode 100644 index 0000000..ed2a3c5 --- /dev/null +++ b/Controller/UserController.php @@ -0,0 +1,27 @@ + "Name", "email" => "E-Mail-Adresse", "content" => "Nachricht"); + + public function __construct($view){ + $this->db = new UserModel(); + $this->view = $view; + } + + public function showUserForm(){ + + } + + + public function register(){ + $this->db->createUser($this->labels); + } +} \ No newline at end of file diff --git a/Model/UserModel.php b/Model/UserModel.php new file mode 100644 index 0000000..3abd03c --- /dev/null +++ b/Model/UserModel.php @@ -0,0 +1,47 @@ +createUUID(); + + $pdo = $this->linkDB(); + + $sql = "INSERT INTO users (`id`,`vorname`,`name`,`email`,`passwort`,`salt`,`role`) + VALUES (:guid, :name, :lastname, :email, :password, :salt, :role)"; + + try { + $sth = $pdo->prepare($sql); + $sth->execute(array + (":guid" => $guid, + (":name") => $values["name"], + ":lastname" => $values["lastname"], + ":email" => $values["email"], + ":password" => $hash, + ":salt" => $salt, + ":role" => $values["role"] + )); + } catch (PDOException $e) { + new \Blog\Library\ErrorMsg("Fehler beim Schreiben der Daten.", $e); + die; + } + + return true; + } + +} \ No newline at end of file diff --git a/Views/User/showUserForm.phtml b/Views/User/showUserForm.phtml new file mode 100644 index 0000000..3d9c837 --- /dev/null +++ b/Views/User/showUserForm.phtml @@ -0,0 +1,34 @@ + + +