mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-19 18:13:01 +05:30
(feat): initialised basic share button functions
This commit is contained in:
@@ -108,4 +108,5 @@
|
||||
</div>
|
||||
<button id="sharebutton" class="sharebutton bg-accent_primary px-[0.80rem] py-2 rounded-full mx-2 hover:shadow-[0px_0px_30px] hover:shadow-accent_primary_transparent transition transform duration-300"><i class="fa-solid fa-share-nodes text-bg_primary"></i></button>
|
||||
<button id="closebutton" class="closebutton bg-accent_primary px-[0.80rem] py-2 rounded-full mx-2 hover:shadow-[0px_0px_30px] hover:shadow-accent_primary_transparent transition transform duration-300 hidden"><i class="fa-solid fa-xmark text-bg_primary"></i></button>
|
||||
<button id="shareclosebutton" class="closebutton bg-accent_primary px-[0.80rem] py-2 rounded-full mx-2 hover:shadow-[0px_0px_30px] hover:shadow-accent_primary_transparent transition transform duration-300 hidden"><i class="fa-solid fa-xmark text-bg_primary"></i></button>
|
||||
</div>
|
||||
@@ -4,6 +4,7 @@ const floatingBar = document.getElementById("floating-bar");
|
||||
const searchBar = document.getElementById("searchbar");
|
||||
const shareBtn = document.getElementById("sharebutton");
|
||||
const closeBtn = document.getElementById("closebutton");
|
||||
const shareCloseBtn = document.getElementById("shareclosebutton");
|
||||
const searchTxt = document.getElementById("searchtext");
|
||||
const searchInput = document.getElementById("searchinput");
|
||||
const windowWrapper = document.getElementById("floatingwindowwrapper");
|
||||
@@ -294,4 +295,30 @@ searchInput.addEventListener('input', function() {
|
||||
else {
|
||||
fallback_search(searchDef, searchRes);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//---share window config starts here
|
||||
|
||||
function activate_share() {
|
||||
windowWrapper.classList.remove("hidden");
|
||||
windowWrapper.classList.add("flotingbar-window-wrapper-show");
|
||||
shareBtn.classList.add("hidden");
|
||||
shareCloseBtn.classList.remove("hidden");
|
||||
|
||||
}
|
||||
|
||||
function close_share() {
|
||||
windowWrapper.classList.remove("flotingbar-window-wrapper-show");
|
||||
windowWrapper.classList.add("hidden");
|
||||
shareCloseBtn.classList.add("hidden");
|
||||
shareBtn.classList.remove("hidden");
|
||||
}
|
||||
|
||||
shareBtn.addEventListener("click", function () {
|
||||
activate_share();
|
||||
});
|
||||
|
||||
shareCloseBtn.addEventListener("click", function () {
|
||||
close_share();
|
||||
});
|
||||
@@ -874,6 +874,10 @@ video {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.h-\[27px\] {
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.h-\[2px\] {
|
||||
height: 2px;
|
||||
}
|
||||
@@ -914,18 +918,6 @@ video {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.h-\[20px\] {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.h-\[25px\] {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.h-\[27px\] {
|
||||
height: 27px;
|
||||
}
|
||||
|
||||
.w-0 {
|
||||
width: 0px;
|
||||
}
|
||||
@@ -942,6 +934,10 @@ video {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.w-\[27px\] {
|
||||
width: 27px;
|
||||
}
|
||||
|
||||
.w-\[300px\] {
|
||||
width: 300px;
|
||||
}
|
||||
@@ -995,18 +991,6 @@ video {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.w-\[20px\] {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.w-\[25px\] {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.w-\[27px\] {
|
||||
width: 27px;
|
||||
}
|
||||
|
||||
.rotate-\[15deg\] {
|
||||
--tw-rotate: 15deg;
|
||||
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
||||
|
||||
Reference in New Issue
Block a user