Skip to content

Commit

Permalink
Refactor ComponentStructure layout and add a wrapper div in Router page
Browse files Browse the repository at this point in the history
  • Loading branch information
valiantlynx committed Dec 29, 2023
1 parent 1b12bbc commit 133a741
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/lib/site-components/ComponentStructure.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<h1 class="text-4xl font-bold text-center">{title}</h1>

<div class="m-10 h-96">
<div class="m-10">
<slot />
</div>

Expand All @@ -69,7 +69,7 @@
<form
action="/components/{url}?/save"
method="POST"
class="rounded-box p-1 items-center mt-3 bg-slate-200 text-gray-700"
class="rounded-box p-1 items-center mt-3 bg-slate-200 text-gray-700 mx-7"
use:enhance={saveData}
>
<ValiantRichText bind:initialData={$contentData} />
Expand Down
13 changes: 11 additions & 2 deletions src/routes/components/leaflet-map/data.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/routes/components/router/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import { routeCoordinates, instructions, summary } from '$lib/components/stores';
import jsonData from './data.json';
console.log($summary);
</script>

<ComponentStructure title="Router" url="router" {jsonData}>
<Route />
<div class="h-96">
<Route />
</div>

<div slot="more">
<div>
<h1 class="text-4xl font-bold text-center">routeCoordinates</h1>
Expand Down

0 comments on commit 133a741

Please sign in to comment.