mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-20 01:09:35 +05:30
(feat): made embed code dynamicaly genrated for every page
This commit is contained in:
@@ -126,7 +126,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="text-xs my-3 text-accent_three">EMBED THIS PAGE</p>
|
<p class="text-xs my-3 text-accent_three">EMBED THIS PAGE</p>
|
||||||
<div class="embedpagecode w-full bg-bg_primary p-4 rounded-lg">
|
<div class="embedpagecode w-full bg-bg_primary p-4 rounded-lg">
|
||||||
<pre class="text-accent_four text-xs whitespace-pre-wrap"><code><iframe src="https://localhost/neosubhamoy/htdocs/projects" height="200" width="300" title="test iframe"></iframe></code></pre>
|
<pre class="text-accent_four text-xs whitespace-pre-wrap"><code id="embedcodetag"><iframe src="https://neosubhamoy.dev" height="200" width="300" title="test iframe"></iframe></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const searchDef = document.getElementById("defresults");
|
|||||||
const searchRes = document.getElementById("searchresults");
|
const searchRes = document.getElementById("searchresults");
|
||||||
const qrCode = document.getElementById("pageqrcode");
|
const qrCode = document.getElementById("pageqrcode");
|
||||||
const linkInput = document.getElementById("pageurlinput");
|
const linkInput = document.getElementById("pageurlinput");
|
||||||
|
const embedCode = document.getElementById("embedcodetag");
|
||||||
const basePath = document.getElementById('phpHostBasePath').dataset.basePath;
|
const basePath = document.getElementById('phpHostBasePath').dataset.basePath;
|
||||||
let lastScrollTop = 0;
|
let lastScrollTop = 0;
|
||||||
|
|
||||||
@@ -308,6 +309,8 @@ function activate_share() {
|
|||||||
qrCode.src = "https://api.qrserver.com/v1/create-qr-code/?data=" + window.location.href + "&color=38BDF8&bgcolor=0F172A";
|
qrCode.src = "https://api.qrserver.com/v1/create-qr-code/?data=" + window.location.href + "&color=38BDF8&bgcolor=0F172A";
|
||||||
//change pageUrlInput value to current page
|
//change pageUrlInput value to current page
|
||||||
linkInput.value = window.location.href;
|
linkInput.value = window.location.href;
|
||||||
|
//genrate embed code for current page link
|
||||||
|
embedCode.innerHTML = '<iframe src="' + window.location.href + '" height="200" width="300" title="embed-neosubhamoy-portfolio"></iframe>';
|
||||||
windowWrapper.classList.remove("hidden");
|
windowWrapper.classList.remove("hidden");
|
||||||
windowWrapper.classList.add("flotingbar-window-wrapper-show");
|
windowWrapper.classList.add("flotingbar-window-wrapper-show");
|
||||||
shareBtn.classList.add("hidden");
|
shareBtn.classList.add("hidden");
|
||||||
|
|||||||
Reference in New Issue
Block a user