improve CSS on workshop 5
This commit is contained in:
11
MVCtemplate-23-24/Views/index.phtml
Normal file
11
MVCtemplate-23-24/Views/index.phtml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php require('template/header.phtml') ?>
|
||||
|
||||
<h2>Welcome to the web-site </h2>
|
||||
|
||||
<h3>A template for web-site development using the <i>Model-View-Controller</i> design pattern and <a href="https://getbootstrap.com/docs/5.2/getting-started/introduction/"><i>Bootstrap</i></a>.</h3>
|
||||
<p>The <i>Views/template</i> directory contains a <i>header.phtml</i> and a <i>footer.phtml</i> which should be included on every new page generated.
|
||||
To add additional pages just edit the file <i>header.phtml</i> to add the extra link and then add a new <i>Controller (pageN.php)</i> and a new <i>View (pageN.phtml)</i>, for each page required.<p/>
|
||||
<p>The <i>Model</i> code files are placed in the <i>Models</i> directory.</p>
|
||||
<p>Do not change any of the css files in the <i>css</> directory!<p>
|
||||
|
||||
<?php require('template/footer.phtml') ?>
|
5
MVCtemplate-23-24/Views/page1.phtml
Normal file
5
MVCtemplate-23-24/Views/page1.phtml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php require('template/header.phtml') ?>
|
||||
|
||||
<h2>Welcome to Page1</h2>
|
||||
|
||||
<?php require('template/footer.phtml') ?>
|
15
MVCtemplate-23-24/Views/template/footer.phtml
Normal file
15
MVCtemplate-23-24/Views/template/footer.phtml
Normal file
@@ -0,0 +1,15 @@
|
||||
</main>
|
||||
|
||||
|
||||
<footer class="row">
|
||||
<div id="footer" class="col-xs-12">
|
||||
<p>Web-site development using the MVC design pattern and the Bootstrap CSS framework</p>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
43
MVCtemplate-23-24/Views/template/header.phtml
Normal file
43
MVCtemplate-23-24/Views/template/header.phtml
Normal file
@@ -0,0 +1,43 @@
|
||||
<!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">
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
|
||||
|
||||
<link href="./css/my-style.css" rel="stylesheet">
|
||||
|
||||
<title>Server-Side Programming - <?php echo $view->pageTitle; ?></title>
|
||||
</head>
|
||||
|
||||
<body role="document">
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div id="title" class="col-xs-12">
|
||||
<img src="../../images/new_uos_logo.jpg" alt="Salford University" />
|
||||
<div class="pull-right"> <h1><?php echo $view->pageTitle ?> </h1></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<nav id="menu" class="col-xs-6 col-sm-3 col-md-2">
|
||||
<h2>Menu</h2>
|
||||
<ul class="nav flex-column">
|
||||
<li><a href="./index.php">Home</a></li>
|
||||
<li><a href="./page1.php">Page1</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<main id="content" class="col-xs-6 col-sm-9 col-md-10">
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user