Added: favicon, Dashboard, Habits list, some styles, dashboard redirect
This commit is contained in:
22
public/css/dashboard.css
Normal file
22
public/css/dashboard.css
Normal file
@ -0,0 +1,22 @@
|
||||
.dashboard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100vw;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: var(--clr-secondary);
|
||||
border-radius: var(--border-radious);
|
||||
border: var(--borderWidth-thin) solid var(--clr-border);
|
||||
min-width: 17rem;
|
||||
padding: 1rem;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
.signin {
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -10,19 +10,17 @@ body {
|
||||
background-color: var(--clr-secondary);
|
||||
}
|
||||
|
||||
.signin .header-form {
|
||||
.form .header-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.signin .header-form img {
|
||||
.form .header-form img {
|
||||
height: 5rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.signin form {
|
||||
.form form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
@ -32,7 +30,8 @@ body {
|
||||
border: var(--borderWidth-thin) solid var(--clr-border);
|
||||
}
|
||||
|
||||
.signin form input {
|
||||
.form form input,
|
||||
select {
|
||||
background-color: var(--clr-secondary);
|
||||
caret-color: white;
|
||||
color: white;
|
||||
@ -42,12 +41,12 @@ body {
|
||||
width: 15rem;
|
||||
}
|
||||
|
||||
.signin form input[type="submit"] {
|
||||
.form form input[type="submit"] {
|
||||
background-color: var(--clr-green);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.signin .error {
|
||||
.form .error {
|
||||
width: 17rem;
|
||||
padding: 1rem;
|
||||
background-color: var(--clr-danger-muted);
|
||||
@ -57,6 +56,6 @@ body {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.signin small.error {
|
||||
.form small.error {
|
||||
width: 15rem;
|
||||
}
|
@ -3,18 +3,30 @@
|
||||
body {
|
||||
font-family: "Open Sans", serif;
|
||||
background-color: var(--clr-primary);
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
a,
|
||||
p,
|
||||
label,
|
||||
h1 {
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
a,
|
||||
p,
|
||||
label,
|
||||
div {
|
||||
font-size: 14px;
|
||||
h1 {
|
||||
margin-top: .5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.btn-primary,
|
||||
.btn-danger {
|
||||
background-color: var(--clr-green);
|
||||
padding: .5rem;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
border-radius: var(--border-radious);
|
||||
border: var(--borderWidth-thin) solid var(--clr-border);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-color: var(--clr-danger-muted) !important;
|
||||
border: var(--borderWidth-thin) solid var(--clr-border-danger);
|
||||
}
|
||||
|
21
public/css/habits_create.css
Normal file
21
public/css/habits_create.css
Normal file
@ -0,0 +1,21 @@
|
||||
.form form .dow_chb_wrapper input[type="checkbox"] {
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.form form .dow_chb_wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#lbl_dow {
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
#lbl_dom {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
#custom-frequency {
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
26
public/css/habits_dashboard.css
Normal file
26
public/css/habits_dashboard.css
Normal file
@ -0,0 +1,26 @@
|
||||
.habits h1 {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.habits table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.habits table th,
|
||||
.habits table td {
|
||||
border: 1px solid #ccc;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.habits a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.habits a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
BIN
public/img/favicon.ico
Normal file
BIN
public/img/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
@ -24,8 +24,11 @@ require_once models . 'Habit.php';
|
||||
|
||||
// Initialize router
|
||||
$router = new Router();
|
||||
$router->add('/', 'HomeController@index');
|
||||
$router->add('/home', 'HomeController@home');
|
||||
if(!$_SESSION['user']) {
|
||||
$router->add('/', 'HomeController@index');
|
||||
} else {
|
||||
$router->add('/', 'DashboardController@reroute', ['RequireAuth']);
|
||||
}
|
||||
|
||||
// auth routes
|
||||
$router->group('/auth', [], function ($router) {
|
||||
@ -35,7 +38,7 @@ $router->group('/auth', [], function ($router) {
|
||||
});
|
||||
|
||||
// dashboard route
|
||||
$router->add('/dashboard', 'HomeController@dashboard', ['RequireAuth']);
|
||||
$router->add('/dashboard', 'DashboardController@index', ['RequireAuth']);
|
||||
|
||||
// habits routes
|
||||
$router->group('/habits', ['RequireAuth'], function ($router) {
|
||||
|
Reference in New Issue
Block a user