1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-19 22:53:03 +05:30

(feature): implemented dynamic socials section for mobile navbar

This commit is contained in:
2023-11-02 00:23:59 +05:30
parent a6e11fc047
commit 7e18620bd8
3 changed files with 20 additions and 12 deletions

View File

@@ -34,13 +34,13 @@
<h6 class="font-bold mb-8">Follow Me On</h6> <h6 class="font-bold mb-8">Follow Me On</h6>
<?php <?php
$socials = fetch_all_records($conn, "socials"); $footer_socials = fetch_all_records($conn, "socials");
if($socials -> num_rows > 0) { if($footer_socials -> num_rows > 0) {
//show all social links //show all social links
while($social = $socials -> fetch_assoc()) { while($footer_social = $footer_socials -> fetch_assoc()) {
echo " echo "
<a class='text-sm text-accent_three my-1 hover:text-accent_secondary transition transform duration-100' href='".$social['link']."' target='_blank'>".$social['platform']."</a> <a class='text-sm text-accent_three my-1 hover:text-accent_secondary transition transform duration-100' href='".$footer_social['link']."' target='_blank'>".$footer_social['platform']."</a>
"; ";
} }
} }

View File

@@ -58,12 +58,20 @@ function isPageActive($pageName) {
<div class="mobilemenufooter w-full flex flex-col mb-20"> <div class="mobilemenufooter w-full flex flex-col mb-20">
<button class="mx-6 px-7 py-2 border-[2px] border-accent_primary rounded-lg hover:rounded-lg hover:shadow-lg hover:shadow-accent_primary_transparent transition transform duration-500" onclick="location.href='contact.php'">Let's Talk</button> <button class="mx-6 px-7 py-2 border-[2px] border-accent_primary rounded-lg hover:rounded-lg hover:shadow-lg hover:shadow-accent_primary_transparent transition transform duration-500" onclick="location.href='contact.php'">Let's Talk</button>
<div class="flex justify-center items-center mt-7 text-xl"> <div class="flex justify-center items-center mt-7 text-xl">
<i class="fa-brands fa-facebook text-accent_primary mx-2" onclick="window.open('https://www.facebook.com/profile.php?id=100076097318726')"></i> <?php
<i class="fa-brands fa-instagram text-accent_primary mx-2" onclick="window.open('https://instagram.com/neo_subhamoy')"></i>
<i class="fa-brands fa-twitter text-accent_primary mx-2" onclick="window.open('https://twitter.com/neo_subhamoy')"></i> $header_socials = fetch_all_records($conn, "socials");
<i class="fa-brands fa-linkedin text-accent_primary mx-2" onclick="window.open('https://www.linkedin.com/in/neo-subhamoy')"></i>
<i class="fa-brands fa-github text-accent_primary mx-2" onclick="window.open('https://github.com/neosubhamoy')"></i> if($header_socials -> num_rows > 0) {
<i class="fa-brands fa-mastodon text-accent_primary mx-2" onclick="window.open('https://mastodon.social/@neo_subhamoy')"></i> //show all social links
while($header_social = $header_socials -> fetch_assoc()) {
echo "
<i class='text-accent_primary mx-2 ".$header_social['icon']."' onclick=\"window.open('".$header_social['link']."')\"></i>
";
}
}
?>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -3,5 +3,5 @@
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Upright&family=Lexend+Deca:wght@100;300;400&family=Poppins&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Cormorant+Upright&family=Lexend+Deca:wght@100;300;400&family=Poppins&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/style.css"> <link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/extra-style.css"> <link rel="stylesheet" href="assets/extra-style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" integrity="sha512-fD9DI5bZwQxOi7MhYWnnNPlvXdp/2Pj3XSTRrFs5FQa4mizyGLnJcN6tuvUS6LbmgN1ut+XGSABKvjN0H6Aoow==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/js/all.min.js" integrity="sha512-uKQ39gEGiyUJl4AI6L+ekBdGKpGw4xJ55+xyJG7YFlJokPNYegn9KwQ3P8A7aFQAUtUsAQHep+d/lrGqrbPIDQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://code.jquery.com/jquery-3.7.0.js" integrity="sha256-JlqSTELeR4TLqP0OG9dxM7yDPqX1ox/HfgiSLBj8+kM=" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.7.0.js" integrity="sha256-JlqSTELeR4TLqP0OG9dxM7yDPqX1ox/HfgiSLBj8+kM=" crossorigin="anonymous"></script>