Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit 476c2aa

Browse files
committed
0.21
1 parent 753f91f commit 476c2aa

3 files changed

Lines changed: 13 additions & 11 deletions

File tree

stats.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ function langHandler(langs) {
623623
async function getAccount(username, query={}) {
624624
const response = await cache.requestWithCache(`/users/${username}`);
625625
return {
626-
dark : !! query.dark,
626+
dark : query['theme'] === 'dark',
627627
username: username,
628628
followers: decConvert(response['followers']),
629629
repos: response['public_repos'],
@@ -639,7 +639,7 @@ async function getRepository(username, repo, query={}) {
639639
// get releases (700ms): (await cache.requestWithCache(`/repos/${username}/${repo}/releases`)).length
640640
const info = await cache.requestWithCache(`/repos/${username}/${repo}`);
641641
return {
642-
dark : !! query.dark,
642+
dark : query['theme'] === 'dark',
643643
username: username,
644644
repo: repo,
645645
size: storeConvert(info['size'], 1),

views/repo.ejs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
.header { font-size: 15.5px; }
1919
}
2020
.stat {
21-
font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: #434d58;
21+
font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif;
22+
fill: <%- dark ? "#fff" : "#434d58" %>;
2223
}
2324
@supports(-moz-appearance: auto) {
2425
.stat { font-size:12px; }
@@ -42,7 +43,7 @@
4243
}
4344
.lang-name {
4445
font: 400 11px "Segoe UI", Ubuntu, Sans-Serif;
45-
fill: #434d58;
46+
fill: <%- dark ? "#fff" : "#434d58" %>;
4647
}
4748
.stagger {
4849
opacity: 0;
@@ -85,7 +86,7 @@
8586
}
8687
}
8788
</style>
88-
<rect data-testid="card-bg" x="0.5" y="0.5" rx="4.5" height="99%" stroke="#e4e2e2" width="659" fill="<%- dark ? "#e4e2e2" : "#000" %>" stroke-opacity="1"/>
89+
<rect data-testid="card-bg" x="0.5" y="0.5" rx="4.5" height="99%" stroke="#e4e2e2" width="659" fill="<%- dark ? "#000" : "#fffefe" %>" stroke-opacity="1"/>
8990
<g data-testid="card-title" transform="translate(40, 35)"><g transform="translate(0, 0)"><circle class="repo-color" cx="-10" cy="-5" r="5" fill="<%- color %>"/><text x="0" y="0" class="header" data-testid="header"><a href="https://github.com/<%- username %>/<%- repo %>/"><%- username %> / <%- repo %></a></text></g></g>
9091
<g data-testid="main-card-info" transform="translate(0, 55)"><svg x="0" y="0">
9192
<g transform="translate(0, 0)">

views/user.ejs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
.header { font-size: 15.5px; }
1717
}
1818
.stat {
19-
font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif; fill: #434d58;
19+
font: 600 14px 'Segoe UI', Ubuntu, "Helvetica Neue", Sans-Serif;
20+
fill: <%- dark ? "#fff" : "#434d58" %>;
2021
}
2122
@supports(-moz-appearance: auto) {
2223
.stat { font-size:12px; }
@@ -40,7 +41,7 @@
4041
}
4142
.lang-name {
4243
font: 400 11px "Segoe UI", Ubuntu, Sans-Serif;
43-
fill: #434d58;
44+
fill: <%- dark ? "#fff" : "#434d58" %>;
4445
}
4546
.stagger {
4647
opacity: 0;
@@ -83,7 +84,7 @@
8384
}
8485
}
8586
</style>
86-
<rect data-testid="card-bg" x="0.5" y="0.5" rx="4.5" height="99%" stroke="#e4e2e2" width="659" fill="<%- dark ? "#e4e2e2" : "#000" %>" stroke-opacity="1"/>
87+
<rect data-testid="card-bg" x="0.5" y="0.5" rx="4.5" height="99%" stroke="#e4e2e2" width="659" fill="<%- dark ? "#000" : "#fffefe" %>" stroke-opacity="1"/>
8788
<g data-testid="card-title" transform="translate(40, 35)"><g transform="translate(0, 0)"><text x="0" y="0" class="header" data-testid="header"><a href="https://github.com/<%- username %>/"><%- username %></a></text></g></g>
8889
<g data-testid="main-card-info" transform="translate(0, 55)"><svg x="0" y="0">
8990
<g transform="translate(0, 0)">
@@ -92,16 +93,16 @@
9293
<path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"/>
9394
</svg>
9495
<text class="stat bold" y="12.5">Followers:</text>
95-
<svg x="169.01" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="oct-icon">
96-
<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>
96+
<svg x="169.01" text="muted" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="oct-icon">
97+
<path fill-rule="evenodd" d="M5.5 3.5a2 2 0 100 4 2 2 0 000-4zM2 5.5a3.5 3.5 0 115.898 2.549 5.507 5.507 0 013.034 4.084.75.75 0 11-1.482.235 4.001 4.001 0 00-7.9 0 .75.75 0 01-1.482-.236A5.507 5.507 0 013.102 8.05 3.49 3.49 0 012 5.5zM11 4a.75.75 0 100 1.5 1.5 1.5 0 01.666 2.844.75.75 0 00-.416.672v.352a.75.75 0 00.574.73c1.2.289 2.162 1.2 2.522 2.372a.75.75 0 101.434-.44 5.01 5.01 0 00-2.56-3.012A3 3 0 0011 4z"></path>
9798
</svg>
9899
<text class="stat bold" x="192.01" y="12.5" data-testid="stars"><%- followers %></text>
99100
</g>
100101
</g><g transform="translate(0, 25)">
101102
<g class="stagger" style="animation-delay: 600ms" transform="translate(25, 0)">
102103
<text class="stat bold" y="12.5">Repos:</text>
103104
<svg x="169.01" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="oct-icon">
104-
<path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path>
105+
<path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path>
105106
</svg>
106107
<text class="stat bold" x="192.01" y="12.5" data-testid="forks"><%- repos %></text>
107108
</g>

0 commit comments

Comments
 (0)