Minified the svg, and renamed an embed type

This commit is contained in:
MathMan05 2024-06-20 13:56:45 -05:00
parent 5ebf3befb2
commit ea0a8d963c
3 changed files with 17 additions and 62 deletions

View file

@ -1,59 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 135.46667 135.46667"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g
id="layer1">
<path
style="fill:#000080;stroke-width:0.282017"
d="M 5.306501,0.62230439 101.47237,0.09090777 125.87228,70.356052 24.382575,70.916865 -0.01732713,0.65172298 Z"
id="path23" />
<path
style="fill:#000036;fill-opacity:1;stroke-width:0.282017"
d="m 99.495684,0.40566193 1.872866,-0.20023198 24.3999,70.26514405 -7.1967,0.229649 L 94.171856,0.43508093 Z"
id="path23-7" />
<ellipse
style="fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="path26-6"
cx="74.42955"
cy="54.083569"
rx="7.3397198"
ry="21.623062" />
<ellipse
style="fill:#000000;fill-opacity:1;stroke-width:0.264583"
id="path26"
cx="39.869553"
cy="54.081467"
rx="7.3397198"
ry="21.623062" />
<path
style="fill:#000080;stroke-width:0.282017"
d="M 15.457353,65.373696 111.62322,64.8423 136.02313,135.10744 34.533427,135.66826 10.133525,65.403115 Z"
id="path23-2" />
<path
style="fill:#000034;fill-opacity:1;stroke-width:0.282017"
d="m 37.992976,130.37618 96.165874,-0.53139 1.74646,5.69168 -101.489707,0.56082 -1.746455,-5.69169 z"
id="path23-2-2" />
<path
style="fill:#000036;fill-opacity:1;stroke-width:0.282017"
d="m 111.37573,71.044452 1.87287,-0.200232 22.77044,64.98545 -7.1967,0.22965 -22.77044,-64.985449 z"
id="path23-7-6" />
<path
d="m 33.418603,65.251671 -12.46797,0.06925 a 7.3397198,21.623062 0 0 0 6.22649,10.430888 7.3397198,21.623062 0 0 0 6.24148,-10.500135 z"
style="stroke-width:0.264583"
id="path27" />
<path
d="m 55.468943,65.130232 a 7.3397198,21.623062 0 0 0 6.26835,10.623641 7.3397198,21.623062 0 0 0 6.28282,-10.693404 z"
style="stroke-width:0.264583"
id="path28" />
</g>
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512" height="512" version="1.1" viewBox="0 0 135.47 135.47" xmlns="http://www.w3.org/2000/svg">
<path d="m5.3065 0.6223 96.166-0.5314 24.4 70.265-101.49 0.56081-24.4-70.265z" fill="#000080" stroke-width=".28202"/>
<path d="m99.496 0.40566 1.8729-0.20023 24.4 70.265-7.1967 0.22965-24.4-70.265z" fill="#000036" stroke-width=".28202"/>
<ellipse cx="74.43" cy="54.084" rx="7.3397" ry="21.623" stroke-width=".26458"/>
<ellipse cx="39.87" cy="54.081" rx="7.3397" ry="21.623" stroke-width=".26458"/>
<path d="m15.457 65.374 96.166-0.5314 24.4 70.265-101.49 0.56082-24.4-70.265z" fill="#000080" stroke-width=".28202"/>
<path d="m37.993 130.38 96.166-0.53139 1.7465 5.6917-101.49 0.56082-1.7465-5.6917z" fill="#000034" stroke-width=".28202"/>
<path d="m111.38 71.044 1.8729-0.20023 22.77 64.985-7.1967 0.22965-22.77-64.985z" fill="#000036" stroke-width=".28202"/>
<path d="m33.419 65.252-12.468 0.06925a7.3397 21.623 0 0 0 6.2265 10.431 7.3397 21.623 0 0 0 6.2415-10.5z" stroke-width=".26458"/>
<path d="m55.469 65.13a7.3397 21.623 0 0 0 6.2684 10.624 7.3397 21.623 0 0 0 6.2828-10.693z" stroke-width=".26458"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -6,12 +6,12 @@ class embed{
this.json=json;
}
getType(json){
return json.type||"form";
return json.type||"rich";
}
generateHTML(){
switch(this.type){
case "form":
return this.generateForm();
case "rich":
return this.generateRich();
case "image":
return this.generateImage();
case "link":
@ -23,7 +23,7 @@ class embed{
return document.createElement("div");//prevent errors by giving blank div
}
}
generateForm(){
generateRich(){
const div=document.createElement("div");
div.style.backgroundColor="#"+this.json.color.toString(16);
div.classList.add("embed-color");

View file

@ -920,6 +920,8 @@ span {
}
.linkembed{
max-width:5in;
border: solid;
border-color: var(--settings-hover);
}
.bigembedimg {
cursor: pointer;