Skip to content

Commit

Permalink
fix(front): reverts install and patch of [email protected]
Browse files Browse the repository at this point in the history
layout changes need to be explored
  • Loading branch information
dgrebb committed Aug 27, 2024
1 parent 560d786 commit 4681d4d
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 143 deletions.
2 changes: 1 addition & 1 deletion front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"slugger": "^1.0.1",
"svelte": "^4.2.19",
"svelte-check": "^3.8.6",
"svelte-highlight": "7.7.0",
"svelte-highlight": "7.6.1",
"svelte-meta-tags": "^3.1.3",
"svelte-sitemap": "^2.6.0",
"typescript": "^5.5.4",
Expand Down
23 changes: 10 additions & 13 deletions front/patches/svelte-highlight.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/LineNumbers.svelte b/LineNumbers.svelte
index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190ea3ad0b22 100644
index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..95e21277b53899cc79b75c9a37473e783e8b14ff 100644
--- a/LineNumbers.svelte
+++ b/LineNumbers.svelte
@@ -24,6 +24,17 @@
@@ -24,14 +24,31 @@
$: len_digits = lines.length.toString().length;
$: len = len_digits - MIN_DIGITS < 1 ? MIN_DIGITS : len_digits;
$: width = len * DIGIT_WIDTH;
Expand All @@ -19,13 +19,13 @@ index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190e
+ }
</script>

<div style:overflow-x="auto" {...$$restProps}>
@@ -31,7 +42,14 @@
-<div style:overflow-x="auto" {...$$restProps}>
+<div class="line-number-wrap" {...$$restProps}>
<table>
<tbody class:hljs={true}>
{#each lines as line, i}
{@const lineNumber = i + startingLineNumber}
- <tr>
+
+ <tr
+ class:highlight={highlightedLines.includes(i)}
+ class:first={highlightedLines.includes(i) &&
Expand All @@ -36,7 +36,7 @@ index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190e
<td
class:hljs={true}
class:hideBorder
@@ -44,21 +62,12 @@
@@ -44,21 +61,9 @@
<code style:color="var(--line-number-color, currentColor)">
{lineNumber}
</code>
Expand All @@ -55,13 +55,10 @@ index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190e
- style:background="var(--highlighted-background, {HIGHLIGHTED_BACKGROUND})"
- ></div>
- {/if}
+ </td>
+ <td>
+ <pre class:wrapLines><code>{@html line || "\n"}</code></pre>
</td>
</tr>
{/each}
@@ -67,16 +76,10 @@
@@ -67,16 +72,10 @@
</div>

<style>
Expand All @@ -78,7 +75,7 @@ index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190e
vertical-align: baseline;
}

@@ -86,23 +89,10 @@
@@ -86,23 +85,10 @@
border-spacing: 0;
}

Expand All @@ -102,7 +99,7 @@ index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190e
td.hljs:not(.hideBorder):after {
content: "";
position: absolute;
@@ -127,26 +117,4 @@
@@ -127,26 +113,4 @@
pre {
z-index: 1;
}
Expand All @@ -128,4 +125,4 @@ index 18df8880f0c9e765d0644d4aac1ede33daf9d69b..736883f48c55de786bf710f3b92b190e
- tr:last-of-type td .line-background {
- bottom: 1em;
- }
</style>
</style>
Loading

0 comments on commit 4681d4d

Please sign in to comment.