Skip to content

Commit 2a65a90

Browse files
style(main-page): improve responsiveness
1 parent afdae85 commit 2a65a90

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/routes/[pid=pid]/[org]/[repo]/[id=number]/syntax-highlighting.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ export function detectLanguage(code: string): (SpecialLanguage | (string & {}))
1313
const match = code
1414
.split("\n", 1)[0]
1515
?.trim()
16-
?.match(/^(?:\/\/|#) ?[^ !]+?\.([A-Za-z0-9]{1,10})$/);
16+
?.match(/^(?:\/\/|#) ?[^ !]+?\.([A-Za-z\d]{1,10})$/);
1717
if (match) return match[1];
1818

19-
const hasHTML = /<\/[a-zA-Z0-9-]+>/.test(code);
19+
const hasHTML = /<\/[a-zA-Z\d-]+>/.test(code);
2020
const hasJS = / (let|var|const|=|\/\/) /.test(code);
2121

2222
if (hasHTML && hasJS) return "svelte";

src/routes/package/[...package]/ReleaseCard.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
]}
165165
>
166166
<Accordion.Trigger
167-
class="group bg-secondary px-4 py-3 hover:bg-secondary/75 hover:no-underline data-[state=open]:rounded-b-none [&>svg]:size-[revert-layer] [&>svg]:w-4"
167+
class="group bg-secondary px-4 py-3 hover:bg-secondary/75 hover:no-underline data-[state=open]:rounded-b-none [&>svg]:my-auto [&>svg]:w-4"
168168
>
169169
<div class="flex w-full items-center gap-2 xs:gap-1">
170170
<div class="flex flex-col items-start gap-1">
@@ -208,7 +208,7 @@
208208
{@render badges()}
209209
</div>
210210
</div>
211-
<span class="mr-4 ml-auto flex text-right text-sm text-muted-foreground xs:mr-2 xs:ml-0">
211+
<span class="ml-auto flex text-right text-sm text-muted-foreground xs:mr-2 xs:ml-0">
212212
<span class="mr-1 hidden xs:block">•</span>
213213
<Tooltip.Provider>
214214
<Tooltip.Root delayDuration={300}>

0 commit comments

Comments
 (0)