-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
114 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div | ||
role='alert' | ||
class='relative mt-6 w-full rounded-lg border bg-background px-4 py-3 text-sm text-foreground [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7' | ||
> | ||
<div class='text-sm [&_p]:leading-relaxed'> | ||
<p class='leading-7 [&:not(:first-child)]:mt-6'> | ||
<slot /> | ||
</p> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
export interface Props { | ||
cmd: string | ||
args: string[] | ||
} | ||
const {cmd, args} = Astro.props | ||
--- | ||
|
||
<div class='relative'> | ||
<pre | ||
class='mb-4 mt-6 max-h-[650px] overflow-x-auto whitespace-normal rounded-lg border bg-zinc-950 py-4 dark:bg-zinc-900' | ||
data-language='bash' | ||
data-theme='default'> | ||
<code class='relative grid min-w-full break-words bg-transparent font-mono text-sm' data-language='bash' data-theme='default'> | ||
<span class='whitespace-normal inline-block min-h-4 w-full px-4 py-[0.125rem]'> | ||
<span class='font-bold text-white' set:html={cmd} /> | ||
{args.map((arg, index) => ( | ||
<span style={{ | ||
color: 'rgba(255, 255, 255, 0.95)' | ||
}} set:html={` ${arg}`} /> | ||
))} | ||
</span> | ||
</code> | ||
</pre> | ||
{ | ||
/* <CopyButton | ||
value={`${props.cmd} ${props.args.join(' ')}`} | ||
class='absolute right-4 top-4' | ||
/> */ | ||
} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<code class='relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm'><slot /></code> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h2 class='font-heading mt-8 scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0'> | ||
<slot /> | ||
</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h3 class='font-heading mt-8 scroll-m-20 text-xl font-semibold tracking-tight'> | ||
<slot /> | ||
</h3> |