Resize templates
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
})
|
||||
|
||||
//Base routes
|
||||
const limiter = ratelimit({max:60, windowMs:60*1000})
|
||||
const limiter = ratelimit({max:debug ? Number.MAX_SAFE_INTEGER : 60, windowMs:60*1000})
|
||||
const templates = [...new Set([conf.settings.templates.default, ...(conf.settings.templates.enabled.length ? Object.keys(Templates).filter(key => conf.settings.templates.enabled.includes(key)) : Object.keys(Templates))])]
|
||||
const enabled = Object.entries(plugins).filter(([key, plugin]) => plugin.enabled).map(([key]) => key)
|
||||
const actions = {flush:new Map()}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="<%= 0
|
||||
+ (!!base.header)*(16*6)
|
||||
+ (!!base.metadata)*(16*3)
|
||||
+ ((!!base.activity)||(!!base.community))*(16*10)
|
||||
+ (!!base.repositories)*(16*7)
|
||||
+ ((!!computed.plugins.traffic)||(!!computed.plugins.lines))*(16*2)
|
||||
+ (!!computed.plugins.followup)*(16*5)
|
||||
+ (!!computed.plugins.languages)*(16*6)
|
||||
+ (!!computed.plugins.pagespeed)*(16*9)
|
||||
+ (!!computed.plugins.habits)*(16*5)
|
||||
+ (!!base.header)*86
|
||||
+ (!!base.metadata)*42
|
||||
+ ((!!base.activity)||(!!base.community))*150
|
||||
+ (!!base.repositories)*100
|
||||
+ ((!!computed.plugins.traffic)||(!!computed.plugins.lines))*18
|
||||
+ (!!computed.plugins.followup)*72
|
||||
+ (!!computed.plugins.pagespeed)*128
|
||||
+ (!!computed.plugins.habits)*72
|
||||
+ (!!computed.plugins.languages)*96
|
||||
%>">
|
||||
<style>
|
||||
<%= style %>
|
||||
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@@ -1,14 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="<%= 48
|
||||
+ (!!base.header)*(16*5)
|
||||
+ (!!base.metadata)*(16*9)
|
||||
+ (!!base.activity)*(16*10)
|
||||
+ (!!base.community)*(16*9)
|
||||
+ (!!base.repositories)*(16*13)
|
||||
+ (!!computed.plugins.traffic)*(16*1)
|
||||
+ (!!computed.plugins.followup)*(16*6)
|
||||
+ (!!computed.plugins.lines)*(16*3)
|
||||
+ (!!computed.plugins.languages)*(16*12)
|
||||
+ (!!computed.plugins.pagespeed)*(16*10)
|
||||
+ (!!base.header)*64
|
||||
+ (!!base.metadata)*122
|
||||
+ (!!base.activity)*146
|
||||
+ (!!base.community)*120
|
||||
+ (!!base.repositories)*188
|
||||
+ (Object.entries(base).filter(([key, value]) => value).length)*8
|
||||
+ (!!computed.plugins.traffic)*18
|
||||
+ (!!computed.plugins.followup)*112
|
||||
+ (!!computed.plugins.lines)*36
|
||||
+ ((!!computed.plugins.traffic)+(!!computed.plugins.followup)+(!!computed.plugins.lines))*4
|
||||
+ (!!computed.plugins.pagespeed)*132
|
||||
+ (!!computed.plugins.languages)*172
|
||||
+ (Object.entries(computed.plugins).filter(([key, value]) => value).length)*4
|
||||
%>">
|
||||
<%
|
||||
meta.$ = `<span class="ps1-path">${user.login}@metrics</span>:<span class="ps1-location">~</span>${computed.token.scopes.includes("repo") ? "#" : "$"}`
|
||||
@@ -52,13 +55,13 @@
|
||||
|
||||
<pre><div style="margin-top:-16px"></div><%# -%>
|
||||
<% if (base.metadata) { %>
|
||||
<span class="banner"><%# -%>
|
||||
<div class="banner"><%# -%>
|
||||
GitHub metrics generator <%= meta.version %>
|
||||
These generated metrics comes with ABSOLUTELY NO WARRANTY,
|
||||
to the extent permitted by applicable law.
|
||||
|
||||
Last generated: <%= new Date().toGMTString() %>
|
||||
</span><% } -%>
|
||||
</div><% } -%>
|
||||
<%# ============================================================= -%>
|
||||
<% if (base.header) { %>
|
||||
<div class="stdin"><%- meta.$ %> whoami</div><%# -%>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.3 KiB |
@@ -55,6 +55,7 @@
|
||||
border-bottom-right-radius: 5px;
|
||||
font-family: monospace;
|
||||
color: #DDDDDD;
|
||||
white-space: break-spaces;
|
||||
}
|
||||
|
||||
.banner, footer {
|
||||
|
||||
Reference in New Issue
Block a user