mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
Add profile page
This commit is contained in:
parent
5d97580fb3
commit
e5a3344813
2 changed files with 58 additions and 0 deletions
|
@ -12,6 +12,7 @@ $router->map('GET', '/verify', function() {}, 'verify');
|
||||||
$router->map('GET', '/encrypt', function() {}, 'encrypt');
|
$router->map('GET', '/encrypt', function() {}, 'encrypt');
|
||||||
$router->map('GET', '/proofs', function() {}, 'proofs');
|
$router->map('GET', '/proofs', function() {}, 'proofs');
|
||||||
$router->map('GET', '/faq', function() {}, 'faq');
|
$router->map('GET', '/faq', function() {}, 'faq');
|
||||||
|
$router->map('GET', '/[:uid]', function() {}, 'profile');
|
||||||
|
|
||||||
// Router matching
|
// Router matching
|
||||||
$match = $router->match();
|
$match = $router->match();
|
||||||
|
@ -38,6 +39,12 @@ if(is_array($match) && is_callable($match['target'])) {
|
||||||
case 'faq':
|
case 'faq':
|
||||||
readfile('pages/faq.html');
|
readfile('pages/faq.html');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'profile':
|
||||||
|
$content = file_get_contents('pages/profile.html');
|
||||||
|
$content = str_replace('%UID%', $match['params']['uid'], $content);
|
||||||
|
print($content);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No route was matched
|
// No route was matched
|
||||||
|
|
51
pages/profile.html
Normal file
51
pages/profile.html
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Encrypt - Keyoxide</title>
|
||||||
|
<script async defer data-domain="keyoxide.org" src="https://plausible.io/js/plausible.js"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.css">
|
||||||
|
<link rel="stylesheet" href="/assets/styles.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<a href="/">Keyoxide</a>
|
||||||
|
<div class="spacer"></div>
|
||||||
|
<nav>
|
||||||
|
<a href="/verify">verify</a>
|
||||||
|
<a href="/encrypt">encrypt</a>
|
||||||
|
<a href="/proofs">proofs</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>Profile</h1>
|
||||||
|
<div class="content">
|
||||||
|
<h3 class="profile_uid">%UID%</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>
|
||||||
|
<a href="/">Keyoxide</a> makes basic cryptography operations accessible to regular humans.
|
||||||
|
<br>
|
||||||
|
Made by <a href="https://yarmo.eu">Yarmo Mackenbach</a>.
|
||||||
|
<br>
|
||||||
|
Code hosted on <a href="https://codeberg.org/yarmo/keyoxide">Codeberg</a> (<a href="https://drone.private.foss.best/yarmo/keyoxide/">drone CI/CD</a>).
|
||||||
|
<br>
|
||||||
|
Uses <a href="https://github.com/openpgpjs/openpgpjs">openpgp.js</a> (version <a href="https://github.com/openpgpjs/openpgpjs/releases/tag/v4.10.4">4.10.4</a>).
|
||||||
|
<br>
|
||||||
|
Privacy-friendly public usage stats by <a href="https://plausible.io/keyoxide.org">Plausible.io</a>.
|
||||||
|
<br>
|
||||||
|
Because SO2 + 2NaOH → Na2SO3 + H2O
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
<script src="/assets/openpgp.min.js"></script>
|
||||||
|
<script type="text/javascript" src="/assets/scripts.js" charset="utf-8"></script>
|
||||||
|
</html>
|
Loading…
Reference in a new issue