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/views/_tree.eta | 3 ++- cgithub/views/home.eta | 47 +++++++++++++++++++++++++++++++++++++++++++++++ cgithub/views/layout.eta | 2 +- cgithub/views/repo.eta | 8 ++++---- 4 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 cgithub/views/home.eta (limited to 'cgithub/views') 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