updated templates

This commit is contained in:
Joshua Perry 2023-01-23 16:08:16 +00:00
parent 7139076879
commit 73aa07ef75
6 changed files with 42 additions and 12 deletions

View File

@ -0,0 +1,14 @@
<main class = "sidebar">
<section class="left">
<ul>
<?php require 'nav.html.php';?>
</ul>
</section>
<section class="right">
<h1> <?=$heading?> Jobs</h1>
<ul class="listing">
<?php require 'job.html.php';?>
</ul>
</section>
</main>

View File

@ -1,7 +1,7 @@
<p>Welcome to Jo's Jobs, we're a recruitment agency based in Northampton. We offer a range of different office jobs. Get in touch if you'd like to list a job with us.</a></p> <main class="home">
<h2>Select the type of job you are looking for:</h2> <p>Welcome to Jo's Jobs, we're a recruitment agency based in Northampton. We offer a range of different office jobs. Get in touch if you'd like to list a job with us.</a></p>
<ul> <h2>Select the type of job you are looking for:</h2>
<li><a href="?page=it">IT</a></li> <ul>
<li><a href="?page=hr">Human Resources</a></li> <?php require 'nav.html.php';?>
<li><a href="?page=sales">Sales</a></li> </ul>
</ul> </main>

12
templates/job.html.php Normal file
View File

@ -0,0 +1,12 @@
<ul>
<?php foreach ($jobs as $job) { ?>
<li>
<div class="details">
<h2><?=$job->title?></h2>
<h3><?=$job->salary?></h2>
<p><?=nl2br($job->description)?></p>
<a class="more" href="/apply.php">Apply for this job</a>
</div>
</li>
<?php } ?>
</ul>

View File

@ -21,18 +21,14 @@
<li><a href="/">Home</a></li> <li><a href="/">Home</a></li>
<li>Jobs <li>Jobs
<ul> <ul>
<li><a href="?page=it">IT</a></li> <?php require 'nav.html.php'?>
<li><a href="?page=hr">Human Resources</a></li>
<li><a href="?page=sales">Sales</a></li>
</ul> </ul>
</li> </li>
<li><a href="?page=about">About Us</a></li> <li><a href="?page=about">About Us</a></li>
</ul> </ul>
</nav> </nav>
<img src="../images/randombanner.php"/> <img src="../images/randombanner.php"/>
<main class="home">
<?=$content;?> <?=$content;?>
</main>
<footer> <footer>
&copy; Jo's Jobs <?=date('Y');?> &copy; Jo's Jobs <?=date('Y');?>
</footer> </footer>

5
templates/nav.html.php Normal file
View File

@ -0,0 +1,5 @@
<?php foreach($cats as $cat) { ?>
<li>
<a href="/jobs/category?page=<?=urlencode($cat->name)?>"><?=$cat->name?></a>
</li>
<?php } ?>

View File

@ -0,0 +1,3 @@
<main class="home">
<P>The page you have requested has not been found</p>
</main>