first release candidate

This commit is contained in:
Reik Kaps 2020-06-07 12:34:44 +02:00
parent fd8f188ce4
commit 32cb5c52fc
6 changed files with 131 additions and 115 deletions

View File

@ -3,6 +3,10 @@
*/
main {
display: block;
margin: auto 20px;
margin: 50px 20px auto 20px;
}
nav {
position: absolute;
}

BIN
images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

1
images/menue.svg Normal file
View File

@ -0,0 +1 @@
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="32px" id="Layer_1" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>

After

Width:  |  Height:  |  Size: 605 B

View File

@ -1,48 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Picnic CSS Testing</title>
<title><?php echo $_SERVER['SERVER_NAME']; ?>: mlmmj-webinterface</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/picnic.min.css">
<link rel="stylesheet" href="css/leinelab.css">
</head>
<body>
<main class="intro">
<h1><?php echo $_GET['ml_list']; ?></h1>
<div class="tabs two">
<input id='tab-1' type='radio' name='subscribe' checked />
<label class="pseudo button toggle" for="tab-1">Subscribe</label>
<input id='tab-2' type='radio' name='subscribe'>
<label class="pseudo button toggle" for="tab-2">Unsubscribe</label>
<?php
/*
* A advanced subscribe/unsubscibe form for mlmmj mailing list software
* 2020 by leinelab members https://leinelab.org
*/
define('SMARTY_DIR', './libs/');
require_once(SMARTY_DIR . 'Smarty.class.php');
<div class="row">
<div>
<form action="mlmmj.php" method="post">
<input name="mailinglist" type="hidden" value="testing@<?php echo $_SERVER['SERVER_NAME']; ?>">
<input name="job" type="hidden" value="subscribe">
<input name="redirect_failure" type="hidden" value="http://www.failure.com/">
<input name="redirect_success" type="hidden" value="http://wiki.leinelab.org/">
<label class="form-label" for="input-email-sub">Your Mail Address</label>
<input class="form-label" id="input-email-sub" name="email" type="text" size="30" maxlength="254" placeholder="email@addr"><br>
<button class="primary">Subscribe</button>
</form>
</div>
<div>
<form action="mlmmj.php" method="post">
<input name="mailinglist" type="hidden" value="testing@<?php echo $_SERVER['SERVER_NAME']; ?>">
<input name="job" type="hidden" value="unsubscribe">
<input name="redirect_failure" type="hidden" value="http://www.failure.com/">
<input name="redirect_success" type="hidden" value="http://wiki.leinelab.de">
<label class="form-label" for="input-email-unsub">Your Mail Address</label>
<input class="form-label" id="input-email-unsub" name="email" type="text" size="30" maxlength="254" placeholder="email@addr"><br>
<button class="primary">Unsubscribe</button>
</form>
</div>
</div>
</div>
</main>
</body>
</html>
$smarty = new Smarty();
$smarty->setTemplateDir('./templates/');
$smarty->setCompileDir('./templates_c/');
$smarty->setConfigDir('./configs/');
$smarty->setCacheDir('./cache/');
$smarty->debugging = true;
// uses the value of $smarty->cacheLifetime() to determine
// the number of seconds a cache is good for
if (!$smarty->debugging) {
$smarty->setCaching(Smarty::CACHING_LIFETIME_CURRENT);
}
// get informations from Server, Path and GET-Parameter
// eg. https://lists.leinelab.org/subscribe/listname?email=yourname@example.com
$smarty->assign('server', $_SERVER['SERVER_NAME']);
if ($_GET['email']) {
$smarty->assign('email', $_GET['email']);
}
// get listname
if ($_GET['listname']) {
$smarty->assign('listname', $_GET['listname']);
}
// get action
if ($_GET['action']) {
$smarty->assign('action', $_GET['action']);
} else {
$smarty->assign('action', "subscribe");
}
$smarty->display('tpl-form.tpl');
?>

View File

@ -7,42 +7,88 @@
<link rel="stylesheet" href="css/picnic.min.css">
<link rel="stylesheet" href="css/leinelab.css">
</head>
<body>
<main class="intro">
<div class="container">
<h1>{$listname}@{$server}: {$action}</h1>
<div class="tabs two">
<input id='tab-1' type='radio' name='subscribe' />
<label class="pseudo button toggle" for="tab-1">Subscribe</label>
<input id='tab-2' type='radio' name='unsubscribe' />
<label class="pseudo button toggle" for="tab-2">Unsubscribe</label>
<div class="row">
<div>
<form action="mlmmj.php" method="post">
<input name="mailinglist" type="hidden" value="{$listname}@{$server}">
<input name="job" type="hidden" value="subscribe">
<input name="redirect_failure" type="hidden" value="http://www.failure.com/">
<input name="redirect_success" type="hidden" value="http://wiki.leinelab.org/">
<label class="form-label" for="input-email-sub">Your Mail Address</label>
<input class="form-label" id="input-email-sub" name="email" type="text" size="30" maxlength="254" placeholder="yourname@example.com" value="{$email}"><br>
<button class="primary">Subscribe</button>
</form>
</div>
<div>
<form action="mlmmj.php" method="post">
<input name="mailinglist" type="hidden" value="{$listname}@{$server}">
<input name="job" type="hidden" value="unsubscribe">
<input name="redirect_failure" type="hidden" value="http://www.failure.com/">
<input name="redirect_success" type="hidden" value="http://wiki.leinelab.de">
<label class="form-label" for="input-email-unsub">Your Mail Address</label>
<input class="form-label" id="input-email-unsub" name="email" type="text" size="30" maxlength="254" placeholder="yourname@example.com" value="{$email}"><br>
<button class="primary">Unsubscribe</button>
</form>
</div>
</div>
</div>
<!-- top navigation start -->
<nav>
<a href="https://leinelab.org" class="brand">
<img class="logo" src="images/logo.png" />
<span>LeineLab</span>
</a>
<!-- responsive-->
<input id="bmenub" type="checkbox" class="show">
<label for="bmenub" class="burger pseudo button">
<img src="images/menue.svg" />
</label>
<div class="menu">
{if $action == "subscribe"}
<a href="?action=unsubscribe&listname={$listname}" class="pseudo button icon-picture">Unsubscribe</a>
{else}
<a href="?action=subscribe&listname={$listname}" class="pseudo button icon-picture">Subscribe</a>
{/if}
<a href="https://wiki.leinelab.org" class="pseudo button icon-picture">Wiki</a>
<label for="modal_1" class="button">Hilfe</label>
</div>
</nav>
<!-- top navigation end -->
<main class="intro">
<!-- show a help dialog -->
<div class="modal">
<input id="modal_1" type="checkbox" />
<label for="modal_1" class="overlay"></label>
<article>
<header>
<h3>Hilfe</h3>
<label for="modal_1" class="close">&times;</label>
</header>
<section class="content">
<h1>Hilfe zum An- und Abmelden</h1>
<p>Wenn Sie sich auf der Mailingliste <b>{$listname}@{$server}</b> an- oder abmelden möchten,
können Sie hier einfach Ihre Email-Adresse eingeben. Anschließend erhalten Sie eine Email, die sie wiederum
beantworten müssen - es reicht dafür eine leere Nachricht.</p>
<p>Damit stellen wir sicher, dass Sie tatsächlich diese Mailingliste abonnieren möchten. Details dazu können
Sie unserer <a href="https://wiki.leinelab.org/doku.php/datenschutzerklaerung">Datenschutzerklärung</a> entnehmen.</p>
</section>
<footer>
<label for="modal_1" class="button dangerous">
Beenden
</label>
</footer>
</article>
</div>
<div class="container">
{if isset($listname) }
<h1>Leinelab-Listserver:</h1>
<h2>{$listname}@{$server}: {$action}</h2>
<div>
<form action="mlmmj.php" method="post">
<input name="mailinglist" type="hidden" value="{$listname}@{$server}">
<input name="job" type="hidden" value="{$action}">
<input name="redirect_failure" type="hidden" value="http://www.failure.com/">
<input name="redirect_success" type="hidden" value="http://wiki.leinelab.org/">
<label class="form-label" for="input-email">Ihre Email-Adresse</label>
<input class="form-label" id="input-email" name="email" type="text" size="30" maxlength="254" placeholder="yourname@example.com" value="{$email}"><br>
<button class="primary">{$action|capitalize}</button>
</form>
</div>
{else}
<div>
<h3>Sorry: there was an errror!</h3>
</div>
{/if}
</div>
</main>
</body>
</html>

View File

@ -1,33 +0,0 @@
<?php
/*
* A advanced subscribe/unsubscibe form for mlmmj mailing list software
* 2020 by leinelab members https://leinelab.org
*/
define('SMARTY_DIR', './libs/');
require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();
$smarty->setTemplateDir('./templates/');
$smarty->setCompileDir('./templates_c/');
$smarty->setConfigDir('./configs/');
$smarty->setCacheDir('./cache/');
$smarty->debugging = true;
// get informations from Server, Path and GET-Parameter
// eg. https://lists.leinelab.org/subscribe/listname?email=yourname@example.com
$smarty->assign('server', $_SERVER['SERVER_NAME']);
if ($_GET['email']) {
$smarty->assign('email', $_GET['email']);
}
if ($_GET['listname']) {
$smarty->assign('listname', $_GET['listname']);
}
$smarty->display('tpl-form.tpl');
?>