design-patterns/public/index.php

80 lines
2.3 KiB
PHP

<?php
$time_start = microtime(true);
require '../vendor/autoload.php';
require '../src/helpers.php';
?><!doctype html>
<html lang="uk">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Патерни</title>
<link rel="stylesheet" href="/assets/css/agate.min.css">
<script src="/assets/js/highlight.min.js"></script>
<script src="/assets/js/stylus.min.js"></script>
<style>
html, body {
position: relative;
width: 100%;
height: 100dvh;
margin: 0;
padding: 0;
background: #e0e5e5;
color: #1c1b19;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
main {
box-sizing: border-box;
box-shadow: -1px 1px 5px 0 rgba(123, 123, 123, 1);
-webkit-box-shadow: -1px 1px 5px 0 rgba(123, 123, 123, 1);
-moz-box-shadow: -1px 1px 5px 0 rgba(123, 123, 123, 1);
position: absolute;
width: 100%;
max-width: 1280px;
margin: 0 auto;
outline: dotted 1px #a9a49f;
padding: 1rem;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-height: 92dvh;
overflow-y: auto;
background-color: attr(data-color type(<color>), #eef0f0);
}
pre, code {
font-family: Consolas, monospace;
font-size: 1.125rem;
}
pre {
align-self: center;
}
img.diagram {
max-width: 100%;
}
.et {
position: absolute;
top: .5rem;
left: .5rem;
font-size: small;
font-weight: 500;
color: #333;
}
</style>
</head>
<body>
<main data-color="#eef0f0">
<?php require '../src/router.php' ?>
</main>
<div class="et">ET: <?= (microtime(true) - $time_start) ?> secs</div>
<script>hljs.highlightAll()</script>
</body>
</html>