Added email replace

This commit is contained in:
James Dinh 2023-01-28 14:03:34 -08:00
parent 4651772fda
commit 76e2d689fb
5 changed files with 25 additions and 23 deletions

View File

@ -13,6 +13,7 @@
<!-- <link rel="icon" href="img/icon.ico"> -->
<!-- JavaScript Refs -->
<script defer src="js/general.js"></script>
<script src="js/jquery-3.6.1.min.js"></script>
<script defer src="js/contact.js"></script>
<style>

View File

@ -53,7 +53,7 @@
</div>
<main>
<div class="buy-info">
<h2>Interested in buying a piece? Contact me at<br><a class="email-link" target="_blank" href="mailto:nancypannikkat-at-gmail-dot-com">nancypannikkat (at) gmail (dot) com</a></h2><br><br>
<h2>Interested in buying a piece? Contact me at<br><a class="email-link email-replace" target="_blank" href="mailto:nancypannikkat-at-gmail-dot-com">nancypannikkat (at) gmail (dot) com</a></h2><br><br>
<h2>Or call me at<br><span class="emphasis-text">650-793-3954</span></h2>
</div>
</main>

View File

@ -21,6 +21,7 @@
<!-- JavaScript Refs -->
<script defer src="js/general.js"></script>
<script defer src="js/splide.min.js"></script>
<script defer src="js/slideshow.js"></script>
<!-- <script defer src="js/jquery-3.6.1.min.js"></script>
<script defer src="js/jquery.watermark.min.js"></script>
<script defer src="js/applywatermark.js"></script> -->

View File

@ -1,24 +1,4 @@
document.addEventListener( 'DOMContentLoaded', function() {
var splide = new Splide( '.splide', {
type : 'loop',
perPage: 1,
focus : 'center',
autoWidth: true,
autoplay: true,
mediaQuery: 'max',
breakpoints: {
1000: {
destroy: true,
},
},
lazyLoad: true,
keyboard: true,
isNavigation: true,
pauseOnFocus: true,
speed: 2000,
interval: 7000,
} );
splide.mount();
window.onload = function() {
uncheck('menu-btn');
};
@ -33,8 +13,8 @@ document.addEventListener( 'DOMContentLoaded', function() {
}
}
const tech_emails = document.querySelectorAll('.email-replace');
tech_emails.forEach(entry => {
const emails = document.querySelectorAll('.email-replace');
emails.forEach(entry => {
setAttributes(entry, {"href": "mailto:nancypannikkat" + "@" + "gmail.com?subject=Art Purchase Inquiry", "target": "_blank"});
entry.innerHTML = "nancypannikkat" + "@" + "gmail.com";
});

20
js/slideshow.js Normal file
View File

@ -0,0 +1,20 @@
var splide = new Splide( '.splide', {
type : 'loop',
perPage: 1,
focus : 'center',
autoWidth: true,
autoplay: true,
mediaQuery: 'max',
breakpoints: {
1000: {
destroy: true,
},
},
lazyLoad: true,
keyboard: true,
isNavigation: true,
pauseOnFocus: true,
speed: 2000,
interval: 7000,
} );
splide.mount();