From 0391e279f80f6406502b4069bf2e13d3f13ed56e Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Sun, 25 Jan 2026 16:27:48 -0500 Subject: Repository page with info --- cgithub/views/repo.eta | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cgithub/views/repo.eta (limited to 'cgithub/views/repo.eta') diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta new file mode 100644 index 0000000..0b345df --- /dev/null +++ b/cgithub/views/repo.eta @@ -0,0 +1,23 @@ +<% layout("./layout") %> + +<% if (it.info) { %> +
+ <% if (it.info.description) { %> +
<%= it.info.description %>
+ <% } %> + <% if (it.info.website) { %> +
<%= it.info.website %>
+ <% } %> + <% if (it.info.stars) { %> + ★ <%= it.info.stars %> + <% } %> + <% if (it.info.watchers) { %> + 👁 <%= it.info.watchers %> + <% } %> + <% if (it.info.forks) { %> + 🔀 <%= it.info.forks %> + <% } %> +
+<% } %> + +<%~ include("./_tree", it) %> -- cgit v1.3.1 From b471cbde1e733fa30ad69da59cee21bcf8e66ea1 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Sun, 25 Jan 2026 17:24:19 -0500 Subject: Use Phosphor Icons --- cgithub/src/index.ts | 4 +++ cgithub/static/icons/eye.svg | 1 + cgithub/static/icons/file.svg | 1 + cgithub/static/icons/folder-simple.svg | 1 + cgithub/static/icons/git-branch.svg | 1 + cgithub/static/icons/git-fork.svg | 1 + cgithub/static/icons/link.svg | 1 + cgithub/static/icons/star.svg | 1 + cgithub/static/style.css | 5 ++++ cgithub/views/_tree.eta | 3 ++- cgithub/views/home.eta | 47 ++++++++++++++++++++++++++++++++++ cgithub/views/layout.eta | 2 +- cgithub/views/repo.eta | 8 +++--- 13 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 cgithub/static/icons/eye.svg create mode 100644 cgithub/static/icons/file.svg create mode 100644 cgithub/static/icons/folder-simple.svg create mode 100644 cgithub/static/icons/git-branch.svg create mode 100644 cgithub/static/icons/git-fork.svg create mode 100644 cgithub/static/icons/link.svg create mode 100644 cgithub/static/icons/star.svg create mode 100644 cgithub/views/home.eta (limited to 'cgithub/views/repo.eta') diff --git a/cgithub/src/index.ts b/cgithub/src/index.ts index 393c5ec..43d4cfa 100644 --- a/cgithub/src/index.ts +++ b/cgithub/src/index.ts @@ -13,6 +13,10 @@ const eta = new Eta({ views: path.join(__dirname, "..", "views") }); app.use("/static/*", serveStatic({ root: path.join(__dirname, "..") })); +app.get("/", async (c) => { + return c.html(await eta.renderAsync("home.eta", {})); +}); + app.get("/:owner/:repo", async (c) => { const { owner, repo } = c.req.param(); const data = await getGitHubRepo(owner, repo); diff --git a/cgithub/static/icons/eye.svg b/cgithub/static/icons/eye.svg new file mode 100644 index 0000000..f6f8230 --- /dev/null +++ b/cgithub/static/icons/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/icons/file.svg b/cgithub/static/icons/file.svg new file mode 100644 index 0000000..f2e7629 --- /dev/null +++ b/cgithub/static/icons/file.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/icons/folder-simple.svg b/cgithub/static/icons/folder-simple.svg new file mode 100644 index 0000000..36acab2 --- /dev/null +++ b/cgithub/static/icons/folder-simple.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/icons/git-branch.svg b/cgithub/static/icons/git-branch.svg new file mode 100644 index 0000000..4b442e2 --- /dev/null +++ b/cgithub/static/icons/git-branch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/icons/git-fork.svg b/cgithub/static/icons/git-fork.svg new file mode 100644 index 0000000..ca318b2 --- /dev/null +++ b/cgithub/static/icons/git-fork.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/icons/link.svg b/cgithub/static/icons/link.svg new file mode 100644 index 0000000..25ffe17 --- /dev/null +++ b/cgithub/static/icons/link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/icons/star.svg b/cgithub/static/icons/star.svg new file mode 100644 index 0000000..4e640f4 --- /dev/null +++ b/cgithub/static/icons/star.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cgithub/static/style.css b/cgithub/static/style.css index bd36dce..e552787 100644 --- a/cgithub/static/style.css +++ b/cgithub/static/style.css @@ -4,6 +4,11 @@ body { font-family: Helvetica, Arial, sans-serif; } +.icon { + height: 1lh; + vertical-align: text-bottom; +} + pre.blob { margin: 1rem 0; padding: 1rem; diff --git a/cgithub/views/_tree.eta b/cgithub/views/_tree.eta index ac7b2b1..2549bb8 100644 --- a/cgithub/views/_tree.eta +++ b/cgithub/views/_tree.eta @@ -2,10 +2,11 @@ <% for (const item of it.items) { %> - <%= item.contentType === 'directory' ? '📁' : '📄' %> <% if (item.contentType === 'directory') { %> + tree <%= item.name %> <% } else { %> + blob <%= item.name %> <% } %> diff --git a/cgithub/views/home.eta b/cgithub/views/home.eta new file mode 100644 index 0000000..adb71f2 --- /dev/null +++ b/cgithub/views/home.eta @@ -0,0 +1,47 @@ + + + + + cgithub + + + +
+

cgithub

+

Lightweight GitHub alternative frontend

+
+ +
+

Browse any GitHub repository by navigating to /:owner/:repo

+
+ +

Credits

+

Icons by Phosphor Icons

+
+ Phosphor Icons License (MIT) +
+MIT License
+
+Copyright (c) 2023 Phosphor Icons
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+    
+
+ + diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta index 8e5d9d9..982f8c0 100644 --- a/cgithub/views/layout.eta +++ b/cgithub/views/layout.eta @@ -8,7 +8,7 @@

<%= it.repo.owner %>/<%= it.repo.name %>

-
branch: <%= it.branch %>
+
branch <%= it.branch %>
<% if (it.path) { %>
path: root<% diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta index 0b345df..4338708 100644 --- a/cgithub/views/repo.eta +++ b/cgithub/views/repo.eta @@ -6,16 +6,16 @@
<%= it.info.description %>
<% } %> <% if (it.info.website) { %> -
<%= it.info.website %>
+
<%= it.info.website %>
<% } %> <% if (it.info.stars) { %> - ★ <%= it.info.stars %> + stars <%= it.info.stars %> <% } %> <% if (it.info.watchers) { %> - 👁 <%= it.info.watchers %> + watchers <%= it.info.watchers %> <% } %> <% if (it.info.forks) { %> - 🔀 <%= it.info.forks %> + forks <%= it.info.forks %> <% } %>
<% } %> -- cgit v1.3.1 From 37aa28f1465cfdd26a58c6dd5b752141ea876cde Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Sun, 25 Jan 2026 18:51:27 -0500 Subject: Styling --- cgithub/static/style.css | 65 ++++++++++++++++++++++++++++++++++++------------ cgithub/views/blob.eta | 11 +++++++- cgithub/views/layout.eta | 18 +++++--------- cgithub/views/repo.eta | 8 +++--- 4 files changed, 69 insertions(+), 33 deletions(-) (limited to 'cgithub/views/repo.eta') diff --git a/cgithub/static/style.css b/cgithub/static/style.css index e552787..1229fce 100644 --- a/cgithub/static/style.css +++ b/cgithub/static/style.css @@ -1,33 +1,66 @@ body { - margin: 0; - padding: 1rem; + margin: 0 1rem; font-family: Helvetica, Arial, sans-serif; -} - -.icon { - height: 1lh; - vertical-align: text-bottom; -} -pre.blob { - margin: 1rem 0; - padding: 1rem; - border: 1px solid #d0d7de; - border-radius: 6px; - overflow-x: auto; - font-family: monospace; + --border-color: #d0d7de; } @media (prefers-color-scheme: dark) { body { background: #0d1117; color: #e6edf3; + --border-color: #30363d; } a { color: #4493f8; } .blob { - border-color: #30363d; background: #161b22; } } + +a { + text-decoration: none; +} + +header, .box { + margin: 1rem 0; + border: 1px solid var(--border-color); + padding: .5rem; +} + +footer { + margin-top: 1rem; + text-align: center; +} + +.icon { + height: 1lh; + vertical-align: text-bottom; +} + +.repo { + margin-bottom: 1rem; + font-size: 120%; + font-weight: bold; +} + +.branch { + display: inline-block; + margin-right: 1rem; + padding: .2rem; + border: 1px solid var(--border-color); +} + +.description { + margin-bottom: .2rem; +} + +.count + .count { + margin-left: 1rem; +} + +pre.box { + /* Instead of scrolling overflow for long lines, grow the box. */ + width: fit-content; +} diff --git a/cgithub/views/blob.eta b/cgithub/views/blob.eta index 566f5b0..9b478b5 100644 --- a/cgithub/views/blob.eta +++ b/cgithub/views/blob.eta @@ -1,3 +1,12 @@ <% layout("./layout") %> -
<%= it.rawContent %>
+
+ <% if (it.language) { %> +
language: <%= it.language %>
+ <% } %> + <% if (it.size !== undefined) { %> +
size: <%= it.size %> bytes
+ <% } %> +
+ +
<%= it.rawContent %>
diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta index 982f8c0..a191301 100644 --- a/cgithub/views/layout.eta +++ b/cgithub/views/layout.eta @@ -2,16 +2,16 @@ - <%= it.repo.owner %>/<%= it.repo.name %> - <%= it.path || 'root' %> + <%= it.repo.owner %>/<%= it.repo.name %> - <%= it.path || '/' %>
-

<%= it.repo.owner %>/<%= it.repo.name %>

-
branch <%= it.branch %>
+
<%= it.repo.owner %>/<%= it.repo.name %>
+
branch <%= it.branch %>
<% if (it.path) { %> -
- path: root<% + + (top)<% const pathParts = it.path.split('/').filter(p => p); let currentPath = ''; for (let i = 0; i < pathParts.length; i++) { @@ -24,13 +24,7 @@ %>/<%= part %><% } } %> -
- <% } %> - <% if (it.language) { %> -
language: <%= it.language %>
- <% } %> - <% if (it.size !== undefined) { %> -
size: <%= it.size %> bytes
+ <% } %>
diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta index 4338708..4965e75 100644 --- a/cgithub/views/repo.eta +++ b/cgithub/views/repo.eta @@ -1,7 +1,7 @@ <% layout("./layout") %> <% if (it.info) { %> -
+
<% if (it.info.description) { %>
<%= it.info.description %>
<% } %> @@ -9,13 +9,13 @@ <% } %> <% if (it.info.stars) { %> - stars <%= it.info.stars %> + stars <%= it.info.stars %> <% } %> <% if (it.info.watchers) { %> - watchers <%= it.info.watchers %> + watchers <%= it.info.watchers %> <% } %> <% if (it.info.forks) { %> - forks <%= it.info.forks %> + forks <%= it.info.forks %> <% } %>
<% } %> -- cgit v1.3.1 From 744f42a2ae7968881e4d8f1ce0ec0d5209c8d7a4 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 26 Jan 2026 13:27:28 -0500 Subject: Show releases --- cgithub/src/scraper.ts | 10 ++++++++++ cgithub/views/repo.eta | 3 +++ 2 files changed, 13 insertions(+) (limited to 'cgithub/views/repo.eta') diff --git a/cgithub/src/scraper.ts b/cgithub/src/scraper.ts index c1bdef5..4ffdc43 100644 --- a/cgithub/src/scraper.ts +++ b/cgithub/src/scraper.ts @@ -54,6 +54,7 @@ export interface RepoInfo { stars: string | null; watchers: string | null; forks: string | null; + numReleases?: number; } export interface GitHubRepo extends GitHubTree { @@ -110,12 +111,21 @@ function parseRepoInfo(html: string): RepoInfo { const watchersMatch = html.match(/(\d+)<\/strong>\s*watching/); const forksMatch = html.match(/id="repo-network-counter"[^>]*>([^<]+)/); + let numReleases: number | undefined; + const releaseCountMatch = html.match( + /]*href="[^"]*\/releases"[^>]*>[\s\S]*?]*title="(\d+)"[^>]*(?:class="[^"]*Counter|data-view-component="true")[^>]*>/, + ); + if (releaseCountMatch) { + numReleases = parseInt(releaseCountMatch[1], 10); + } + return { description, website: websiteMatch?.[1] || null, stars: starsMatch?.[1]?.trim() || null, watchers: watchersMatch?.[1] || null, forks: forksMatch?.[1]?.trim() || null, + numReleases, }; } diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta index 4965e75..5bebb95 100644 --- a/cgithub/views/repo.eta +++ b/cgithub/views/repo.eta @@ -17,6 +17,9 @@ <% if (it.info.forks) { %> forks <%= it.info.forks %> <% } %> + <% if (it.info.numReleases) { %> + + <% } %>
<% } %> -- cgit v1.3.1 From 64c397e256b01a2e542e84529e947e237c07edd6 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 27 Jan 2026 16:58:56 -0500 Subject: Split branch and path bread crumbs into separate section --- cgithub/static/style.css | 7 +++++-- cgithub/views/_nav.eta | 18 ++++++++++++++++++ cgithub/views/_tree.eta | 2 ++ cgithub/views/blob.eta | 4 +++- cgithub/views/layout.eta | 22 ++-------------------- cgithub/views/repo.eta | 2 +- cgithub/views/tree.eta | 4 ++-- 7 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 cgithub/views/_nav.eta (limited to 'cgithub/views/repo.eta') diff --git a/cgithub/static/style.css b/cgithub/static/style.css index d21bd32..cccb1ba 100644 --- a/cgithub/static/style.css +++ b/cgithub/static/style.css @@ -39,7 +39,11 @@ a { color: var(--link-color); } -body > header, .box { +section { + margin: 1rem 0; +} + +.box { --box-padding: .5rem; margin: 1rem 0; @@ -79,7 +83,6 @@ footer { } .repo { - margin-bottom: 1rem; font-size: 120%; font-weight: bold; } diff --git a/cgithub/views/_nav.eta b/cgithub/views/_nav.eta new file mode 100644 index 0000000..338a6a6 --- /dev/null +++ b/cgithub/views/_nav.eta @@ -0,0 +1,18 @@ +
+
branch <%= it.branch %>
+ <% if (it.path && it.path !== "/") { %> + (top)<% + const pathParts = it.path.split('/').filter(p => p); + let currentPath = ''; + for (let i = 0; i < pathParts.length; i++) { + const part = pathParts[i]; + currentPath += (currentPath ? '/' : '') + part; + const isLast = i === pathParts.length - 1; + if (isLast) { + %>/<%= part %><%= it.isTree ? "/" : "" %><% + } else { + %>/<%= part %><% + } + } %> + <% } %> +
diff --git a/cgithub/views/_tree.eta b/cgithub/views/_tree.eta index d0c3453..311762f 100644 --- a/cgithub/views/_tree.eta +++ b/cgithub/views/_tree.eta @@ -1,3 +1,5 @@ +<%~ include("./_nav.eta", {...it, isTree: true}) %> + <% for (const item of it.items) { %> diff --git a/cgithub/views/blob.eta b/cgithub/views/blob.eta index 7328a62..277b46d 100644 --- a/cgithub/views/blob.eta +++ b/cgithub/views/blob.eta @@ -1,4 +1,6 @@ -<% layout("./layout") %> +<% layout("./layout.eta") %> + +<%~ include("./_nav.eta", it) %>
<% if (it.language) { %> diff --git a/cgithub/views/layout.eta b/cgithub/views/layout.eta index bfcd370..f053b84 100644 --- a/cgithub/views/layout.eta +++ b/cgithub/views/layout.eta @@ -6,29 +6,11 @@ -
+
<%= it.repo.owner %>/<%= it.repo.name %>
-
branch <%= it.branch %>
- <% if (it.path) { %> - - (top)<% - const pathParts = it.path.split('/').filter(p => p); - let currentPath = ''; - for (let i = 0; i < pathParts.length; i++) { - const part = pathParts[i]; - currentPath += (currentPath ? '/' : '') + part; - const isLast = i === pathParts.length - 1; - if (isLast) { - %>/<%= part %><% - } else { - %>/<%= part %><% - } - } %> - - <% } %>
git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git
 git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git
-
+
<%~ it.body %> diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta index 5bebb95..9122775 100644 --- a/cgithub/views/repo.eta +++ b/cgithub/views/repo.eta @@ -1,4 +1,4 @@ -<% layout("./layout") %> +<% layout("./layout.eta") %> <% if (it.info) { %>
diff --git a/cgithub/views/tree.eta b/cgithub/views/tree.eta index 7068754..6e675e1 100644 --- a/cgithub/views/tree.eta +++ b/cgithub/views/tree.eta @@ -1,3 +1,3 @@ -<% layout("./layout") %> +<% layout("./layout.eta") %> -<%~ include("./_tree", it) %> +<%~ include("./_tree.eta", it) %> -- cgit v1.3.1 From d29bdad2f5c8326d111901373f0a56b3a09a2cd8 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Tue, 27 Jan 2026 15:05:36 -0500 Subject: List issues --- cgithub/CLAUDE.md | 18 ++++------ cgithub/src/index.ts | 13 ++++++- cgithub/src/scraper.test.ts | 21 ++++++++++- cgithub/src/scraper.ts | 85 +++++++++++++++++++++++++++++++++++++++++++-- cgithub/static/style.css | 40 +++++++++++++++++++++ cgithub/views/issues.eta | 20 +++++++++++ cgithub/views/layout.eta | 4 +++ cgithub/views/repo.eta | 2 +- 8 files changed, 185 insertions(+), 18 deletions(-) create mode 100644 cgithub/views/issues.eta (limited to 'cgithub/views/repo.eta') diff --git a/cgithub/CLAUDE.md b/cgithub/CLAUDE.md index e258e55..8feb529 100644 --- a/cgithub/CLAUDE.md +++ b/cgithub/CLAUDE.md @@ -1,10 +1,6 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - ## Project Overview -cgithub is a lightweight GitHub alternative frontend that scrapes GitHub's server-rendered HTML instead of using the API. This approach avoids API rate limits entirely by extracting embedded JSON data from ` - - -
- -
git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git
-git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git
- -
- "> - - - -
- - <%~ it.body %> - -
Generated by cgithub commit <%= it.buildCommit %> · View original
- - - - diff --git a/cgithub/views/layouts/base.eta b/cgithub/views/layouts/base.eta new file mode 100644 index 0000000..fb644f5 --- /dev/null +++ b/cgithub/views/layouts/base.eta @@ -0,0 +1,17 @@ + + + + + + <%= it.title %> + + <% for (const src of it.scripts ?? []) { %> + + <% } %> + + + <%~ it.body %> + +
Generated by cgithub commit <%= it.buildCommit %> · View original
+ + diff --git a/cgithub/views/layouts/repo.eta b/cgithub/views/layouts/repo.eta new file mode 100644 index 0000000..e4f7880 --- /dev/null +++ b/cgithub/views/layouts/repo.eta @@ -0,0 +1,59 @@ +<% +layout("/layouts/base.eta", { + title: `${it.repo.owner}/${it.repo.name} - ${it.path || "/"}`, + scripts: ["/static/refs.js"], +}) +%> + +
+ +
git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git
+git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git
+ +
+ "> + + + +
+ +<%~ it.body %> + + diff --git a/cgithub/views/owner.eta b/cgithub/views/owner.eta index e5667fb..b3304fb 100644 --- a/cgithub/views/owner.eta +++ b/cgithub/views/owner.eta @@ -1,65 +1,54 @@ - - - - - - <%= it.name ? `${it.name} (${it.login})` : it.login %> - - - -
- <% if (it.avatarUrl) { %> - - <% } %> -
<%= it.name || it.login %>
-
<%= it.login %><%= it.type === "organization" ? " (organization)" : "" %>
- <% if (it.location) { %> -
<%= it.location %>
- <% } %> - <% if (it.nav.length > 0) { %> - - <% } %> -
+<% layout("/layouts/base.eta", { title: it.name ? `${it.name} (${it.login})` : it.login }) %> - <% if (it.bio || it.links.length > 0 || it.followers || it.company) { %> -
- <% if (it.bio) { %> -
<%= it.bio %>
- <% } %> - <% for (const link of it.links) { %> - - <% } %> - <% if (it.followers) { %> -
<%= it.followers %> followers<%= it.following ? ` · ${it.following} following` : "" %>
- <% } %> - <% if (it.company) { %> -
<%= it.company %>
- <% } %> -
+
+ <% if (it.avatarUrl) { %> + <% } %> - - <% if (it.pinned.length > 0) { %> -
-

Pinned

- <% for (const repo of it.pinned) { %> - <%~ include("./_ownerRepo", { repo, login: it.login }) %> - <% } %> -
+
<%= it.name || it.login %>
+
<%= it.login %><%= it.type === "organization" ? " (organization)" : "" %>
+ <% if (it.location) { %> +
<%= it.location %>
<% } %> - - <% if (it.repos.length > 0) { %> -
-

Repositories

- <% for (const repo of it.repos) { %> - <%~ include("./_ownerRepo", { repo, login: it.login }) %> + <% if (it.nav.length > 0) { %> +
+ <% } %> +
+ +<% if (it.bio || it.links.length > 0 || it.followers || it.company) { %> +
+ <% if (it.bio) { %> +
<%= it.bio %>
+ <% } %> + <% for (const link of it.links) { %> + + <% } %> + <% if (it.followers) { %> +
<%= it.followers %> followers<%= it.following ? ` · ${it.following} following` : "" %>
+ <% } %> + <% if (it.company) { %> +
<%= it.company %>
+ <% } %> +
+<% } %> -
Generated by cgithub
- - +<% if (it.pinned.length > 0) { %> +
+

Pinned

+ <% for (const repo of it.pinned) { %> + <%~ include("./_ownerRepo", { repo, login: it.login }) %> + <% } %> +
+<% } %> + +<% if (it.repos.length > 0) { %> +
+

Repositories

+ <% for (const repo of it.repos) { %> + <%~ include("./_ownerRepo", { repo, login: it.login }) %> + <% } %> +
+<% } %> diff --git a/cgithub/views/pulls.eta b/cgithub/views/pulls.eta index 9ec5ca1..697f6b1 100644 --- a/cgithub/views/pulls.eta +++ b/cgithub/views/pulls.eta @@ -1,4 +1,4 @@ -<% layout("./layout"); it.searchType = "pullrequests" %> +<% layout("/layouts/repo.eta"); it.searchType = "pullrequests" %>
<% for (const pull of it.pulls) { %> diff --git a/cgithub/views/release.eta b/cgithub/views/release.eta index 46dd5db..64cca35 100644 --- a/cgithub/views/release.eta +++ b/cgithub/views/release.eta @@ -1,3 +1,3 @@ -<% layout("./layout.eta") %> +<% layout("/layouts/repo.eta") %> <%~ include("./_release.eta", { repo: it.repo, release: it.release, linkToDetail: false }) %> diff --git a/cgithub/views/releases.eta b/cgithub/views/releases.eta index 840908c..4ede28b 100644 --- a/cgithub/views/releases.eta +++ b/cgithub/views/releases.eta @@ -1,4 +1,4 @@ -<% layout("./layout.eta") %> +<% layout("/layouts/repo.eta") %> <% for (const release of it.releases) { %> <%~ include("./_release.eta", { repo: it.repo, release, linkToDetail: true }) %> diff --git a/cgithub/views/repo.eta b/cgithub/views/repo.eta index 5dc6beb..60746df 100644 --- a/cgithub/views/repo.eta +++ b/cgithub/views/repo.eta @@ -1,4 +1,4 @@ -<% layout("./layout.eta") %> +<% layout("/layouts/repo.eta") %> <% if (it.info) { %>
diff --git a/cgithub/views/tree.eta b/cgithub/views/tree.eta index 41ded06..fabf5b9 100644 --- a/cgithub/views/tree.eta +++ b/cgithub/views/tree.eta @@ -1,3 +1,3 @@ -<% layout("./layout.eta"); it.searchType = "code" %> +<% layout("/layouts/repo.eta"); it.searchType = "code" %> <%~ include("./_tree.eta", it) %> diff --git a/cgithub/views/wiki.eta b/cgithub/views/wiki.eta index d6047e1..781caff 100644 --- a/cgithub/views/wiki.eta +++ b/cgithub/views/wiki.eta @@ -1,4 +1,4 @@ -<% layout("./layout.eta"); it.path = "wiki/" + it.title %> +<% layout("/layouts/repo.eta"); it.path = "wiki/" + it.title %> <%~ include("./_wikiNav.eta", it) %> diff --git a/cgithub/views/wikiPages.eta b/cgithub/views/wikiPages.eta index 58d6d21..eb90781 100644 --- a/cgithub/views/wikiPages.eta +++ b/cgithub/views/wikiPages.eta @@ -1,4 +1,4 @@ -<% layout("./layout.eta"); it.path = "wiki/_pages" %> +<% layout("/layouts/repo.eta"); it.path = "wiki/_pages" %> <%~ include("./_wikiNav.eta", it) %> -- cgit v1.3.1