Skip to content

Commit c0dba2a

Browse files
committed
Refactor layout and styling for improved responsiveness and readability across components
1 parent 07c6000 commit c0dba2a

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99
<body
1010
data-sveltekit-preload-data="hover"
11-
class="bg-gray-950 text-gray-300 grid grid-rows-[auto_1fr_auto] min-h-full antialiased text-base lg:text-lg"
11+
class="bg-gray-950 text-gray-300 min-h-full antialiased text-base lg:text-lg"
1212
>
1313
<div class="contents">%sveltekit.body%</div>
1414
</body>

src/routes/landing/Codeblock.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</script>
1515

1616
<div
17-
class="rounded-md border border-gray-800 overflow-clip bg-neutral-950 max-w-4xl {classes}"
17+
class="rounded-md border border-gray-800 overflow-clip bg-neutral-950 max-w-full lg:max-w-4xl {classes}"
1818
data-interactive-cursor="hidden"
1919
>
2020
<div class="flex justify-between items-center px-3 py-2">

src/routes/landing/Header.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div
4949
class="h-full overflow-y-auto pt-64 min-h-screen pb-32 lg:py-16 flex flex-col justify-center 2xl:items-end items-center px-8 2xl:pr-16"
5050
>
51-
<h1 class="font-extrabold text-7xl lg:text-8xl text-center 2xl:text-right text-white mb-16">
51+
<h1 class="font-extrabold text-5xl lg:text-8xl text-center 2xl:text-right text-white mb-16">
5252
<span class="drop-shadow-lg">Svelte</span>
5353
<strong class="block drop-shadow-lg text-indigo-950">Interactive</strong>
5454
<span class="drop-shadow-lg text-indigo-950">Cursor</span>
@@ -63,7 +63,7 @@
6363
<div class="flex flex-wrap justify-center gap-4 lg:max-w-lg max-w-md mt-8">
6464
{#each itemsToCopy as { text }, idx (idx)}
6565
<div class="flex w-full rounded-md shadow-sm">
66-
<pre class="bg-gray-900 p-2 rounded-l-md text-sm flex w-full overflow-auto">
66+
<pre class="bg-gray-900 p-2 rounded-l-md text-xs md:text-sm flex w-full overflow-auto">
6767
<code>{@html text}</code>
6868
</pre>
6969
<button

src/routes/landing/Sections.svelte

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
>
3737
<header class="mb-16">
3838
<ShowCode
39-
code={`
40-
<script>
39+
code={`<script>
4140
import InteractiveCursor from '@lostisworld/svelte-interactive-cursor';
4241
4342
let activeDataValue = $state({ activeDataName: '', activeDataElement: null });
@@ -173,14 +172,14 @@
173172
`}
174173
/>
175174
<h2
176-
class="text-center 2xl:text-left text-indigo-600 text-4xl font-bold leading-relaxed text-balance mb-16"
175+
class="text-center 2xl:text-left text-indigo-600 text-2xl md:text-4xl font-bold leading-relaxed text-balance mb-16"
177176
>
178177
Hover over the navigation and add items to the <strong>useDataElementRect</strong> to dynamically
179178
obtain the element's dimensions.
180179
</h2>
181180
</header>
182181
<ul
183-
class="flex justify-center shadow-lg shadow-gray-400 rounded-md text-gray-700 p-6 border-t border-white"
182+
class="flex flex-wrap justify-center shadow-lg shadow-gray-400 rounded-md text-gray-700 p-6 border-t border-white"
184183
>
185184
<li>
186185
<button class="px-6 py-2 hover:text-indigo-600 uppercase" data-interactive-cursor="navitem"
@@ -210,12 +209,7 @@
210209
</ul>
211210
</section>
212211

213-
<section
214-
class={[
215-
'flex justify-center flex-col items-center 2xl:items-start px-6 lg:px-16',
216-
sectionDefaultOptions
217-
]}
218-
>
212+
<section class={[ 'flex justify-center flex-col items-center 2xl:items-start px-6 lg:px-16', sectionDefaultOptions]}>
219213
<ShowCode
220214
code={`
221215
<script>
@@ -242,9 +236,8 @@
242236
/>
243237
`}
244238
/>
245-
<h2
239+
<h2 class="text-2xl text-center 2xl:text-left text-white font-extrabold lg:text-6xl lg:leading-tight text-pretty"
246240
data-interactive-cursor="mixblend"
247-
class="text-3xl text-center 2xl:text-left text-white font-extrabold lg:text-6xl lg:leading-tight text-pretty"
248241
>
249242
This package enhances user experience by providing a customizable and interactive cursor.<br
250243
/>It is perfect for adding unique cursor effects to your Svelte applications, making them more
@@ -318,7 +311,7 @@
318311
</InteractiveCursor>
319312
`}
320313
/>
321-
<h2 class="text-4xl text-center 2xl:text-left text-white font-bold leading-relaxed mb-16">
314+
<h2 class="text-2xl md:text-4xl text-center 2xl:text-left text-white font-bold leading-relaxed mb-16">
322315
Creating a new way to interact with your elements!<br /> With Svelte Interactive Cursor
323316
</h2>
324317
<Slider images={cards} />

src/routes/landing/ShowCode.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
99
let { code }: Props = $props();
1010
let showCode = $state(false);
11-
$inspect(showCode);
1211
</script>
1312

1413
<div class="flex flex-col items-center 2xl:items-start">

0 commit comments

Comments
 (0)