feat: update pico and screen emails
This commit is contained in:
parent
b537cd641d
commit
20beeb6007
|
@ -0,0 +1,54 @@
|
|||
/* Pink color for light color scheme (Default) */
|
||||
/* Can be forced with data-theme="light" */
|
||||
[data-theme=light],
|
||||
:root:not([data-theme=dark]) {
|
||||
--pico-text-selection-color: rgba(246, 84, 126, 0.25);
|
||||
--pico-primary: #c72259;
|
||||
--pico-primary-background: #d92662;
|
||||
--pico-primary-underline: rgba(199, 34, 89, 0.5);
|
||||
--pico-primary-hover: #9d1945;
|
||||
--pico-primary-hover-background: #c72259;
|
||||
--pico-primary-focus: rgba(246, 84, 126, 0.25);
|
||||
--pico-primary-inverse: #fff;
|
||||
}
|
||||
|
||||
/* Pink color for dark color scheme (Auto) */
|
||||
/* Automatically enabled if user has Dark mode enabled */
|
||||
@media only screen and (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme]) {
|
||||
--pico-text-selection-color: rgba(247, 112, 142, 0.1875);
|
||||
--pico-primary: #f7708e;
|
||||
--pico-primary-background: #d92662;
|
||||
--pico-primary-underline: rgba(247, 112, 142, 0.5);
|
||||
--pico-primary-hover: #f99eae;
|
||||
--pico-primary-hover-background: #f42c6f;
|
||||
--pico-primary-focus: rgba(247, 112, 142, 0.25);
|
||||
--pico-primary-inverse: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pink color for dark color scheme (Forced) */
|
||||
/* Enabled if forced with data-theme="dark" */
|
||||
[data-theme=dark] {
|
||||
--pico-text-selection-color: rgba(247, 112, 142, 0.1875);
|
||||
--pico-primary: #f7708e;
|
||||
--pico-primary-background: #d92662;
|
||||
--pico-primary-underline: rgba(247, 112, 142, 0.5);
|
||||
--pico-primary-hover: #f99eae;
|
||||
--pico-primary-hover-background: #f42c6f;
|
||||
--pico-primary-focus: rgba(247, 112, 142, 0.25);
|
||||
--pico-primary-inverse: #fff;
|
||||
}
|
||||
|
||||
main > article:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
main > article:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
article > header > hgroup {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
@ -1,15 +1,3 @@
|
|||
main > article:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
main > article:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
article > header > hgroup {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
article.donate-location {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
main > article:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
main > article:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
article > header > hgroup {
|
||||
margin-bottom: 0;
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Donate to Anna</title>
|
||||
<link rel="stylesheet" href="/css/pico.min.css"/>
|
||||
<link rel="stylesheet" href="/css/custom.css"/>
|
||||
<link rel="stylesheet" href="/css/donate.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
|
20
index.html
20
index.html
|
@ -24,7 +24,7 @@
|
|||
|
||||
<title>I'm Anna</title>
|
||||
<link rel="stylesheet" href="/css/pico.min.css"/>
|
||||
<link rel="stylesheet" href="/css/index.css"/>
|
||||
<link rel="stylesheet" href="/css/custom.css"/>
|
||||
<script defer src="/js/index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -61,5 +61,23 @@
|
|||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<dialog>
|
||||
<article>
|
||||
<header>
|
||||
<strong>Email screening</strong>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
Are you going to use my email address to send me an email about a
|
||||
Dalamud plugin?
|
||||
</p>
|
||||
|
||||
<footer>
|
||||
<button id='yes-button'>Yes</button>
|
||||
<button id='no-button'>No</button>
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
</body>
|
||||
</html>
|
||||
|
|
43
js/index.js
43
js/index.js
|
@ -3,14 +3,51 @@
|
|||
return s.replace(/[a-zA-Z]/g,(c)=>String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26));
|
||||
}
|
||||
|
||||
let reveal = document.getElementById('email');
|
||||
const reveal = document.getElementById('email');
|
||||
const dialog = document.querySelector('dialog');
|
||||
reveal.addEventListener('click', () => {
|
||||
let email = 'si' + atob('dGVAYW4=') + 'na' + atob(y('L2kyoJIhpl5c')) + 'o';
|
||||
dialog.setAttribute('open', 'open');
|
||||
});
|
||||
|
||||
let emailLink = document.createElement('a');
|
||||
function revealEmail() {
|
||||
const email = 'si' + atob('dGVAYW4=') + 'na' + atob(y('L2kyoJIhpl5c')) + 'o';
|
||||
|
||||
const emailLink = document.createElement('a');
|
||||
emailLink.setAttribute('href', `mailto:${email}`);
|
||||
emailLink.innerText = email;
|
||||
|
||||
reveal.replaceWith(emailLink);
|
||||
}
|
||||
|
||||
function notInterested() {
|
||||
const notInterested = document.createElement('span');
|
||||
notInterested.innerText = 'I am not interested in your email.';
|
||||
|
||||
reveal.replaceWith(notInterested);
|
||||
}
|
||||
|
||||
const yesButton = dialog.querySelector('#yes-button');
|
||||
const noButton = dialog.querySelector('#no-button');
|
||||
|
||||
yesButton.addEventListener('click', () => {
|
||||
dialog.removeAttribute('open');
|
||||
|
||||
localStorage.canSeeEmail = false;
|
||||
|
||||
notInterested();
|
||||
});
|
||||
|
||||
noButton.addEventListener('click', () => {
|
||||
dialog.removeAttribute('open');
|
||||
|
||||
localStorage.canSeeEmail = true;
|
||||
|
||||
revealEmail();
|
||||
});
|
||||
|
||||
if (localStorage.canSeeEmail === 'true') {
|
||||
revealEmail();
|
||||
} else if (localStorage.canSeeEmail === 'false') {
|
||||
notInterested();
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue