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
----
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
----

View file

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

View file

@ -1,29 +1,18 @@
title: News
icon: document
sections:
drafts:
extends: sections/news
headline: Drafts
status: draft
columns:
left:
width: 1/2
fields:
text:
type: textarea
size: large
unlisted:
extends: sections/news
headline: In Review
status: unlisted
right:
width: 1/2
sections:
drafts:
extends: sections/news
headline: Drafts
status: draft
unlisted:
extends: sections/news
headline: In Review
status: unlisted
listed:
extends: sections/news
headline: Published
status: listed
layout: cards
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
if (empty($alert) === true) {
$data = [];
go();
}

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')) { ?>
<li class="nav-item dropdown">
<?php
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>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"><?= getFriendlyUserName() ?></a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="/user">Profile</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');
snippet('header');
snippet('rightlogoheader');
?>
<?= $page->text()->kirbytext() ?>
<?php snippet('footer') ?>
<?php
snippet('rightlogofooter');
snippet('footer');
?>

View file

@ -1,12 +1,6 @@
<?php
snippet('header');
// 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;
snippet('rightlogoheader');
foreach($page->children()->listed()->flip() as $article):
?>
@ -24,7 +18,6 @@
<?php
endforeach;
print $right;
snippet('rightlogofooter');
snippet('footer');
?>

View file

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

View file

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

View file

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