More work on Kanga World web site.

This commit is contained in:
Scott Duensing 2022-01-02 17:31:29 -06:00
parent bb315f3efb
commit d079f0ae33
19 changed files with 197 additions and 114 deletions

View file

@ -0,0 +1,18 @@
Title: About
----
Text:
**Kanga World** is (link: https://kangaroopunch.com text: Kangaroo Punch Studio's target: _blank) retro online gaming service.
While currently heavily under construction, our goal is to provide:
- Multi-player DOS gaming via (link: https://dosbox-staging.github.io/ text: DOSBox Staging target: _blank) or real hardware.
- Multi-player BBS doors.
- Multi-player interactive fiction.
- Multi-player JoeyNet-based retro gaming on all (link: https://joeylib.com text: JoeyLib target: _blank) supported platforms.
Our first test client will be for DOSBox and provide limited BBS door gaming in order to test our network code and server infrastructure.
Want to follow along or contribute? (link: https://discord.gg/AMA8zbYwQD text: Stop by our official chat! target: _blank)

View file

@ -15,3 +15,7 @@ Password: Password
---- ----
Button: Register Button: Register
----
Minlength: 8

View file

@ -6,15 +6,15 @@ Alert: Invalid email or password
---- ----
Email: New Email Email: Email
---- ----
Password: New Password Password: Password
---- ----
Button: Update User Button: Save
---- ----
@ -30,4 +30,4 @@ Delete-button: Delete Account
---- ----
Delete-warning: Are you sure? This action cannot be reversed! Delete-warning: Are you sure? This action cannot be reversed!

View file

@ -1,4 +1,4 @@
title: Avtivated User Landing Page title: Activated User Landing Page
preset: page preset: page
fields: fields:
text: text:

View file

@ -1,29 +1,18 @@
title: News title: News
icon: document icon: document
sections:
drafts:
extends: sections/news
headline: Drafts
status: draft
columns: unlisted:
left: extends: sections/news
width: 1/2 headline: In Review
fields: status: unlisted
text:
type: textarea
size: large
right: listed:
width: 1/2 extends: sections/news
sections: headline: Published
drafts: status: listed
extends: sections/news layout: cards
headline: Drafts
status: draft
unlisted:
extends: sections/news
headline: In Review
status: unlisted
listed:
extends: sections/news
headline: Published
status: listed
layout: cards

View file

@ -0,0 +1,7 @@
title: Right-Hand Logo Default Page
preset: page
fields:
text:
label: Text
type: textarea
size: large

View file

@ -54,7 +54,6 @@ return function ($kirby) {
// SUCCESSFUL // SUCCESSFUL
if (empty($alert) === true) { if (empty($alert) === true) {
$data = []; $data = [];
go(); go();
} }
@ -66,4 +65,4 @@ return function ($kirby) {
'alert' => $alert, 'alert' => $alert,
'data' => $data ?? false 'data' => $data ?? false
]; ];
}; };

View file

@ -0,0 +1,15 @@
<?php
// Helper functions for use around the site.
function getFriendlyUserName() {
$kirby = kirby();
if ($kirby->user()->name() && strlen($kirby->user()->name()) > 1) {
$friendly = esc($kirby->user()->name(), 'html');
} else {
$friendly = esc($kirby->user()->email(), 'html');
}
return $friendly;
}
?>

View file

@ -31,14 +31,7 @@
<?php if ($kirby->user() && !$kirby->session()->get('kpNewUser')) { ?> <?php if ($kirby->user() && !$kirby->session()->get('kpNewUser')) { ?>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<?php <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"><?= getFriendlyUserName() ?></a>
if ($kirby->user()->name() && strlen($kirby->user()->name()) > 1) {
$userDropDown = esc($kirby->user()->name(), 'html');
} else {
$userDropDown = esc($kirby->user()->email(), 'html');
}
?>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"><?= $userDropDown ?></a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown"> <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/user">Profile</a></li> <li><a class="dropdown-item" href="/user">Profile</a></li>
<li><a class="dropdown-item" href="/logout">Logout</a></li> <li><a class="dropdown-item" href="/logout">Logout</a></li>

View file

@ -0,0 +1,12 @@
</div>
<div class="column">
<?= kirbytext(
'(image: kangaworld.png imgclass:imagecenter width: 300)' .
'(image: onlinegamingnetwork.png imgclass:imagecenter width: 300)' .
'(image: kangaworldlogo.png imgclass:imagecenter width: 300)' .
'(image: comingsoon.png imgclass:imagecenter width: 300)',
['parent' => $site->homePage()]
);
?>
</div>
</div>

View file

@ -0,0 +1,2 @@
<div class="columns">
<div class="column">

View file

@ -5,8 +5,12 @@
$kirby->session()->remove('kpActivated'); $kirby->session()->remove('kpActivated');
snippet('header'); snippet('header');
snippet('rightlogoheader');
?> ?>
<?= $page->text()->kirbytext() ?> <?= $page->text()->kirbytext() ?>
<?php snippet('footer') ?> <?php
snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -1,12 +1,6 @@
<?php <?php
snippet('header'); snippet('header');
snippet('rightlogoheader');
// Display news entries where [newshere] appears in the kirbytext.
$marker = '<p>[newshere]</p>';
$left = strstr($page->text()->kirbytext(), $marker, true);
$right = substr($page->text()->kirbytext(), strlen($left) + strlen($marker));
print $left;
foreach($page->children()->listed()->flip() as $article): foreach($page->children()->listed()->flip() as $article):
?> ?>
@ -24,7 +18,6 @@
<?php <?php
endforeach; endforeach;
print $right; snippet('rightlogofooter');
snippet('footer'); snippet('footer');
?> ?>

View file

@ -1,27 +1,35 @@
<?php snippet('header') ?> <?php
<?php snippet('notification') ?> snippet('header');
snippet('notification');
snippet('rightlogoheader');
?>
<h1><?= $page->title()->html() ?></h1>
<p>&nbsp;</p>
<form method="post" action="<?= $page->url() ?>"> <form method="post" action="<?= $page->url() ?>">
<fieldset>
<legend><?= $page->title()->html() ?></legend>
<section> <div class="row mb-3">
<label for="email"><?= $page->email()->html() ?></label> <label for="inputEmail3" class="col-sm-2 col-form-label"><?= $page->email()->html() ?></label>
<input type="email" id="email" name="email" value="<?= $data['email'] ?? '' ?>" autocomplete="email" autofocus required> <div class="col-sm-10">
<?= isset($alert['email']) ? html($alert['email']) : '' ?> <input class="form-control" type="email" id="email" name="email" value="<?= $data['email'] ?? '' ?>" autocomplete="email" autofocus required>
</section> <?= isset($alert['email']) ? html($alert['email']) : '' ?>
</div>
</div>
<section> <div class="row mb-3">
<label for="password"><?= $page->password()->html() ?></label> <label for="inputPassword3" class="col-sm-2 col-form-label"><?= $page->password()->html() ?></label>
<input type="password" id="password" name="password" value="<?= $data['password'] ?? '' ?>" autocomplete="current-password" required> <div class="col-sm-10">
<?= isset($alert['password']) ? html($alert['password']) : '' ?> <input class="form-control" type="password" id="password" name="password" value="<?= $data['password'] ?? '' ?>" autocomplete="current-password" required>
</section> <?= isset($alert['password']) ? html($alert['password']) : '' ?>
</div>
</div>
<section> <input type="submit" name="login" class="btn btn-primary" value="<?= $page->button()->html() ?>"/>
<input type="submit" name="login" value="<?= $page->button()->html() ?>">
</section>
</fieldset> </form>
</form>
<?php snippet('footer') ?> <?php
snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -1,9 +1,17 @@
<?php snippet('header') ?> <?php
snippet('header');
//snippet('rightlogoheader');
?>
<h3><?= $page->title() ?></h3> <h3><?= $page->title() ?></h3>
<img src="<?= $page->image()->resize(250, 250)->url() ?>" class="imageright"/> <?php if ($page->image()) { ?>
<img src="<?= $page->image()->resize(250, 250)->url() ?>" class="imageright"/>
<?php } ?>
<p class="newspublished">Published: <span class="newsdate"><?= $page->date()->toDate('d-M-Y') ?></span></p> <p class="newspublished">Published: <span class="newsdate"><?= $page->date()->toDate('d-M-Y') ?></span></p>
<?= $page->text()->kirbytext() ?> <?= $page->text()->kirbytext() ?>
<a href="<?= url('home') ?>">Back...</a> <a href="<?= url('home') ?>">Back...</a>
<?php snippet('footer') ?> <?php
//snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -5,8 +5,12 @@
$kirby->session()->remove('kpNewUser'); $kirby->session()->remove('kpNewUser');
snippet('header'); snippet('header');
snippet('rightlogoheader');
?> ?>
<?= $page->text()->kirbytext() ?> <?= $page->text()->kirbytext() ?>
<?php snippet('footer') ?> <?php
snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -1,27 +1,35 @@
<?php snippet('header') ?> <?php
<?php snippet('notification') ?> snippet('header');
snippet('notification');
snippet('rightlogoheader');
?>
<h1><?= $page->title()->html() ?></h1>
<p>&nbsp;</p>
<form method="post" action="<?= $page->url() ?>"> <form method="post" action="<?= $page->url() ?>">
<fieldset>
<legend><?= $page->title()->html() ?></legend>
<section> <div class="row mb-3">
<label for="email"><?= $page->email()->html() ?></label> <label for="inputEmail3" class="col-sm-2 col-form-label"><?= $page->email()->html() ?></label>
<input type="email" id="email" name="email" value="<?= $data['email'] ?? '' ?>" autocomplete="email" autofocus required> <div class="col-sm-10">
<?= isset($alert['email']) ? html($alert['email']) : '' ?> <input class="form-control" type="email" id="email" name="email" value="<?= $data['email'] ?? '' ?>" autocomplete="email" autofocus required>
</section> <?= isset($alert['email']) ? html($alert['email']) : '' ?>
</div>
</div>
<section> <div class="row mb-3">
<label for="password"><?= $page->password()->html() ?></label> <label for="inputPassword3" class="col-sm-2 col-form-label"><?= $page->password()->html() ?></label>
<input type="password" id="password" name="password" value="<?= $data['password'] ?? '' ?>" minlength="8" autocomplete="new-password" required> <div class="col-sm-10">
<?= isset($alert['password']) ? html($alert['password']) : '' ?> <input class="form-control" type="password" id="password" name="password" value="<?= $data['password'] ?? '' ?>" minlength="<?= $page->minLength() ?>" autocomplete="new-password" required>
</section> <?= isset($alert['password']) ? html($alert['password']) : '' ?>
</div>
</div>
<section> <input type="submit" name="register" class="btn btn-primary" value="<?= $page->button()->html() ?>"/>
<input type="submit" name="register" value="<?= $page->button()->html() ?>">
</section>
</fieldset> </form>
</form>
<?php snippet('footer') ?> <?php
snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -0,0 +1,11 @@
<?php
snippet('header');
snippet('rightlogoheader');
?>
<?= $page->text()->kirbytext() ?>
<?php
snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -1,29 +1,37 @@
<?php snippet('header') ?> <?php
<?php snippet('notification') ?> snippet('header');
snippet('notification');
snippet('rightlogoheader');
?>
<?= $success ?? '' ?> <?= $success ?? '' ?>
<h1><?= getFriendlyUserName() ?></h1>
<p>&nbsp;</p>
<form method="post" action="<?= $page->url() ?>"> <form method="post" action="<?= $page->url() ?>">
<fieldset>
<legend><?= $data['email'] ?? $kirby->user()->email() ?></legend>
<section> <div class="row mb-3">
<label for="email"><?= $page->email()->html() ?></label> <label for="inputEmail3" class="col-sm-2 col-form-label"><?= $page->email()->html() ?></label>
<input type="text" id="email" name="email" value="<?= $data['email'] ?? '' ?>" placeholder="<?= $data['email'] ?? $kirby->user()->email() ?>" autocomplete="email"> <div class="col-sm-10">
<?= isset($alert['email']) ? html($alert['email']) : '' ?> <input class="form-control" type="email" id="email" name="email" value="<?= $data['email'] ?? '' ?>" placeholder="<?= $data['email'] ?? $kirby->user()->email() ?>" autocomplete="email" disabled>
</section> <?= isset($alert['email']) ? html($alert['email']) : '' ?>
</div>
</div>
<section> <div class="row mb-3">
<label for="password"><?= $page->password()->html() ?></label> <label for="inputPassword3" class="col-sm-2 col-form-label"><?= $page->password()->html() ?></label>
<input type="password" id="password" name="password" value="<?= $data['password'] ?? '' ?>" placeholder="<?= $page->password()->html() ?>" autocomplete="new-password"> <div class="col-sm-10">
<?= isset($alert['password']) ? html($alert['password']) : '' ?> <input class="form-control" type="password" id="password" name="password" value="<?= $data['password'] ?? '' ?>" placeholder="<?= $page->password()->html() ?>" autocomplete="new-password">
</section> <?= isset($alert['password']) ? html($alert['password']) : '' ?>
</div>
</div>
<section> <input type="submit" name="update" class="btn btn-primary" value="<?= $page->button()->html() ?>"/>
<input type="submit" name="update" value="<?= $page->button()->html() ?>">
</section>
</fieldset> </form>
</form>
<?php snippet('footer') ?> <?php
snippet('rightlogofooter');
snippet('footer');
?>