Skip to content

Commit 6194d24

Browse files
committed
Merge branch 'release/0.22.5'
2 parents 6487443 + 9f2080c commit 6194d24

File tree

5 files changed

+73
-3
lines changed

5 files changed

+73
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.22.5] - 2024-05-10
4+
5+
### Added
6+
- added mailto-generator
7+
8+
39
## [0.22.4] - 2024-05-07
410

511
### Added

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "templateq",
3-
"version": "0.22.4",
3+
"version": "0.22.5",
44
"description": "Wordpress theme to power qnipsel",
55
"main": "webpack.config.js",
66
"scripts": {

src/functions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/** Set version
44
* Used for cachebusting JS/CSS
55
*/
6-
$GLOBALS['qnipsel_version'] = '0.22.4';
6+
$GLOBALS['qnipsel_version'] = '0.22.5';
77

88
/** Custom Fields
99
* Set up the Custom Fields plugin and define some fields.

src/scss/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name: templateQ
33
Author: Christian Brassat
44
Description: Theme for templateQ
5-
Version: 0.22.3
5+
Version: 0.22.5
66
*/
77

88
// Configure Bulma
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php get_header(); ?>
2+
3+
<div id="site-container">
4+
<main>
5+
<?php if (have_posts()): ?>
6+
<?php while (have_posts()): the_post(); ?>
7+
<?php get_template_part('partials/content', 'title'); ?>
8+
9+
<div id="mailtogenerator" class="container-fluid xml-stripper">
10+
<div class="columns is-gapless">
11+
12+
<div class="column">
13+
<div class="px-4 py-4">
14+
<p class="has-text-grey is-uppercase is-size-7">Input</p>
15+
16+
<?= fractalFormText(array(
17+
'label' => array( 'string' => 'Mail', 'required' => true),
18+
'name' => 'mail',
19+
'placeholder' => '[email protected]'
20+
)) ?>
21+
</div>
22+
</div> <!-- // column -->
23+
24+
<div class="column has-background-light">
25+
<div class="px-4 py-4">
26+
<p class="has-text-grey is-uppercase is-size-7">Output</p>
27+
<textarea class="textarea is-family-code" name="" id="output" cols="30" rows="10" readonly=""></textarea>
28+
</div>
29+
</div>
30+
31+
</div> <!-- // columns -->
32+
</div> <!-- application -->
33+
34+
<script>
35+
const input = document.getElementById('mail')
36+
const output = document.getElementById('output')
37+
38+
input.addEventListener('input', function() {
39+
const addressInput = input.value;
40+
let addressOutput = ''
41+
42+
for (let character of addressInput) {
43+
addressOutput += character.charCodeAt() + ';'
44+
}
45+
addressOutput = addressOutput.slice(0, -1);
46+
47+
output.value = `\<script\>
48+
function UnCryptMailto(s) {
49+
var myS = ''; var arrS = s.split(';'); var i = 0;
50+
for (i = 0; i < arrS.length; i++) {
51+
myS += String.fromCharCode(parseInt(arrS[i]));
52+
}
53+
return myS;
54+
}
55+
document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
56+
\<\/script\>`
57+
});
58+
</script>
59+
60+
<?php endwhile; ?>
61+
<?php endif; ?>
62+
</main>
63+
64+
<?php get_footer(); ?>

0 commit comments

Comments
 (0)