55 < %= plugins .languages .unique % > Language< %= s (plugins .languages .unique ) % >
66 < / h2>
77 < / section>
8- < section class = " column" >
9- < h3 class = " field" >
10- Most used languages
11- < / h3>
12- < % if (plugins .languages .error ) { % >
13- < section>
14- < div class = " field error" >
15- < svg xmlns= " http://www.w3.org/2000/svg" viewBox= " 0 0 16 16" width= " 16" height= " 16" >< path fill- rule= " evenodd" d= " M2.343 13.657A8 8 0 1113.657 2.343 8 8 0 012.343 13.657zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z" >< / path>< / svg>
16- < %= plugins .languages .error .message % >
17- < / div>
18- < / section>
19- < % } else { const width = 460 * (1 + large) % >
20- < svg class = " bar" xmlns= " http://www.w3.org/2000/svg" width= " <%= width %>" height= " 8" >
21- < mask id= " languages-bar" >
22- < rect x= " 0" y= " 0" width= " <%= width %>" height= " 8" fill= " white" rx= " 5" / >
23- < / mask>
24- < rect mask= " url(#languages-bar)" x= " 0" y= " 0" width= " <%= plugins.languages.favorites.length ? 0 : width %>" height= " 8" fill= " #d1d5da" / >
25- < % for (const {name , value , color , x } of plugins .languages .favorites ) { % >
26- < rect mask= " url(#languages-bar)" x= " <%= x*width %>" y= " 0" width= " <%= value*width %>" height= " 8" fill= " <%= color %>" / >
27- < % } % >
28- < / svg>
29- < % if (plugins .languages .details ? .length ) { const rows = large ? [0 , 1 , 2 , 3 ] : [0 , 1 ] % >
30- < div class = " row fill-width" >
31- < % for (const row of rows) { % >
32- < section>
33- < % for (const {name , value , color , size } of plugins .languages .favorites .filter ((_ , i ) => i% rows .length === row)) { % >
34- < div class = " field language details" >
35- < div class = " field" >
36- < svg xmlns= " http://www.w3.org/2000/svg" viewBox= " 0 0 16 16" width= " 16" height= " 16" >< path fill= " <%= color %>" fill- rule= " evenodd" d= " M8 4a4 4 0 100 8 4 4 0 000-8z" >< / path>< / svg>
37- < %= name % >
38- < / div>
39- < small>
40- < % if (plugins .languages .details .includes (" bytes-size" )) { % > < div>< %= f .bytes (size) % >< / div>< % } % >
41- < % if (plugins .languages .details .includes (" percentage" )) { % > < div>< %= f .percentage (value) % >< / div>< % } % >
42- < / small>
43- < / div>
44- < % } % >
45- < / section>
46- < % } % >
47- < / div>
48- < % } else { % >
49- < div class = " field center horizontal-wrap fill-width" >
50- < % for (const {name , value , color } of plugins .languages .favorites ) { % >
51- < div class = " field center no-wrap language" >
52- < svg xmlns= " http://www.w3.org/2000/svg" viewBox= " 0 0 16 16" width= " 16" height= " 16" >< path fill= " <%= color %>" fill- rule= " evenodd" d= " M8 4a4 4 0 100 8 4 4 0 000-8z" >< / path>< / svg>
53- < %= name % >
54- < / div>
8+ < % for (const section of (plugins .languages .sections ?? [" error" ])) { const languages = {" most-used" : plugins .languages .favorites , " recently-used" : plugins .languages .recent }[section] % >
9+ < section class = " column" >
10+ < h3 class = " field" >
11+ < %= {" most-used" : " Most used languages" , " recently-used" : " Recently used languages" , error: " " }[section] % >
12+ < / h3>
13+ < % if (plugins .languages .error ) { % >
14+ < section>
15+ < div class = " field error" >
16+ < svg xmlns= " http://www.w3.org/2000/svg" viewBox= " 0 0 16 16" width= " 16" height= " 16" >< path fill- rule= " evenodd" d= " M2.343 13.657A8 8 0 1113.657 2.343 8 8 0 012.343 13.657zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z" >< / path>< / svg>
17+ < %= plugins .languages .error .message % >
18+ < / div>
19+ < / section>
20+ < % } else { const width = 460 * (1 + large) % >
21+ < svg class = " bar" xmlns= " http://www.w3.org/2000/svg" width= " <%= width %>" height= " 8" >
22+ < mask id= " languages-bar" >
23+ < rect x= " 0" y= " 0" width= " <%= width %>" height= " 8" fill= " white" rx= " 5" / >
24+ < / mask>
25+ < rect mask= " url(#languages-bar)" x= " 0" y= " 0" width= " <%= languages.length ? 0 : width %>" height= " 8" fill= " #d1d5da" / >
26+ < % for (const {name , value , color , x } of languages) { % >
27+ < rect mask= " url(#languages-bar)" x= " <%= x*width %>" y= " 0" width= " <%= value*width %>" height= " 8" fill= " <%= color ?? " #959DA5 " %>" / >
5528 < % } % >
56- < / div>
29+ < / svg>
30+ < % if (plugins .languages .details ? .length ) { const rows = large ? [0 , 1 , 2 , 3 ] : [0 , 1 ] % >
31+ < div class = " row fill-width" >
32+ < % for (const row of rows) { % >
33+ < section>
34+ < % for (const {name , value , lines , color , size } of languages .filter ((_ , i ) => i% rows .length === row)) { % >
35+ < div class = " field language details" >
36+ < div class = " field" >
37+ < svg xmlns= " http://www.w3.org/2000/svg" viewBox= " 0 0 16 16" width= " 16" height= " 16" >< path fill= " <%= color ?? " #959DA5 " %>" fill- rule= " evenodd" d= " M8 4a4 4 0 100 8 4 4 0 000-8z" >< / path>< / svg>
38+ < %= name % >
39+ < / div>
40+ < small>
41+ < % if (plugins .languages .details .includes (" lines" )) { % > < div>< %= f (lines) % > line< %= s (lines) % >< / div>< % } % >
42+ < % if (plugins .languages .details .includes (" bytes-size" )) { % > < div>< %= f .bytes (size) % >< / div>< % } % >
43+ < % if (plugins .languages .details .includes (" percentage" )) { % > < div>< %= f .percentage (value) % >< / div>< % } % >
44+ < / small>
45+ < / div>
46+ < % } % >
47+ < / section>
48+ < % } % >
49+ < / div>
50+ < % } else { % >
51+ < div class = " field center horizontal-wrap fill-width" >
52+ < % for (const {name , value , color } of languages) { % >
53+ < div class = " field center no-wrap language" >
54+ < svg xmlns= " http://www.w3.org/2000/svg" viewBox= " 0 0 16 16" width= " 16" height= " 16" >< path fill= " <%= color %>" fill- rule= " evenodd" d= " M8 4a4 4 0 100 8 4 4 0 000-8z" >< / path>< / svg>
55+ < %= name % >
56+ < / div>
57+ < % } % >
58+ < / div>
59+ < % } % >
5760 < % } % >
58- < % } % >
59- < / section >
61+ < / section >
62+ < % } % >
6063< % } % >
0 commit comments