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