feat: Cache le mail et numéro de téléphone
This commit is contained in:
parent
5e5369affc
commit
1217428813
|
@ -1,25 +1,6 @@
|
||||||
'use strict';
|
import obfuscates from 'js/obfuscates';
|
||||||
function reverse(str) { return str.split("").reverse().join(""); }
|
|
||||||
function getName() { return "nomis"; }
|
|
||||||
function getAt() { return "@"; }
|
|
||||||
function getDomain() { return "okew"; }
|
|
||||||
function getDot() { return "."; }
|
|
||||||
function getTld() { return "oi"; }
|
|
||||||
function getAddress() { return reverse(getName()) + getAt() + reverse(getDomain()) + getDot() + reverse(getTld()); }
|
|
||||||
|
|
||||||
function comments(elm) {
|
|
||||||
var link = document.getElementById('comment-add');
|
|
||||||
link.href = "mai" + "lto:" + getAddress() + "?subject=" + link.dataset.title;
|
|
||||||
elm.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
function contact() {
|
|
||||||
var link = document.getElementById('contact');
|
|
||||||
if (link) {
|
|
||||||
link.href = "mai" + "lto:" + getAddress();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
obfuscates();
|
||||||
function changeTheme() {
|
function changeTheme() {
|
||||||
// https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/#using-javascript-local-storage
|
// https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/#using-javascript-local-storage
|
||||||
const btn = document.querySelector(".btn-toggle");
|
const btn = document.querySelector(".btn-toggle");
|
||||||
|
@ -51,8 +32,7 @@ function changeTheme() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
// menu();
|
obfuscates();
|
||||||
contact();
|
|
||||||
changeTheme();
|
changeTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"*": [
|
||||||
|
"../themes/hugo-theme-lowtech/assets/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -137,3 +137,4 @@ h1
|
||||||
@import "./header"
|
@import "./header"
|
||||||
@import "./footer"
|
@import "./footer"
|
||||||
@import "./container"
|
@import "./container"
|
||||||
|
@import "../../themes/hugo-theme-lowtech/assets/styles/obfuscates"
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
<section id="contact" class="section container column center">
|
<section id="contact" class="section container column center">
|
||||||
<h2>Vous avez une idée, un projet ?<br>Contactez- moi !</h2>
|
<h2>Vous avez une idée, un projet ?<br>Contactez- moi !</h2>
|
||||||
<h3 class="cadre"><a href="mailto:simon@weko.io">simon@weko.io</a><a href="tel:+33757180168">07 57 18 01 68</a></h3>
|
<h3 class="cadre">{{ partial "contact/mail" . }}{{ partial "contact/telephone" . }}</h3>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="section secondary">
|
<section class="section secondary">
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 84539d10ae89ce04863046ca7f59551bd2f71427
|
Subproject commit b8ae0a19caab89b6454d7198b1a11abdbb3d6daf
|
Loading…
Reference in New Issue