aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-09-21 16:11:31 -0400
committerJoe Mou <dev@mou.fo>2026-09-21 17:40:15 -0400
commit16b4bc953f9822121b3257fc5f19df9dcfbdba27 (patch)
tree3ede7a90e70a2f92466b0f85055b0bdf68c3e687
parent4a689592a67bad939c4fb2b217bdc812939ff542 (diff)
Easier clone command selection
-rw-r--r--public/static/style.css18
-rw-r--r--views/layouts/repo.eta6
2 files changed, 22 insertions, 2 deletions
diff --git a/public/static/style.css b/public/static/style.css
index 1d277b7..ad61fca 100644
--- a/public/static/style.css
+++ b/public/static/style.css
@@ -148,6 +148,24 @@ body > footer {
font-weight: bold;
}
+.clone {
+ margin: .5em 0;
+
+ code {
+ /* Each command is a distinct block so that selecting doesn't pick up a
+ * trailing newline. */
+ display: block;
+ width: fit-content;
+ white-space: pre;
+ user-select: all;
+ cursor: default;
+
+ &:hover {
+ background: var(--shade-background);
+ }
+ }
+}
+
.avatar {
float: right;
clip-path: circle();
diff --git a/views/layouts/repo.eta b/views/layouts/repo.eta
index 28e40cc..b1fb65c 100644
--- a/views/layouts/repo.eta
+++ b/views/layouts/repo.eta
@@ -7,8 +7,10 @@ layout("/layouts/base.eta", {
<div class="box">
<div class="repo"><a href="/<%= it.repo.owner %>"><%= it.repo.owner %></a>/<a href="/<%= it.repo.owner %>/<%= it.repo.name %>"><%= it.repo.name %></a></div>
- <pre><code>git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git
-git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code></pre>
+ <div class="clone">
+ <code>git clone https://github.com/<%= it.repo.owner %>/<%= it.repo.name %>.git</code>
+ <code>git clone git@github.com:<%= it.repo.owner %>/<%= it.repo.name %>.git</code>
+ </div>
<nav>
<a href="/<%= it.repo.owner %>/<%= it.repo.name %>">Code</a>
<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/issues">Issues</a>