Skip to content

Commit

Permalink
feat: add stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bbtgnn committed Mar 1, 2024
1 parent d436af0 commit 0572f98
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ todo:

- usare AI per tradurre i pdf in file svelte (e anche Notion)

- import collection also from index.ts ( but also json and other, yaml!)

syntax: export const document = create_document()
typescript will take care of explaining

---

- "inline" properties like:
Expand Down
2 changes: 1 addition & 1 deletion src/_modules/components/LogBanner.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
</script>

{#if dev && $config.showLogBanners}
{#if dev || $config.showLogBanners}
<div class="border border-stone-300 bg-stone-100 p-4 text-stone-800">
<name class="font-bold">{name}</name>
<p>{message}</p>
Expand Down
8 changes: 8 additions & 0 deletions src/_modules/components/Paths.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!-- <script lang="ts">
import type { CollectionName } from "$modules/database";
export let collection_name: CollectionName|undefined
</script>
-->

<!-- TODO -->
1 change: 1 addition & 0 deletions src/_modules/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const Optional = T.Optional;
export const Boolean = T.Boolean;
export const Union = T.Union;
export const Literal = T.Literal;
export const Array = T.Array;

/* Date */

Expand Down
5 changes: 4 additions & 1 deletion src/routes/(database)/_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ export default database({
date_start: F.DateString('yyyy-MM'),
date_end: F.Optional(F.DateString('yyyy-MM')),
current: F.Optional(F.Boolean()),
organization: F.Relation('organizations')
employer: F.Relation('organizations'),
roles: F.Array(F.String())
}),

education: F.Object({}),

projects: F.Object({})
});
4 changes: 2 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<Document collection="organizations" name="dyne" let:doc>
<pre>{JSON.stringify(doc)}</pre>
<img alt="ciao" src={doc.props?.logo} />
<!-- <EntryContent /> -->
</Document>

<hr />
Expand All @@ -31,9 +30,10 @@
<div class="flex gap-2">
{#each entries as experience}
<div class="rounded-lg border border-gray-300 p-4">
<!-- TODO: Componente come superdebug di superforms per testare i json, visibile solo in dev -->
<pre>{JSON.stringify(experience, null, 2)}</pre>

<Relation to={experience.props?.organization} let:doc>
<Relation to={experience.props?.employer} let:doc>
<pre>{JSON.stringify(doc, null, 2)}</pre>
<DocumentContent />
</Relation>
Expand Down

0 comments on commit 0572f98

Please sign in to comment.