summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-03-29 05:07:28 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-03-29 05:07:28 +0300
commita16d070c4f8301a8b68220aca6d3573705be9025 (patch)
tree588529ec92de8c19eacf9ddfbe5f2a534c52c374
parent5ce005a4f120c7470cd84c1af306b64c52e3dbfc (diff)
downloadclassroom-backoffice.tar.gz
classroom-backoffice.tar.bz2
classroom-backoffice.zip
user's setup-account pages (work in progress)backofficeauthentication
-rw-r--r--html/app/config/app_constants.php2
-rw-r--r--html/app/routes/frontend.php5
-rw-r--r--html/app/views/components/user-management.php33
-rw-r--r--html/app/views/error/404.php2
-rw-r--r--html/app/views/error/general.php2
-rw-r--r--html/app/views/user/login.php (renamed from html/app/views/login.php)33
-rw-r--r--html/app/views/user/new-password.php65
-rw-r--r--html/app/views/user/register.php75
-rw-r--r--html/assets/css/overides.css21
-rw-r--r--sceleton.txt40
10 files changed, 262 insertions, 16 deletions
diff --git a/html/app/config/app_constants.php b/html/app/config/app_constants.php
index b5fb6d8..3c8d4c3 100644
--- a/html/app/config/app_constants.php
+++ b/html/app/config/app_constants.php
@@ -1,5 +1,7 @@
<?php
+define('SITE_TITLE', 'Classroom');
+
// DEFAULT VALUES //////////////////////////////////////////////////////////////
// -----------------------------------------------------------------------------
diff --git a/html/app/routes/frontend.php b/html/app/routes/frontend.php
index 7bd1ee8..4feda62 100644
--- a/html/app/routes/frontend.php
+++ b/html/app/routes/frontend.php
@@ -15,11 +15,12 @@ Route::add('/', function() { // echo 'Welcome!'; });
// ---
Route::notFound( function() {
header("HTTP/1.0 404 Not Found");
- render_view('error/404', ['message' => 'nobody knows it (but you got a secret smile;)']);
+ Render::view('error/404', ['message' => 'nobody knows it (but you got a secret smile;)']);
}); // 404
-Route::add('/login', function() { Render::view('login'); });
+Route::add('/login', function() { Render::view('user/login'); });
+Route::add('/register', function() { Render::view('user/register'); });
Route::add('/login-check', function() {
$user = new Classroom_user();
diff --git a/html/app/views/components/user-management.php b/html/app/views/components/user-management.php
new file mode 100644
index 0000000..dd38396
--- /dev/null
+++ b/html/app/views/components/user-management.php
@@ -0,0 +1,33 @@
+<div class="user">
+
+ <div class="btn-group js-visitor">
+ <button type="button" class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
+ <i class="fa-regular fa-user"></i>
+ Διαχείριση Λογαριασμού
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a href="/login">Είσοδος</a></li>
+ <li role="separator" class="divider"></li>
+ <li><a href="/register">Εγγραφή</a></li>
+ <li><a href="/reset-password">Επαναφορά password</a></li>
+ </ul>
+ </div>
+
+ <div class="btn-group js-subscriber">
+ <button type="button" class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
+ Διαχείριση Λογαριασμού <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ <li><a href="/profile">Διαχείριση Προφίλ</a></li>
+ <li><a href="/courses">Ύλη μαθημάτων</a></li>
+ <li><a href="/payments">Πληρωμές</a></li>
+ <li role="separator" class="divider"></li>
+ <li><a href="/logout">Έξοδος</a></li>
+ </ul>
+ </div>
+
+</div>
+
+
+
diff --git a/html/app/views/error/404.php b/html/app/views/error/404.php
index 30fe206..f594860 100644
--- a/html/app/views/error/404.php
+++ b/html/app/views/error/404.php
@@ -8,7 +8,7 @@
html,body{
padding:0; margin:0;
font-size:1.25em; font-family: Arial, Helvetica, Ubuntu, sans-serif;
- color: #037; background: #f3f4f5;
+ color: #037; background: #eee;
line-height:1.2em;
}
h3 {
diff --git a/html/app/views/error/general.php b/html/app/views/error/general.php
index 82a1d6e..d6649de 100644
--- a/html/app/views/error/general.php
+++ b/html/app/views/error/general.php
@@ -8,7 +8,7 @@
html,body{
padding:0; margin:0;
font-size:1.25em; font-family: Arial, Helvetica, Ubuntu, sans-serif;
- color: #037; background: #f3f4f5;
+ color: #037; background: #eee;
line-height:1.2em;
}
h3 {
diff --git a/html/app/views/login.php b/html/app/views/user/login.php
index e7f9c3e..2cf3290 100644
--- a/html/app/views/login.php
+++ b/html/app/views/user/login.php
@@ -2,15 +2,21 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>404: Not Found</title>
+ <title><?=SITE_TITLE?> - Είσοδος Χρήστη</title>
+
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
+ <link href="/assets/css/overides.css" rel="stylesheet">
+
<style>
html,body{
padding:0; margin:0;
- font-size:1.25em; font-family: Ubuntu, Arial, Helvetica, sans-serif;
- color: #037; background: #f3f4f5;
+ font-size:1.25em;
+ color: #037; background: #eee;
line-height:1.2em;
}
h3 {
@@ -23,28 +29,31 @@
}
.container { display: flex; height: 100vh; align-items:center; }
.content { position: relative;
- max-width:640px; width: 100%;
+ max-width:480px; width: 100%;
margin: auto auto; padding: 1.5em;
- text-align: center; justify-center: center;
- opacity: .33;
+ justify-center: center;
+ background: #ddd;
+ border-radius: 8px;
+ box-shadow: 1px 5px 7px #7777;
}
</style>
</head>
-<body>
+<body class="classroom">
<div class='container'>
<div class='content'>
- <h2>Login</h2>
+ <h4>Είσοδος Χρήστη</h4>
<hr />
<form method="post" action="/login-check">
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email</label>
- <input type="email" class="form-control" id="exampleInputEmail1" name="email" aria-describedby="emailHelp">
+ <input type="email" class="form-control form-control-sm" name="email" aria-describedby="emailHelp" required>
</div>
<div class="mb-3">
- <label for="exampleInputPassword1" class="form-label">Password</label>
- <input type="password" class="form-control" id="exampleInputPassword1" name="password">
+ <label for="exampleInputPassword1" class="form-label">Κωδικός Πρόσβασης</label>
+ <input type="password" class="form-control form-control-sm" name="password" required>
</div>
- <button type="submit" class="btn btn-primary">Submit</button>
+ <br />
+ <button type="submit" class="btn btn-primary btn-sm col-12">Επιβεβαίωση και Είσοδος</button>
</form>
</div>
</div>
diff --git a/html/app/views/user/new-password.php b/html/app/views/user/new-password.php
new file mode 100644
index 0000000..955cffb
--- /dev/null
+++ b/html/app/views/user/new-password.php
@@ -0,0 +1,65 @@
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title><?=SITE_TITLE?> - Επαναφορά κωδικού πρόσβασης</title>
+
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400&display=swap" rel="stylesheet">
+
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
+
+ <link href="/assets/css/overides.css" rel="stylesheet">
+
+ <style>
+ html,body{
+ padding:0; margin:0;
+ font-size:1.25em;
+ color: #037; background: #eee;
+ line-height:1.2em;
+ }
+ h3 {
+ font-size: 2em; font-style: normal;
+ font-weight: 400;
+ color: #05a;
+ margin: 0; padding: 5px;
+ opacity: 0.27;
+ border-bottom: 1px solid #05a;
+ }
+ .container { display: flex; height: 100vh; align-items:center; }
+ .content { position: relative;
+ max-width:480px; width: 100%;
+ margin: auto auto; padding: 1.5em;
+ justify-center: center;
+ background: #ddd;
+ border-radius: 8px;
+ box-shadow: 1px 5px 7px #7777;
+ }
+ </style>
+</head>
+<body class="classroom">
+ <div class='container'>
+ <div class='content'>
+ <h4>Επαναφορά κωδικού πρόσβασης</h4>
+ <hr />
+ <form method="post" action="/login-check">
+ <div class="mb-3">
+ <label for="name" class="form-label">Κωδικός μίας χρήσης</label>
+ <input type="text" class="form-control form-control-sm" name="name" required>
+ </div>
+ <div class="mb-3">
+ <label for="exampleInputPassword1" class="form-label">Νέος κωδικός πρόσβασης</label>
+ <input type="password" class="form-control form-control-sm" name="password" required>
+ </div>
+ <div class="mb-3">
+ <label for="exampleInputPassword2" class="form-label">Επιβεβαίωση κωδικού πρόσβασης</label>
+ <input type="password" class="form-control form-control-sm" name="password2" required>
+ </div>
+ <br />
+ <button type="submit" class="btn btn-primary btn-sm col-12">Επιβεβαίωση και Είσοδος</button>
+ </form>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/html/app/views/user/register.php b/html/app/views/user/register.php
new file mode 100644
index 0000000..97724a6
--- /dev/null
+++ b/html/app/views/user/register.php
@@ -0,0 +1,75 @@
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title><?=SITE_TITLE?> - Εγγραφή</title>
+
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400&display=swap" rel="stylesheet">
+
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
+
+ <link href="/assets/css/overides.css" rel="stylesheet">
+
+ <style>
+ html,body{
+ padding:0; margin:0;
+ font-size:1.25em;
+ color: #037; background: #eee;
+ line-height:1.2em;
+ }
+ h3 {
+ font-size: 2em; font-style: normal;
+ font-weight: 400;
+ color: #05a;
+ margin: 0; padding: 5px;
+ opacity: 0.27;
+ border-bottom: 1px solid #05a;
+ }
+ .container { display: flex; height: 100vh; align-items:center; }
+ .content { position: relative;
+ max-width:480px; width: 100%;
+ margin: auto auto; padding: 1.5em;
+ justify-center: center;
+ background: #ddd;
+ border-radius: 8px;
+ box-shadow: 1px 5px 7px #7777;
+ }
+ </style>
+</head>
+<body class="classroom">
+ <div class='container'>
+ <div class='content'>
+ <h4>Εγγραφή</h4>
+ <hr />
+ <form method="post" action="/login-check">
+ <div>
+ <div class="mb-3">
+ <label for="name" class="form-label">Όνομα</label>
+ <input type="text" class="form-control form-control-sm" name="name" required>
+ </div>
+ <div class="mb-3">
+ <label for="surname" class="form-label">Επίθετο</label>
+ <input type="text" class="form-control form-control-sm" name="surname" required>
+ </div>
+ <div class="mb-3">
+ <label for="exampleInputEmail1" class="form-label">Email</label>
+ <input type="email" class="form-control form-control-sm" name="email" aria-describedby="emailHelp" rerquired>
+ </div>
+ <div class="mb-3">
+ <label for="exampleInputPassword1" class="form-label">Κωδικός Πρόσβασης</label>
+ <input type="password" class="form-control form-control-sm" name="password" required>
+ </div>
+ <div class="mb-3">
+ <label for="exampleInputPassword2" class="form-label">Επιβεβαίωση Κωδικού Πρόσβασης</label>
+ <input type="password" class="form-control form-control-sm" name="password2" required>
+ </div>
+ <br />
+ <button type="submit" class="btn btn-primary btn-sm col-12">Εγγραφή</button>
+ </div>
+ </form>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/html/assets/css/overides.css b/html/assets/css/overides.css
index 2019468..7c68ad7 100644
--- a/html/assets/css/overides.css
+++ b/html/assets/css/overides.css
@@ -1,4 +1,20 @@
+html, body { font-family: "Roboto Slab", serif; font-weight: 400; }
+
+.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { font-weight: 400; };
+
+.content { text-align: unset; }
+
+.form-control,
+.btn-default { border: 1px solid #7777; }
+
+.form-label { font-size: .72em; color: var(--bs-heading-color); }
+
+
+
+
+
+
/* main.min.css */
.product__img {
/* max-width: 320px; */
@@ -16,3 +32,8 @@
/* color: #4d4d4d; */
color: #bbb7;
}
+
+
+:root {
+ --bs-heading-color: #679;
+}
diff --git a/sceleton.txt b/sceleton.txt
index 55ba5ba..0e7bb5e 100644
--- a/sceleton.txt
+++ b/sceleton.txt
@@ -37,3 +37,43 @@
+ add category
+ write lesson
+
+
+---
+
++ login
+
++ register
+
++ reset-password
+
++ confirm
+ -> get: token = mp5( otp + email )
+ -> post: otp
+
+
++ welcome
+ -> last free chapters
+ -> course tree
+
+
++ course
+ -> course tree
+
++ chapter
+ -> course tree
+ -> chapter content
+
++ admin-bar
+ -> chapters
+ -> courses
+ -> media
+ -> new-chapter
+
+
++ admin-profile
+ -> payments
+ -> profile
+ ->
+
+