icon+wrappercode

This commit is contained in:
Valentin Boettcher 2019-01-01 21:10:21 +01:00
parent 4b2b23c2ed
commit 80961773cb
3 changed files with 81 additions and 5 deletions

69
icon/icon.svg Normal file
View file

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg8"
version="1.1"
viewBox="0 0 210 210"
height="210mm"
width="210mm">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-87)"
id="layer1">
<text
transform="scale(0.75636672,1.32211)"
id="text3723"
y="195.51381"
x="-80.762886"
style="font-style:normal;font-weight:normal;font-size:147.57217407px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.27600777"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:147.57217407px;font-family:'Fira Code';-inkscape-font-specification:'Fira Code';stroke-width:0.27600777"
y="195.51381"
x="-80.762886"
id="tspan3721"> ( )</tspan></text>
<flowRoot
style="fill:black;fill-opacity:1;stroke:none;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;letter-spacing:0px;word-spacing:0px"
id="flowRoot3725"
xml:space="preserve"><flowRegion
id="flowRegion3727"><rect
y="232.27223"
x="17.142857"
height="112.85714"
width="58.57143"
id="rect3729" /></flowRegion><flowPara
id="flowPara3731"></flowPara></flowRoot> <g
style="fill:#000000;stroke:none"
transform="matrix(0.00893188,-0.00238274,-0.00240936,-0.00907848,63.546025,254.34852)"
id="g3741">
<path
d="m 11870,11945 c -19,-7 -91,-42 -160,-77 -187,-96 -231,-97 -443,-6 -154,65 -217,73 -264,34 -47,-40 -50,-85 -19,-268 16,-97 23,-169 19,-198 -9,-74 -47,-139 -143,-250 -132,-153 -154,-210 -105,-269 33,-38 91,-57 238,-76 217,-29 271,-64 382,-250 84,-140 138,-195 191,-195 63,0 95,34 175,192 113,224 149,252 385,308 140,33 199,61 220,102 32,61 7,106 -136,249 -73,72 -126,135 -141,165 -23,48 -24,54 -21,259 3,223 -2,252 -44,280 -28,18 -86,18 -134,0 z"
id="path3733" />
<path
d="m 8590,11439 c -19,-12 -69,-54 -111,-94 -41,-39 -100,-84 -131,-99 -51,-25 -66,-27 -199,-30 -148,-3 -187,-12 -219,-51 -27,-32 -14,-100 38,-213 28,-59 53,-117 57,-130 15,-53 5,-139 -29,-250 -46,-146 -47,-184 -4,-224 36,-33 31,-33 288,-12 98,8 142,-5 235,-69 188,-129 217,-139 274,-91 33,28 50,76 76,213 26,137 61,190 185,276 197,138 194,213 -15,325 -151,81 -184,119 -236,279 -38,117 -51,143 -85,170 -34,27 -80,27 -124,0 z"
id="path3735" />
<path
d="M 5047,5777 -1,735 367,368 735,0 l 5045,5045 5045,5045 -365,364 -365,365 z"
id="path3737" />
<path
d="m 10925,9408 c -16,-6 -74,-39 -128,-74 -132,-84 -173,-93 -315,-71 -164,26 -206,21 -238,-28 -24,-36 -21,-93 11,-210 40,-145 34,-203 -34,-335 -77,-150 -79,-220 -7,-257 17,-9 78,-18 155,-23 69,-5 142,-14 161,-21 49,-17 107,-59 165,-119 78,-81 122,-110 168,-110 57,0 96,45 137,157 59,165 92,202 250,283 190,98 199,168 38,296 -140,112 -167,156 -193,317 -17,108 -32,153 -62,179 -25,23 -71,30 -108,16 z"
id="path3739" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -49,14 +49,20 @@ function wrapInner(parent, wrapper, attribute, attributevalue) {
} }
} }
function wrapInner(parent, wrapper, className) {
if (typeof wrapper === "string")
wrapper = document.createElement(wrapper);
wrapper.classList.add(className);
var div = parent.appendChild(wrapper);
while(parent.firstChild !== wrapper)
wrapper.appendChild(parent.firstChild);
}
// Wrap the insides of the <pre> tags in <code> tags for highlight.js
function wrapPre() { function wrapPre() {
for(let el of document.querySelectorAll('pre')) { for(let el of document.querySelectorAll('pre')) {
let orig = el.innerHTML; wrapInner(el, 'code', 'lisp');
el.innerHTML = '<code class="lisp">' + orig + "</code>";
} }
} }

View file

@ -6,7 +6,8 @@
"description": "Adds a simple table of contents and syntax highlighting to the web version of Practical Common Lisp by Peter Seibel.", "description": "Adds a simple table of contents and syntax highlighting to the web version of Practical Common Lisp by Peter Seibel.",
"icons": { "icons": {
"48": "icons/border-48.png" "48": "./icon/icon.svg",
"96": "./icon/icon.svg"
}, },
"background": { "background": {