Skip to content

Commit

Permalink
adds heart beat and removes debug reporting for php
Browse files Browse the repository at this point in the history
  • Loading branch information
moaath committed Jun 10, 2024
1 parent 8270cae commit a5b5229
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 7 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# TODOs

## php part
* make the heart icon beat ;)
* Make CSS a bit better

## python part
Expand Down
21 changes: 20 additions & 1 deletion service/www/check_response.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,30 @@
<title>check response</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles/match.css">
<style>
#heart {
animation: 1.5s ease 0s infinite beat;
}

@keyframes beat {

0%,
50%,
100% {
transform: scale(1, 1);
}

30%,
80% {
transform: scale(0.92, 0.95);
}
}
</style>
</head>
<body>
<div class="text-center">
<a href="index.php">
<img class="mb-4" src="/images/logo.png" alt="" width="72" height="72">
<img class="mb-4" src="/images/logo.png" id="heart" alt="" width="72" height="72">
</a>
<h2>Match with your fav Person!</h2>
<p class="lead">Submit your information and a punchline to your crush and see what they will say!</p>
Expand Down
1 change: 1 addition & 0 deletions service/www/config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
error_reporting(0);
define('DB_SERVER', 'db');
define('DB_USERNAME', 'date');
define('DB_PASSWORD', 'somepassword');
Expand Down
20 changes: 19 additions & 1 deletion service/www/dashboard.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
session_start();
error_reporting(0);
require_once 'config.php';

if (isset($_SESSION["user_id"])) {
Expand Down Expand Up @@ -48,6 +49,23 @@ function getAllUserProfiles($conn)
.table-container {
margin: auto;
}
#heart {
animation: 1.5s ease 0s infinite beat;
}

@keyframes beat {

0%,
50%,
100% {
transform: scale(1, 1);
}

30%,
80% {
transform: scale(0.92, 0.95);
}
}
</style>
</head>

Expand All @@ -67,7 +85,7 @@ function getAllUserProfiles($conn)

<main role="main" class="inner cover">
<a href="index.php">
<img class="mb-4" src="/images/logo.png" alt="" width="72" height="72">
<img class="mb-4" src="/images/logo.png" id="heart" alt="" width="72" height="72">
</a>
<h1 class="cover-heading">List of users</h1>
<div class="table-responsive table-container">
Expand Down
22 changes: 21 additions & 1 deletion service/www/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
session_start();
error_reporting(0);
require_once 'config.php';

if (isset($_SESSION["user_id"])) {
Expand All @@ -23,6 +24,25 @@
<title>ImagiDate</title>
<link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="styles/index.css" rel="stylesheet">
<style>
#heart {
animation: 1.5s ease 0s infinite beat;
}

@keyframes beat {

0%,
50%,
100% {
transform: scale(1, 1);
}

30%,
80% {
transform: scale(0.92, 0.95);
}
}
</style>
</head>

<body class="text-center">
Expand All @@ -47,7 +67,7 @@

<main role="main" class="inner cover">
<a href="index.php">
<img class="mb-4" src="/images/logo.png" alt="" width="144" height="144">
<img class="mb-4" src="/images/logo.png" alt="" id="heart" width="144" height="144">
</a>
<h1 class="cover-heading">Welcome to ImagiDate!</h1>
<p class="lead">Here you can finally get to date your fav fictional character! What are you waiting for? go
Expand Down
22 changes: 21 additions & 1 deletion service/www/login.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
session_start();
error_reporting(0);
require_once 'config.php';

if ($_SERVER["REQUEST_METHOD"] == "POST") {
Expand Down Expand Up @@ -36,12 +37,31 @@
<title>Login</title>
<link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<link href="styles/login.css" rel="stylesheet">
<style>
#heart {
animation: 1.5s ease 0s infinite beat;
}

@keyframes beat {

0%,
50%,
100% {
transform: scale(1, 1);
}

30%,
80% {
transform: scale(0.92, 0.95);
}
}
</style>
</head>

<body class="text-center">
<form class="form-signin" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
<a href="index.php">
<img class="mb-4" src="/images/logo.png" alt="" width="72" height="72">
<img class="mb-4" src="/images/logo.png" id="heart" alt="" width="72" height="72">
</a>
<h1 class="h3 mb-3 font-weight-normal">Login</h1>
<label for="username" class="sr-only">Username</label>
Expand Down
1 change: 1 addition & 0 deletions service/www/logout.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
error_reporting(0);
session_start();
session_destroy();
header("Location: login.php");
Expand Down
21 changes: 20 additions & 1 deletion service/www/match.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,30 @@ function yaml_dump(array $data){
<title>match</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles/match.css">
<style>
#heart {
animation: 1.5s ease 0s infinite beat;
}

@keyframes beat {

0%,
50%,
100% {
transform: scale(1, 1);
}

30%,
80% {
transform: scale(0.92, 0.95);
}
}
</style>
</head>
<body>
<div class="text-center">
<a href="index.php">
<img class="mb-4" src="/images/logo.png" alt="" width="72" height="72">
<img class="mb-4" src="/images/logo.png" id="heart" alt="" width="72" height="72">
</a>
<h2>Match with your fav Person!</h2>
<p class="lead">Submit your information and a punchline to your crush and see what they will say!</p>
Expand Down
1 change: 1 addition & 0 deletions service/www/profile.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
session_start();
error_reporting(0);
require_once "config.php";

if (!isset($_SESSION["user_id"])) {
Expand Down
21 changes: 20 additions & 1 deletion service/www/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,30 @@
<link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<link rel="stylesheet" href="styles/register.css">
<title>User Registration</title>
<style>
#heart {
animation: 1.5s ease 0s infinite beat;
}

@keyframes beat {

0%,
50%,
100% {
transform: scale(1, 1);
}

30%,
80% {
transform: scale(0.92, 0.95);
}
}
</style>
</head>
<body class="text-center">
<form class="form-signup" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
<a href="index.php">
<img class="mb-4" src="/images/logo.png" alt="" width="72" height="72">
<img class="mb-4" src="/images/logo.png" id="heart" alt="" width="72" height="72">
</a>
<h1 class="h3 mb-3 font-weight-normal">Register</h1>
<label for="username" class="sr-only">Username</label>
Expand Down
1 change: 1 addition & 0 deletions service/www/upload.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
session_start();
error_reporting(0);

if (!isset($_SESSION["user_id"])) {
header("Location: login.php");
Expand Down

0 comments on commit a5b5229

Please sign in to comment.