Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KaptenMel authored May 16, 2024
1 parent 8d7e9a4 commit 03ade92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 30 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<div class="container">
<h1 class="title">Novatix</h1>
<p class="description">Here you can find everything like the games I make or stuff like my YouTube, Twitter, or even my Patreon! :D</p>
<p class="description">Want to find all my projects and socials? Well, here is the place! :D</p>
<div class="social-links">
<a href="https://twitter.com/kaptenmel_dev" target="_blank" class="social-link twitter">Twitter</a>
<a href="https://www.youtube.com/channel/UCEOl9f_Tame0bIL_JakJaHA" target="_blank" class="social-link youtube">YouTube</a>
Expand All @@ -20,8 +20,8 @@ <h1 class="title">Novatix</h1>
</div>
</div>
<div class="footer">
<p class="footer-text">If anyone wants to team up, feel free to reach out on Twitter!</p>
<a href="https://www.youtube.com/watch?v=xvFZjo5PgG0" target="_blank" class="small-button">What does this button do?</a>
<p class="footer-text">For business inquiries or collaboration opportunities, please contact us via email at <a href="mailto:[email protected]">[email protected]</a></p>
<a href="https://www.youtube.com/watch?v=xvFZjo5PgG0" target="_blank" class="small-button">I wonder what this button does</a>
</div>
<script src="script.js"></script>
</body>
Expand Down
37 changes: 10 additions & 27 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,15 @@ document.addEventListener('DOMContentLoaded', () => {
}
});

// Function to create a social link element
function createSocialLink(linkData) {
const link = document.createElement('a');
link.href = linkData.url;
link.target = "_blank";
link.classList.add('social-link');
link.classList.add(linkData.name.toLowerCase()); // Add class for styling
link.style.backgroundColor = linkData.bgColor;
link.textContent = linkData.name;
return link;
}

// Function to dynamically create and append social links
function createSocialLinks() {
const socialLinksContainer = document.querySelector('.social-links');
const existingLinks = socialLinksContainer.querySelectorAll('.social-link');
// Dynamic Button Effects
document.querySelectorAll('.social-link').forEach(button => {
button.addEventListener('mouseenter', () => {
button.style.transform = 'translateY(-2px)';
button.style.boxShadow = '0px 8px 12px rgba(0, 0, 0, 0.2)';
});

socialMediaLinks.forEach(linkData => {
// Check if a button with the same URL already exists
const exists = Array.from(existingLinks).some(link => link.href === linkData.url);
if (!exists) {
const link = createSocialLink(linkData);
socialLinksContainer.appendChild(link);
}
button.addEventListener('mouseleave', () => {
button.style.transform = 'translateY(0)';
button.style.boxShadow = '0px 4px 6px rgba(0, 0, 0, 0.1)';
});
}

// Call the function to create and append social links
createSocialLinks();
});

0 comments on commit 03ade92

Please sign in to comment.