-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshare.html
56 lines (53 loc) · 3.14 KB
/
share.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="//ui.piterator.xyz/quligem-ui/css/quligem.css" rel="stylesheet" />
<title>OIer's Logo | New Version</title>
</head>
<body style="width: 640px; height: 400px" onselectstart="return false">
<div id="logo_holder" style="width: 640px; height: 400px; background-color: rgb(0, 181, 173); color: rgba(255, 255, 255); border-radius: 24px; box-sizing: border-box" oncontextmenu=self.event.returnValue=false>
<div style="height: 136px"></div>
<h1 id="logo_title" style="text-align: center; font-size: 48px" class="center">Logo for OIers</h1>
<p id="logo_slogan" style="text-align: center; font-size: 28px;" class="center">https://logo.oier.fun/</p>
<p id="logo_made_by" style="font-size: 16px; position: absolute; bottom: 0; width: 100%; text-align: center">Made By logo.oier.fun</p>
</div>
<a id="svg" class="button blue reversal" style="width: 640px; text-decoration: none" target="_blank">右击下载 SVG</a>
<script src="https://static.piterator.com/node_modules/jquery/dist/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/dom-to-image/dist/dom-to-image.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" defer>
window.onload = function(){
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var reg = /^\s*$/;
if(reg.test(getUrlParam("tt"))) $('#logo_title').text("Logo for OIers");
else $('#logo_title').text(getUrlParam("tt"));
val=getUrlParam("sg");
if(reg.test(getUrlParam("sg"))) $('#logo_slogan').text("https://logo.oier.fun/");
else $('#logo_slogan').text(getUrlParam("sg"));
if(getUrlParam("bf")!="false"){
$('#logo_holder').css("background-color",getUrlParam("cr"));
$('#logo_holder').css("color","#ffffff");
$('#logo_holder').css("border","none");
}else{
$('#logo_holder').css("background-color","#ffffff");
$('#logo_holder').css("color",getUrlParam("cr"));
$('#logo_holder').css("border","4px solid "+getUrlParam("cr"));
}
$('#logo_title').css("font-weight",getUrlParam("ttb"));
$('#logo_slogan').css("font-weight",getUrlParam("sgb"));
if(getUrlParam("br")!="false") $('#logo_holder').css("border-radius","24px");
else $('#logo_holder').css("border-radius","0px");
if(getUrlParam("mb")!="false") $('#logo_made_by').css("display","block");
else $('#logo_made_by').css("display","none");
domtoimage.toSvg(document.getElementById('logo_holder')).then(function (dataUrl) {
$("#svg").attr("href",dataUrl);
});
};
</script>
</body>
</html>