Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: easier copy/paste of package name and version #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pages/modules/[module].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ const ModulePage: NextPage<ModulePageProps> = ({
<div className="max-w-4xl w-4xl mx-auto mt-8">
<div className="border rounded p-4 divide-y">
<div>
<span className="text-3xl">{module}</span>
<span className="text-lg ml-2">{selectedVersion}</span>
<span className="selectable text-3xl">{module}</span>
<span>&nbsp;</span>{/* helps with dbl-click selection */}
<span className="selectable text-lg ml-2">{selectedVersion}</span>
</div>
<div className="mt-4 flex flex-wrap sm:divide-x gap-2">
<div className="basis-0 grow-[999]">
<h2 className="text-2xl font-bold mt-4">Install</h2>
<div className="mt-2">
<p>
<p className="decorative">
To start using this module, make sure you have set up Bzlmod
according to the <a href={USER_GUIDE_LINK}>user guide</a>,
and add the following to your <code>MODULE.bazel</code>{' '}
Expand All @@ -116,7 +117,7 @@ const ModulePage: NextPage<ModulePageProps> = ({
</p>
)}
</div>
<h2 className="text-2xl font-bold mt-4">Version history</h2>
<h2 className="text-2xl font-bold mt-6 decorative">Version history</h2>
<div>
<ul className="mt-4">
{shownVersions.map((version) => (
Expand Down
2 changes: 2 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ a {
* {
box-sizing: border-box;
}

@import "./page-module.css";
10 changes: 10 additions & 0 deletions styles/page-module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

/** Page: modules/[module].tsx */

.selectable {
user-select: all;
}

.decorative {
user-select: none;
}