vitamin2 / v2-spam-free-mail
V2 Spam Free Mails
0.2.3
2023-01-11 12:29 UTC
Requires
This package is auto-updated.
Last update: 2024-04-11 15:40:27 UTC
README
Just a plugin which decrypts the email addresses on the fly.
Installation
Download
Download and copy this repository to /site/plugins/vitamin2/v2-spam-free-mail
.
Composer
composer require vitamin2/v2-spam-free-mail
Usage
Install plugin
Add Spam Free JS to your template (getSpamFreeJs returns a versionised JS file)
<?= js([
getSpamFreeJs(),
]) ?>
- Preload it (optional)
<link rel="preload" href="<?= getSpamFreeJs() ?>" as="script" />
- Use It. For text fields it will be used automatically. For other fields you can use the snippet.
<?= snippet("global/protected-mail", [
"emailAddress" => $site->emailAddress()->value(),
"emailText" => $site->emailAddress()->value(),
"customAttributes" => [
"class" => "link-footer",
"rel" => "noopener noreferrer",
"target" => "_blank",
"title" => "link-footer",
],
]) ?>
License
MIT