mirror of
https://github.com/hnasheralneam/hnasheralneam.github.io.git
synced 2025-06-06 13:24:16 -04:00
Save theme color across pages
This commit is contained in:
parent
9c0a834c71
commit
ebb8568ca1
8 changed files with 46 additions and 85 deletions
|
@ -40,31 +40,7 @@
|
|||
<div w3-include-html="partials/menu.html"></div>
|
||||
</body>
|
||||
<script src="scripts/include-html.js"></script>
|
||||
<script>
|
||||
let url = document.location.href;
|
||||
|
||||
function copy(txt) {
|
||||
let link = `${url}#${txt}`;
|
||||
navigator.clipboard.writeText(link).then(() => {
|
||||
console.log("Copied link!");
|
||||
}, () => { console.log("Error copying link."); });
|
||||
let alert = document.createElement("DIV");
|
||||
alert.textContent = "Copied Link to Heading!";
|
||||
alert.classList.add("tempAlert");
|
||||
document.body.appendChild(alert);
|
||||
setTimeout(() => {
|
||||
alert.style.opacity = "1";
|
||||
alert.style.bottom = ".5rem";
|
||||
}, 200);
|
||||
setTimeout(() => {
|
||||
alert.style.opacity = "0";
|
||||
alert.style.bottom = "-10rem";
|
||||
}, 4200);
|
||||
setTimeout(() => {
|
||||
alert.remove();
|
||||
}, 4400);
|
||||
|
||||
}
|
||||
</script>
|
||||
<script src="scripts/script.js"></script>
|
||||
<script src="scripts/copypopup.js"></script>
|
||||
<script defer src="https://umami.hnasheralneam.dev/script.js" data-website-id="22e45953-378d-4e42-afe7-b31c197d3105"></script>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue