Skip to content

Commit f745519

Browse files
added styles to the table of content
1 parent f4709f7 commit f745519

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/lib/components/Embed.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
{#if isImage(block.embed.url)}
4747
<img src={block.embed.url} alt={block.embed.caption?.join(" ")} />
4848
{:else}
49-
<GenericEmbed src={block.embed.url} />
49+
<a href={block.embed.url} target="_blank">
50+
<GenericEmbed src={block.embed.url} />
51+
</a>
5052
{/if}
5153
{/if}

src/lib/components/TableOfContent.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
</script>
55

66
{#if tableOfContent && tableOfContent?.length > 0}
7-
<ul class="bg-slate-100 rounded-md w-full py-6 list-none">
7+
<ul class="not-prose bg-slate-100 rounded-md w-full py-6 list-none">
88
{#each tableOfContent as content }
99
{#if content}
1010
{#if content.type == "heading_2"}
11-
<li class="text-base"><a class="no-underline" href={"#"+content.id}>{content.text}</a></li>
11+
<li class="text-base font-semibold my-2.5"><a class="no-underline" href={"#"+content.id}>{content.text}</a></li>
1212
{:else if content.type == "heading_3"}
13-
<li class="indent-4 text-sm"><a class="no-underline" href={"#"+content.id}>{content.text}</a></li>
13+
<li class="indent-4 text-sm font-semibold my-1"><a class="no-underline" href={"#"+content.id}>{content.text}</a></li>
1414
{/if}
1515
{/if}
1616
{/each}

tailwind.config.cjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ const config = {
22
content: ['./src/**/*.{html,js,svelte,ts}'],
33

44
theme: {
5-
extend: {}
5+
extend: {
6+
7+
}
68
},
79

810
plugins: [

0 commit comments

Comments
 (0)