-
Notifications
You must be signed in to change notification settings - Fork 0
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
12 changed files
with
132 additions
and
35 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export type CustomError = { | ||
message: string; | ||
code: string; | ||
}; |
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,4 @@ | ||
export type Imprint = { | ||
text: string; | ||
status: number; | ||
}; |
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import { serverURL } from '$lib/Store'; | ||
import type { Imprint } from '$lib/types/Imprint'; | ||
import type { PageServerLoad } from './$types'; | ||
|
||
type imprint = { | ||
text: string; | ||
}; | ||
|
||
export const load = (async () => { | ||
const imprint: Imprint = { | ||
text: '', | ||
status: 0 | ||
}; | ||
let serverUrl: string = ''; | ||
serverURL.subscribe((prev_val) => (serverUrl = prev_val)); | ||
const url: string = serverUrl + '/imprint'; | ||
const response = await fetch(url); | ||
const responseObject: imprint = await response.json(); | ||
const imprintText: string = responseObject.text; | ||
const responseObject = await response.json(); | ||
imprint.text = responseObject.text; | ||
imprint.status = responseObject.status; | ||
|
||
return { | ||
text: imprintText | ||
imprint: imprint | ||
}; | ||
}) satisfies PageServerLoad; |
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 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,38 @@ | ||
<script lang="ts"> | ||
import { Toast } from '@skeletonlabs/skeleton'; | ||
//import { getToastStore } from '@skeletonlabs/skeleton'; | ||
//import { createToast } from '$lib/Toasts'; | ||
import { initializeStores } from '@skeletonlabs/skeleton'; | ||
import Icon from '@iconify/svelte'; | ||
//import { serverURL } from '$lib/Store'; | ||
//import type { PostStructure } from '$lib/types/Post'; | ||
initializeStores(); | ||
//const toastStore = getToastStore(); | ||
//let response: Response; | ||
//let hashtagInput: string; | ||
//let serverUrl: string; | ||
//let statusCode: number = 0; | ||
//let posts: Array<PostStructure> = []; | ||
//async function handleHashtagInput(event: Event) {} | ||
</script> | ||
|
||
<Toast /> | ||
<div class="mt-8 mb-8 w-3/5 min-h-screen mx-auto"> | ||
<div class="mb-8 flex justify-center items-center gap-4"> | ||
<a href="/search/users"> | ||
<Icon class="w-10 h-10" icon="mdi:account-search-outline" style="font-size: 32px" /> | ||
</a> | ||
<a href="/search/posts"> | ||
<Icon | ||
class="w-10 h-10" | ||
icon="mdi:text-box-search" | ||
style="font-size: 32px; border: 2px solid; border-radius: 5px;" | ||
/> | ||
</a> | ||
</div> | ||
<input class="input w-full" type="search" name="hashtag" placeholder="Search a hashtag..." /> | ||
<div class="mt-4 w-full"></div> | ||
</div> |
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