-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
87 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { create, insertMultiple, search } from 'npm:@orama/orama' | ||
|
||
const movieDB = await create({ | ||
schema: { | ||
title: 'string', | ||
director: 'string', | ||
plot: 'string', | ||
year: 'number', | ||
isFavorite: 'boolean', | ||
}, | ||
}) | ||
|
||
const docs = [ | ||
{ | ||
title: 'The prestige', | ||
director: 'Christopher Nolan', | ||
plot: 'Two friends and fellow magicians become bitter enemies after a sudden tragedy. As they devote themselves to this rivalry, they make sacrifices that bring them fame but with terrible consequences.', | ||
year: 2006, | ||
isFavorite: true, | ||
}, | ||
{ | ||
title: 'Big Fish', | ||
director: 'Tim Burton', | ||
plot: 'Will Bloom returns home to care for his dying father, who had a penchant for telling unbelievable stories. After he passes away, Will tries to find out if his tales were really true.', | ||
year: 2004, | ||
isFavorite: true, | ||
}, | ||
{ | ||
title: 'Harry Potter and the Philosopher\'s Stone', | ||
director: 'Chris Columbus', | ||
plot: 'Harry Potter, an eleven-year-old orphan, discovers that he is a wizard and is invited to study at Hogwarts. Even as he escapes a dreary life and enters a world of magic, he finds trouble awaiting him.', | ||
year: 2001, | ||
isFavorite: false, | ||
}, | ||
]; | ||
|
||
// await insertMultiple(movieDB, docs); | ||
|
||
|
||
const searchResult = await search(movieDB, { | ||
term: 'Chr', | ||
}) | ||
|
||
console.log(searchResult) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { goto } from '$app/navigation' | ||
|
||
export function goToChapter() { | ||
const bkString = localStorage.getItem('bookmark') | ||
|
||
if (bkString) { | ||
const bkmark = JSON.parse(bkString) | ||
|
||
const book = bkmark.book | ||
const version = bkmark.version | ||
const chapter = bkmark.chapter | ||
|
||
goto(`/chapter/${version}/${book}/${chapter}`) | ||
return | ||
} | ||
|
||
goto('/chapter/rv1960/Genesis/1') | ||
} |
3b7ab7a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bible-app-ubqz – ./
bible-app-ubqz-atticus64.vercel.app
bible-app-ubqz-git-main-atticus64.vercel.app
bible-study.vercel.app