1
0
Fork 0

Compare commits

...

4 Commits

2
.gitmodules vendored

@ -1,6 +1,6 @@
[submodule "kirby"] [submodule "kirby"]
path = kirby path = kirby
url = https://github.com/getkirby/kirby.git url = https://github.com/getkirby-v2/kirby.git
[submodule "site/patterns"] [submodule "site/patterns"]
path = site/patterns path = site/patterns
url = cddgit@git.codesignd.com:sites/patterns.git url = cddgit@git.codesignd.com:sites/patterns.git

@ -19,13 +19,16 @@ Seidenstr. 7
72764 Reutlingen 72764 Reutlingen
Deutschland Deutschland
USt-IdNr.: DE 300 983 590 <small>USt-IdNr.:</small>
DE 300 983 590
<h2 id="contact">Kontakt</h2> <h2 id="contact">Kontakt</h2>
(qdated:) (dated:)
<small>(link: pgp.asc text: PGP: D703 9FD2 4AAE 69E9 97A6  92FF 2E2A DD32 FE50 61C1 rel: pgpkey)</small>
Diese E-Mail-Adresse ist eine Woche lang gültig und verfällt anschließend. E-Mails an diese Adresse erreichen mich persönlich und werden schnellstmöglich beantwortet. Mit der Antwort erhältst du meine dauerhaft gültige E-Mail-Adresse. Diese E-Mail-Adresse ist eine Woche lang gültig und verfällt anschließend. E-Mails an diese Adresse erreichen mich persönlich und werden schnellstmöglich beantwortet. Mit der Antwort erhältst du meine dauerhaft gültige E-Mail-Adresse.
Durch dieses Verfahren wird die E-Mail-Adresse vor automatisiertem Spam geschützt. Vielen Dank für dein Verständnis. Durch dieses Verfahren wird die E-Mail-Adresse vor automatisiertem Spam geschützt. Vielen Dank für dein Verständnis.
## Datenschutz ## Datenschutz
@ -38,8 +41,8 @@ Beim Besuch dieser Website werden folgende Daten gespeichert:
- ggf. Referrer (URL einer hierher verlinkenden Website) - ggf. Referrer (URL einer hierher verlinkenden Website)
- Browser- und Betriebssystemversion - Browser- und Betriebssystemversion
Die Speicherung erfolgt ausschließlich auf dem Server des Betreibers. Eine Weitergabe der Daten oder Zusammenführung mit weiteren Daten erfolgt nicht. Nach vier Wochen werden die Daten automatisch gelöscht. Die Speicherung erfolgt ausschließlich auf dem Server des Betreibers. Eine Weitergabe der Daten oder Zusammenführung mit weiteren Daten erfolgt nicht. Nach 8 (acht) Tagen werden die Daten automatisch gelöscht.
### Kontaktformular ### Kontaktformular
Bei Nutzung des Kontaktformulars werden deine Angaben per E-Mail an mich übermittelt. Eine Weitergabe der Daten oder Zusammenführung mit weiteren Daten erfolgt nicht. Bei Nutzung des Kontaktformulars werden deine Angaben per E-Mail an mich übermittelt. Eine Weitergabe der Daten oder automatisierte Zusammenführung mit weiteren Daten erfolgt nicht.

@ -17,13 +17,16 @@ Seidenstr. 7
72764 Reutlingen 72764 Reutlingen
Germany Germany
USt-IdNr.: DE 300 983 590 <small>USt-IdNr. (EU VATIN):</small>
DE 300 983 590
<h2 id="contact">Contact</h2> <h2 id="contact">Contact</h2>
(qdated:) (dated:)
<small>(link: pgp.asc text: PGP: D703 9FD2 4AAE 69E9 97A6  92FF 2E2A DD32 FE50 61C1 rel: pgpkey)</small>
This email address is valid for one week, after which it expires. Emails to this address are received by me personally and are responded to as fast as possible. Together with my reply, you will get my permanently valid email address. This email address is valid for one week, after which it expires. Emails to this address are received by me personally and are responded to as fast as possible. Together with my reply, you will get my permanently valid email address.
This process protects the email address against automated spam. Thank you for your understanding. This process protects the email address against automated spam. Thank you for your understanding.
## Privacy ## Privacy
@ -36,8 +39,8 @@ Visiting this website temporarily stores the following information:
- referrer (URL of the site you came from) - referrer (URL of the site you came from)
- version information of browser and operating system - version information of browser and operating system
The data is stored on the server of the website owner only. No data is circulated or combined with other data. All data is automatically deleted after four weeks. The data is stored on the author's server only. No data is circulated or combined with other data. All data is automatically deleted after 8 (eight) days.
### Contact form ### Contact form
When using the contact form, your information is sent to me via email. No data is circulated or combined with other data. When using the contact form, your information is sent to me via email. No data is circulated or automatically combined with other data.

@ -1 +1 @@
Subproject commit 70635b48ad0dca4ee51ac33bb2cdd1297367bbc5 Subproject commit 29e082427d39ff7b51384ce7b6e2b963ce80e7ab

@ -20,7 +20,7 @@ return function($site, $pages, $page) {
if(r::is('POST')) { if(r::is('POST')) {
$form->emailAction([ $form->emailAction([
'to' => qdated(), 'to' => dated(),
'from' => 'codesignd form <no-reply@codesignd.de>', 'from' => 'codesignd form <no-reply@codesignd.de>',
'subject' => 'Message from the contact form (' . $site->title() . ')', 'subject' => 'Message from the contact form (' . $site->title() . ')',
'snippet' => 'email-templates/contact' 'snippet' => 'email-templates/contact'

@ -23,5 +23,3 @@ l::set('contact.heading.email', 'E-Mail');
l::set('contact.message.name-invalid', 'Bitte gebe deinen Namen ein.'); l::set('contact.message.name-invalid', 'Bitte gebe deinen Namen ein.');
l::set('contact.message.email-invalid', 'Bitte gebe eine gültige E-Mail-Adresse ein.'); l::set('contact.message.email-invalid', 'Bitte gebe eine gültige E-Mail-Adresse ein.');
l::set('contact.message.success', 'Danke für deine Nachricht, ich melde mich bald bei dir.'); l::set('contact.message.success', 'Danke für deine Nachricht, ich melde mich bald bei dir.');
l::set('qdated.error', 'Bei der Anzeige der E-Mail-Adresse ist ein Fehler aufgetreten. Bitte kontaktiere mich über <a href="https://twitter.com/lukasbestle">Twitter</a> und mache mich darauf aufmerksam. Danke!');

@ -23,5 +23,3 @@ l::set('contact.heading.email', 'Email');
l::set('contact.message.name-invalid', 'Please enter your name.'); l::set('contact.message.name-invalid', 'Please enter your name.');
l::set('contact.message.email-invalid', 'Please enter a valid email address.'); l::set('contact.message.email-invalid', 'Please enter a valid email address.');
l::set('contact.message.success', 'Thank you for your message, I will get back to you soon.'); l::set('contact.message.success', 'Thank you for your message, I will get back to you soon.');
l::set('qdated.error', 'An error occured while displaying the email address. Please contact me via <a href="https://twitter.com/lukasbestle">Twitter</a> and tell me about this. Thank you!');

@ -1,42 +1,59 @@
<?php <?php
/** /**
* Returns the current qdated address * Returns the current dated address
* If qdated is not available, returns null
* *
* @return string * @return string
*/ */
function qdated() { function dated(): string {
$path = $_SERVER['HOME'] . '/.config/qdated/cddmail2/current'; // date in seven days
if(!is_file($path)) return null; $date = modifiedJulianDate(time() + 7 * 24 * 60 * 60);
return 'dated-' . trim(f::read($path)) . '@' . url::host(); return 'dated-' . $date . '@' . url::host();
} }
/** /**
* Returns an HTML a mailto tag with the current qdated address * Returns an HTML a mailto tag with the current dated address
* If qdated is not available, returns an HTML error message * If dated is not available, returns an HTML error message
* *
* @param mixed $text Optional text for the link * @param mixed $text Optional text for the link
* Can also be true to use the email * Can also be true to use the email
* address but put a line break in it * address but put a line break in it
* @return string HTML code * @return string HTML code
*/ */
function qdatedHtml($text = false) { function datedHtml($text = false) {
$email = qdated(); $email = dated();
if(!$email) return '<p><strong>' . l::get('qdated.error') . '</strong></p>';
if($text === true) $text = str_replace('@', '<br>@', $email); if($text === true) $text = str_replace('@', '<br>@', $email);
return str::email($email, $text); return str::email($email, $text);
} }
/** /**
* qdated Kirbytag * Returns the Modified Julian Date,
* which is the Julian Date with the first two digits stripped
* and with an offset of one day to compensate for the Julian Date
* starting at noon instead of at midnight
* *
* Usage: (qdated: Optional link text) * @param int $timestamp Timestamp to calculate from, defaults to the current date
* @return int
*/ */
kirby()->set('tag', 'qdated', [ function modifiedJulianDate(?int $timestamp = null): int {
$timestamp = $timestamp ?? time();
return gregoriantojd(
date('m', $timestamp),
date('d', $timestamp),
date('Y', $timestamp)
) - 2400001;
}
/**
* dated Kirbytag
*
* Usage: (dated: Optional link text)
*/
kirby()->set('tag', 'dated', [
'html' => function($tag) { 'html' => function($tag) {
return qdatedHtml($tag->attr('qdated')); return datedHtml($tag->attr('dated'));
} }
]); ]);

@ -40,7 +40,7 @@
<aside class="contact__sidebar"> <aside class="contact__sidebar">
<div class="contact__detail"> <div class="contact__detail">
<h2 class="contact__heading"><?= l::get('contact.heading.email', 'Email') ?></h2> <h2 class="contact__heading"><?= l::get('contact.heading.email', 'Email') ?></h2>
<div class="contact__email"><?= qdatedHtml(true) ?> <a href="<?= url('legal') ?>#contact">?</a></div> <div class="contact__email"><?= datedHtml(true) ?> <a href="<?= url('legal') ?>#contact">?</a></div>
<small><a href="<?= url('pgp.asc') ?>" rel="pgpkey" type="application/pgp-keys">PGP: 2E2A DD32 FE50 61C1</a></small> <small><a href="<?= url('pgp.asc') ?>" rel="pgpkey" type="application/pgp-keys">PGP: 2E2A DD32 FE50 61C1</a></small>
</div> </div>

Loading…
Cancel
Save