flexday/layout.php

78 lines
2.5 KiB
PHP

<?php
// layout.php (Tailwind version)
//require_once 'auth.php';
include_once("peter_db.php");
$peter_db = new peter_db();
$c = $peter_db -> getConnection();
require_once('single_sign_on.php');
require_once('semester.php');
if (!isset($MY_TITLE)) $MY_TITLE = "Untitled Page";
if (!isset($MY_CRUMB)) $MY_CRUMB = $MY_TITLE;
if (!isset($CONTENT)) $CONTENT = "<p>No content provided.</p>";
$MY_PATH = $_SERVER['PHP_SELF'];
$MOD_DATE = file_exists(__FILE__) ? date("F d Y H:i.", filemtime(__FILE__)) : "(unknown)";
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= htmlspecialchars($MY_TITLE) ?> | Gavilan Intranet</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="js/vue27max.js"></script>
<script src="js/intranet_libs.js"/></script>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body class="bg-gray-100 min-h-screen">
<div class="max-w-7xl mx-auto p-4">
<!-- Breadcrumb -->
<nav class="text-sm text-gray-600 mb-4">
<?= $CRUMB_START . htmlspecialchars($MY_CRUMB) ?>
</nav>
<!-- Full page content container -->
<div class="max-w-7xl mx-auto p-4 grid md:grid-cols-[200px_1fr] gap-6">
<!-- Desktop Navigation -->
<?php include 'nav.php'; ?>
<!-- Main content area -->
<main>
<h1 class="text-2xl font-bold text-gray-800 mb-4"><?= htmlspecialchars($MY_TITLE) ?></h1>
<div id="dir_editor">
<?= $CONTENT ?>
</div>
</main>
<footer class="mt-12 text-sm text-gray-500 border-t pt-4">
<p>
Please send comments or questions to
<a class="text-blue-600 hover:underline" href="mailto:phowell@gavilan.edu">phowell@gavilan.edu</a><br>
Page: <a class="text-blue-600 hover:underline" href="https://<?= $server ?><?= htmlspecialchars($MY_PATH) ?>">
https://<?= $server ?><?= htmlspecialchars($MY_PATH) ?>
</a><br>
Last updated on <?= $MOD_DATE ?>
</p>
</footer>
</div>
<!-- Mobile Navigation -->
<?php include 'nav-mobile.php'; ?>
</div>
<div id="alert" class="fixed top-4 right-4 bg-yellow-100 border border-yellow-300 text-yellow-800 px-4 py-2 rounded shadow-md hidden">
Alert message
</div>
<br /> &nbsp;
<br /> &nbsp;
<br /> &nbsp;
<script src="js/intranet_libs_bottom.js"/></script>
<script src="js/dir_app.js"></script>
<script src="<?= $XTRAJS ?>"></script>
</body>
</html>