diff options
Made dashboard posts use the new template
3 files changed, 25 insertions, 97 deletions
| -rw-r--r-- | src/views/dashboard.php | 36 | ||||
| -rw-r--r-- | src/views/edits.html | 17 | ||||
| -rw-r--r-- | src/views/index.html | 69 |
diff --git a/src/views/dashboard.php b/src/views/dashboard.php index 06be539..fe7a021 100644 --- a/src/views/dashboard.php +++ b/src/views/dashboard.php @@ -1,17 +1,27 @@ +<ul class="jobs-listing"> <?php foreach($jobs as $job) { - echo "{$job->id} {$job->title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary} - <form method=\"post\"> - <input type=\"hidden\" name=\"_method\" value=\"get\"> - <input type=\"hidden\" name=\"jobId\" value=\"{$job->id}\"> - <input type=\"submit\" value=\"Edit\"> - </form> - <form method=\"post\"> - <input type=\"hidden\" name=\"_method\" value=\"delete\"> - <input type=\"hidden\" name=\"jobId\" value=\"{$job->id}\"> - <input type=\"submit\" value=\"Delete\"> - </form> - <br>"; + echo '<li class="job-card"> + <div class="job-primary"> + <h2 class="job-title"><a href="#">' . $job->title . '</a></h2> + <div class="job-meta"> + <a class="meta-company" href="#">' . self::$companies[$job->companyId] . '</a> + <span class="meta-date">' . round($job->salary, 2) . ' lev/month</span> + </div> + </div> + <div class="job-edit"> + <form method="post"> + <input type="hidden" name="_method" value="get"> + <input type="hidden" name="jobId" value="' . $job->id . '"> + <input type="submit" value="Edit" class="anchor-btn"> + </form> + <form method="post"> + <input type="hidden" name="_method" value="delete"> + <input type="hidden" name="jobId" value="' . $job->id . '"> + <input type="submit" value="Delete" class="anchor-btn"> + </form> + </div> + </li>'; } ?> -<a href="/">< Back</a> +</ul> diff --git a/src/views/edits.html b/src/views/edits.html index 92323d2..c9dc9a3 100644 --- a/src/views/edits.html +++ b/src/views/edits.html @@ -16,21 +16,8 @@ <h1 class="site-title"><a href="#">Job Offers</a></h1> </header> - <ul class="jobs-listing"> - <li class="job-card"> - <div class="job-primary"> - <h2 class="job-title"><a href="#">Front End Developer</a></h2> - <div class="job-meta"> - <a class="meta-company" href="#">Company Awesome Ltd.</a> - <span class="meta-date">Posted 14 days ago</span> - </div> - </div> - <div class="job-edit"> - <a href="#">Edit</a> - <a href="#">Delete</a> - </div> - </li> + <li class="job-card"> <div class="job-primary"> <h2 class="job-title"><a href="#">Front End Developer</a></h2> @@ -70,4 +57,4 @@ </div> </body> -</html>
\ No newline at end of file +</html> diff --git a/src/views/index.html b/src/views/index.html deleted file mode 100644 index c71e268..0000000 --- a/src/views/index.html +++ /dev/null @@ -1,69 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Jobs</title> - <link rel="preconnect" href="https://fonts.gstatic.com"> - - <link rel="stylesheet" href="./css/master.css"> - <link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet"> -</head> -<body> - <div class="site-wrapper"> - <header class="site-header"> - <h1 class="site-title"><a href="#">Job Offers</a></h1> - </header> - - <ul class="jobs-listing"> - <li class="job-card"> - <div class="job-primary"> - <h2 class="job-title"><a href="#">Front End Developer</a></h2> - <div class="job-meta"> - <a class="meta-company" href="#">Company Awesome Ltd.</a> - <span class="meta-date">Posted 14 days ago</span> - </div> - <div class="job-details"> - <span class="job-location">The Hague (The Netherlands)</span> - <span class="job-type">Contract staff</span> - </div> - </div> - <div class="job-logo"> - <div class="job-logo-box"> - <img src="https://i.imgur.com/ZbILm3F.png" alt=""> - </div> - </div> - </li> - - <li class="job-card"> - <div class="job-primary"> - <h2 class="job-title"><a href="#">Front End Developer</a></h2> - <div class="job-meta"> - <a class="meta-company" href="#">Company Awesome Ltd.</a> - <span class="meta-date">Posted 14 days ago</span> - </div> - <div class="job-details"> - <span class="job-location">The Hague (The Netherlands)</span> - <span class="job-type">Contract staff</span> - </div> - </div> - <div class="job-logo"> - <div class="job-logo-box"> - <img src="https://i.imgur.com/ZbILm3F.png" alt=""> - </div> - </div> - </li> - </ul> - - <footer class="site-footer"> - <p>Copyright 2020 | Developer links: - <a href="/edits.html">Edits</a>, - <a href="/index.html">Home</a>, - <a href="/single.html">Single</a> - </p> - </footer> - </div> - -</body> -</html>
\ No newline at end of file |
