M home.php +9 -11
@@ 9,20 9,18 @@ require 'includes/app.php';
<?php include 'includes/site_header.php'; ?>
<main>
- <?php if ($content): ?>
- <?= $content ?>
- <?php else: ?>
- <h1><?= $site_user['name'] ?>'s site</h1>
- <p>Welcome to your site! Use the edit button to edit this page.</p>
- <?php endif; ?>
+<?php if ($content): ?>
+ <?= $content ?>
+<?php else: ?>
+ <h1><?= $site_user['name'] ?>'s site</h1>
+ <p>Welcome to your site! Use the edit button to edit this page.</p>
+<?php endif; ?>
</main>
<?php if (is_site_admin($site_user)): ?>
- <div class="admin">
- <nav>
- <a href="home_update.php">Edit</a>
- </nav>
- </div>
+ <nav class="page-admin">
+ <a href="home_update.php">Edit</a>
+ </nav>
<?php endif; ?>
<?php include 'includes/site_footer.php'; ?>
No newline at end of file
M +1 -1
@@ 1,5 1,5 @@
<?php if (is_site_admin($site_user)): ?>
<footer>
<footer class="site-admin">
<nav>
<a href="page_create.php">Add page</a>
<a href="settings.php">Settings</a>
M page.php +4 -6
@@ 41,12 41,10 @@ require 'includes/app.php';
<?php endif; ?>
<?php if ($page && is_site_admin($site_user)): ?>
- <div class="admin">
- <nav>
- <?= edit_link($slug) ?>
- <?= delete_link($slug) ?>
- </nav>
- </div>
+ <nav class="page-admin">
+ <?= edit_link($slug) ?>
+ <?= delete_link($slug) ?>
+ </nav>
<?php endif; ?>
<?php include 'includes/site_footer.php'; ?>
M page_update.php +3 -5
@@ 33,10 33,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST
</form>
</main>
-<div class="admin">
- <nav>
- <?= delete_link($slug) ?>
- </nav>
-</div>
+<nav class="page-admin">
+ <?= delete_link($slug) ?>
+</nav>
<?php include 'includes/site_footer.php'; ?>
M style.css +1 -1
@@ 39,7 39,7 @@ header {
padding: 10px;
}
-.admin {
+.page-admin {
padding: 10px;
background-color: powderblue;
margin-top: 2em;