update prideflag.js
This commit is contained in:
parent
70825ae875
commit
b7fce821b4
|
@ -1,10 +1,18 @@
|
||||||
/**
|
//
|
||||||
* 🏳️🌈🏳️⚧️💖 pride flag 💖🏳️⚧️🏳️🌈
|
// pride flag - copyright (c) 2024 ari melody
|
||||||
* made with ❤️ by ari melody, 2023
|
//
|
||||||
*
|
// this code is provided AS-IS, WITHOUT ANY WARRANTY, to be
|
||||||
* web: https://arimelody.me
|
// freely redistributed and/or modified as you please, however
|
||||||
* source: https://github.com/mellodoot/prideflag
|
// retaining this license in any redistribution.
|
||||||
*/
|
//
|
||||||
|
// please use this flag to link to an LGBTQI+-supporting page
|
||||||
|
// of your choosing!
|
||||||
|
//
|
||||||
|
// web: https://arimelody.me
|
||||||
|
// source: https://git.arimelody.me/ari/prideflag
|
||||||
|
//
|
||||||
|
|
||||||
|
const pride_url = "https://git.arimelody.me/ari/prideflag";
|
||||||
|
|
||||||
const pride_flag_svg =
|
const pride_flag_svg =
|
||||||
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120">
|
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120">
|
||||||
|
@ -26,7 +34,7 @@ const pride_flag_svg =
|
||||||
</svg>`;
|
</svg>`;
|
||||||
|
|
||||||
const pride_flag_css =
|
const pride_flag_css =
|
||||||
`#pride-flag svg {
|
`#prideflag {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -36,23 +44,23 @@ const pride_flag_css =
|
||||||
z-index: 8008135;
|
z-index: 8008135;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
#pride-flag svg:hover {
|
#prideflag:hover {
|
||||||
transform: scale(110%);
|
transform: scale(110%);
|
||||||
}
|
}
|
||||||
#pride-flag svg:active {
|
#prideflag:active {
|
||||||
transform: scale(110%);
|
transform: scale(110%);
|
||||||
}
|
}
|
||||||
#pride-flag svg * {
|
#prideflag * {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
function create_pride_flag() {
|
function create_pride_flag() {
|
||||||
const container = document.createElement("a");
|
const flag = document.createElement("a");
|
||||||
container.id = "pride-flag";
|
flag.id = "prideflag";
|
||||||
container.href = "https://github.com/mellodoot/prideflag";
|
flag.href = pride_url;
|
||||||
container.target = "_blank";
|
flag.target = "_blank";
|
||||||
container.innerHTML = pride_flag_svg;
|
flag.innerHTML = pride_flag_svg;
|
||||||
return container;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
function load_pride_flag_style() {
|
function load_pride_flag_style() {
|
||||||
|
@ -62,5 +70,5 @@ function load_pride_flag_style() {
|
||||||
}
|
}
|
||||||
|
|
||||||
load_pride_flag_style();
|
load_pride_flag_style();
|
||||||
pride_flag = create_pride_flag();
|
flag = create_pride_flag();
|
||||||
document.querySelector("main").appendChild(pride_flag);
|
document.body.appendChild(flag);
|
||||||
|
|
Loading…
Reference in a new issue