Skip to content

Commit 94603ff

Browse files
author
Greg Bowler
committed
Add page styles
1 parent 8231d44 commit 94603ff

File tree

18 files changed

+174
-64
lines changed

18 files changed

+174
-64
lines changed

log.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ Add pips to centre of concertina circles
1616
Style empty repo list
1717
Grid layout repo list
1818
Github repo loader
19-
Show more button on repo list
19+
Show more button on repo list
20+
Add page styles, extract section layout

page/404.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<section class="_error">
2+
<h1>
3+
<span>Page Not Found</span>
4+
</h1>
5+
6+
<p>
7+
<strong>This is a 404 error page.</strong> It has been served to your browser because the requested URI does not have a matching Page View within the project's <code>page/</code> directory.
8+
</p>
9+
10+
<p>
11+
In case it wasn't obvious, this website is a <a href="/docs/webengine">WebEngine application</a>. WebEngine allows the developer to create their own 404 pages by storing them at <code>page/404.html</code>. That's what you're looking at now.
12+
</p>
13+
14+
<p>
15+
When the <code>Lifecycle</code> class calls the <code>Dispatcher::handle</code> function, the Dispatcher attempts to create a <code>ViewAssembly</code>, which is a collection of streams that make up the whole response (such as the header, main page, and footer). If a matching main page can't be located to match the requested URI, the Assembly throws an exception which causes the <code>handle</code> function to be called again, but this time with a modified <code>Request</code> object - it's identical to the original request, apart from the URI is changed to <code>/404</code> (or whatever error code is being served).
16+
</p>
17+
18+
<p>
19+
<a href="/docs/webengine/error-handling">Read more about how errors are handled</a>.
20+
</p>
21+
</section>

page/500.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<section class="_error">
2+
<h1>
3+
<span>Error!</span>
4+
</h1>
5+
6+
<p>
7+
<strong>This is a 500 error page.</strong>
8+
</p>
9+
10+
<p>
11+
<a href="/docs/webengine/error-handling">Read more about how errors are handled</a>.
12+
</p>
13+
</section>

page/_footer.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<footer class="_global-footer">
2+
<nav class="_site-nav">
3+
<ul>
4+
<li>
5+
<a href="/">Home</a>
6+
</li>
7+
<li>
8+
<a href="/docs">Documentation</a>
9+
</li>
10+
<li>
11+
<a href="/contributing">Contributing</a>
12+
</li>
13+
<li>
14+
<a href="/help">Help</a>
15+
</li>
16+
<li>
17+
<a href="/privacy">Privacy</a>
18+
</li>
19+
</ul>
20+
</nav>
21+
</footer>
22+
23+
<script src="/script.js"></script>
24+
</body>
25+
</html>

page/_header.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>PHP.Gt</title>
7+
<link rel="manifest" href="/manifest.json" />
8+
<link rel="shortcut icon" href="/asset/image/icon.ico" />
9+
<link href="/style.css" rel="stylesheet" />
10+
</head>
11+
<body>
12+
13+
<header class="_global-header">
14+
<h1 class="_sticky-logo">
15+
<a href="/">
16+
<span>PHP.<span>Gt</span></span>
17+
</a>
18+
</h1>
19+
20+
<nav class="_site-nav">
21+
<input id="toggle-menu" type="checkbox" />
22+
<label for="toggle-menu" data-toggle-control-active="" data-toggle-control-inactive="">
23+
Menu
24+
</label>
25+
26+
<ul>
27+
<li>
28+
<a href="/docs">Documentation</a>
29+
</li>
30+
<li>
31+
<a href="/contributing">Contributing</a>
32+
</li>
33+
<li>
34+
<a href="/help">Help</a>
35+
</li>
36+
</ul>
37+
</nav>
38+
</header>

page/contributing.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<section>
2+
<h1>Contributing!</h1>
3+
</section>

page/docs/@repo/@doc.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<article class="_doc-content">
2+
Test!
3+
</article>

page/docs/@repo/@doc.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Gt\Website\Page\Docs\_Repo;
3+
4+
use Gt\WebEngine\Logic\Page;
5+
6+
class _DocPage extends Page {
7+
public function go() {
8+
die("this");
9+
}
10+
}

page/docs/@repo/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
index page of the repo thing

page/docs/index.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
namespace Gt\Website\Page\Docs;
3+
4+
use Gt\WebEngine\Logic\Page;
5+
6+
class IndexPage extends Page {
7+
public function go() {
8+
$this->redirect("/docs/webengine");
9+
}
10+
}

0 commit comments

Comments
 (0)