data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: auth and layouting

+51 -49
+1 -1
src/lib/guestbookAuth.ts
··· 61 61 return `https://github.com/login/oauth/authorize?client_id=${client_id}&redirect_uri=${redir_uri}&scope=${scope}&state=${state}` 62 62 }, 63 63 getToken: async (code: string): Promise<TokenResponse> => { 64 - const api = `https://discord.com/api/oauth2/token` 64 + const api = `https://github.com/login/oauth/access_token` 65 65 const body = new URLSearchParams({ 66 66 client_id: env.GITHUB_CLIENT_ID, 67 67 client_secret: env.GITHUB_CLIENT_SECRET,
+50 -48
src/routes/guestbook/+page.svelte
··· 58 58 </div> 59 59 </Window> 60 60 <div class="grow" /> 61 - <Window title="entries" iconUri="/icons/entries.png"> 62 - <div class="flex flex-col gap-2 md:gap-4 2xl:w-[60ch]"> 63 - {#if data.getRatelimited} 64 - <p class="text-error"> 65 - woops, looks like you are being ratelimited, try again in like half a minute :3 66 - </p> 67 - {:else if data.getError} 68 - <p class="text-error">got error trying to fetch entries, pls tell me about this</p> 69 - <details> 70 - <summary>error</summary> 71 - <p>{data.getError}</p> 72 - </details> 73 - {:else} 74 - {#each data.entries as [entry_id, entry] (entry_id)} 75 - {@const date = new Date(entry.timestamp * 1e3).toLocaleString()} 76 - <div class="entry entryflex"> 77 - <div class="flex flex-row"> 78 - <p class="place-self-start grow text-2xl font-monospace"> 79 - #{entry_id} 61 + <div class="mb-[7vh] md:mb-0"> 62 + <Window title="entries" iconUri="/icons/entries.png"> 63 + <div class="flex flex-col gap-2 md:gap-4 2xl:w-[60ch]"> 64 + {#if data.getRatelimited} 65 + <p class="text-error"> 66 + woops, looks like you are being ratelimited, try again in like half a minute :3 67 + </p> 68 + {:else if data.getError} 69 + <p class="text-error">got error trying to fetch entries, pls tell me about this</p> 70 + <details> 71 + <summary>error</summary> 72 + <p>{data.getError}</p> 73 + </details> 74 + {:else} 75 + {#each data.entries as [entry_id, entry] (entry_id)} 76 + {@const date = new Date(entry.timestamp * 1e3).toLocaleString()} 77 + <div class="entry entryflex"> 78 + <div class="flex flex-row"> 79 + <p class="place-self-start grow text-2xl font-monospace"> 80 + #{entry_id} 81 + </p> 82 + <p class="justify-end self-center text-sm font-monospace">{date}</p> 83 + </div> 84 + <p class="text-lg ml-0.5 max-w-[56ch]">{entry.content}</p> 85 + <p 86 + class="place-self-end text-sm font-monospace max-w-[16ch] md:max-w-[24ch] lg:max-w-[32ch] overflow-hidden text-ellipsis" 87 + title={entry.author} 88 + > 89 + --- posted by {entry.author} 80 90 </p> 81 - <p class="justify-end self-center text-sm font-monospace">{date}</p> 82 91 </div> 83 - <p class="text-lg ml-0.5">{entry.content}</p> 84 - <p 85 - class="place-self-end text-sm font-monospace max-w-[16ch] md:max-w-[24ch] lg:max-w-[32ch] overflow-hidden text-ellipsis" 86 - title={entry.author} 87 - > 88 - --- posted by {entry.author} 89 - </p> 92 + {:else} 93 + <p>looks like there are no entries :(</p> 94 + {/each} 95 + {/if} 96 + {#if hasPreviousPage || hasNextPage} 97 + <div class="flex flex-row w-full justify-center items-center font-monospace"> 98 + {#if hasPreviousPage} 99 + <a href="/guestbook/?page={data.entries.length < 0 ? data.page - 1 : 1}" 100 + >&lt;&lt; previous</a 101 + > 102 + {/if} 103 + {#if hasNextPage && hasPreviousPage} 104 + <div class="w-1/12" /> 105 + {/if} 106 + {#if hasNextPage} 107 + <a href="/guestbook/?page={data.page + 1}">next &gt;&gt;</a> 108 + {/if} 90 109 </div> 91 - {:else} 92 - <p>looks like there are no entries :(</p> 93 - {/each} 94 - {/if} 95 - {#if hasPreviousPage || hasNextPage} 96 - <div class="flex flex-row w-full justify-center items-center font-monospace"> 97 - {#if hasPreviousPage} 98 - <a href="/guestbook/?page={data.entries.length < 0 ? data.page - 1 : 1}" 99 - >&lt;&lt; previous</a 100 - > 101 - {/if} 102 - {#if hasNextPage && hasPreviousPage} 103 - <div class="w-1/12" /> 104 - {/if} 105 - {#if hasNextPage} 106 - <a href="/guestbook/?page={data.page + 1}">next &gt;&gt;</a> 107 - {/if} 108 - </div> 109 - {/if} 110 - </div> 111 - </Window> 110 + {/if} 111 + </div> 112 + </Window> 113 + </div> 112 114 </div> 113 115 114 116 <style lang="postcss">