Skip to content

Commit

Permalink
Merge pull request #15 from zaanposni/release/1.1.0
Browse files Browse the repository at this point in the history
release/1.1.0
  • Loading branch information
zaanposni authored Jan 21, 2024
2 parents 9de6659 + bdb8f53 commit 9720888
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 15 deletions.
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ docker-compose up -d

You can view the docker logs with `docker-compose logs -f`.

Keep in mind that some data imports might take a while. You can view the progress of the data imports in the docker logs.\
Most data imports are executed periodically. Wait at least an hour before you start to worry about missing data.

That's all you need to know to start! 🎉

## 📝 Development
Expand Down
4 changes: 2 additions & 2 deletions src/psaggregator/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/psaggregator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "psaggregator",
"version": "1.0.0",
"version": "1.1.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
Expand Down
2 changes: 1 addition & 1 deletion src/psaggregator/src/lib/components/BigHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{#if matches}
<a href="/">Home</a>
<a href="/thumbnails">Thumbnails</a>
<a href="/information">Information</a>
<a href="/news">News</a>
<a href="/api">API</a>
<a href="/motivation">Motivation</a>
<a href="https://github.com/zaanposni/psaggregator/" target="_blank">
Expand Down
8 changes: 4 additions & 4 deletions src/psaggregator/src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { version } from "$app/environment";
import { TabAnchor, TabGroup } from "@skeletonlabs/skeleton";
import { page } from "$app/stores";
import { Api, FavoriteFilled, Home, Information, Thumbnail_2 } from "carbon-icons-svelte";
import { Api, FavoriteFilled, Home, Document, Thumbnail_2 } from "carbon-icons-svelte";
</script>

<style lang="postcss">
Expand Down Expand Up @@ -61,11 +61,11 @@
</div>
<span>Thumbnails</span>
</TabAnchor>
<TabAnchor href="/information" selected={$page.url.pathname === "/information"} class="shrink-0">
<TabAnchor href="/news" selected={$page.url.pathname === "/news"} class="shrink-0">
<div class="flex justify-center" slot="lead">
<Information />
<Document />
</div>
<span>Information</span>
<span>News</span>
</TabAnchor>
<TabAnchor href="/api" selected={$page.url.pathname === "/api"} class="shrink-0">
<div class="flex justify-center" slot="lead">
Expand Down
19 changes: 19 additions & 0 deletions src/psaggregator/src/routes/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,28 @@ export async function load() {
take: 5
});

const youtubeCommunityPosts = await prisma.information.findMany({
where: {
importedFrom: {
equals: "YouTube"
},
href: {
not: null
},
date: {
not: null
}
},
orderBy: {
date: "desc"
},
take: 3
});

return {
videos,
upcomingStreams,
youtubeCommunityPosts,
today,
twitchStatus,
redditPosts
Expand Down
25 changes: 18 additions & 7 deletions src/psaggregator/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import PSVideo from "$lib/components/PSVideo.svelte";
import TwitchStatus from "$lib/components/TwitchStatus.svelte";
import RedditPost from "$lib/components/RedditPost.svelte";
import { List, DataError, VideoPlayer } from "carbon-icons-svelte";
import { List, DataError, VideoPlayer, LogoYoutube } from "carbon-icons-svelte";
import YouTubeCommunityPost from "$lib/components/YouTubeCommunityPost.svelte";
export let data: PageServerData;
</script>
Expand Down Expand Up @@ -41,7 +42,6 @@
<UploadPlanEntry entry={content} />
{:else}
<div class="flex items-center mt-4">
<DataError size={32} class="mr-2" />
<span>Bisher konnte heute kein Uploadplan importiert werden.</span>
</div>
{/each}
Expand All @@ -57,15 +57,15 @@
</div>
{/if}
</div>
<div class="grid grid-cols-1 gap-x-8 gap-y-4 md:gap-y-8 xl:grid-cols-2">
<div class="grid grid-cols-1 gap-x-8 gap-y-4 md:gap-y-8 xl:grid-cols-3">
<div>
<div class="mb-2 ml-2 flex items-center text-2xl">
<img alt="reddit" src="/reddit-logo.svg" class="mr-2 inline-block h-8 w-8" />
Reddit
<LogoYoutube size={32} class="mr-2" />
YouTube
</div>
<div class="flex flex-col">
{#each data.redditPosts as reddit}
<RedditPost entry={reddit} />
{#each data.youtubeCommunityPosts as youtube}
<YouTubeCommunityPost post={youtube} />
{/each}
</div>
</div>
Expand All @@ -80,6 +80,17 @@
{/each}
</div>
</div>
<div>
<div class="mb-2 ml-2 flex items-center text-2xl">
<img alt="reddit" src="/reddit-logo.svg" class="mr-2 inline-block h-8 w-8" />
Reddit
</div>
<div class="flex flex-col">
{#each data.redditPosts as reddit}
<RedditPost entry={reddit} />
{/each}
</div>
</div>
</div>
<div>
<div class="mb-2 ml-2 flex items-center text-2xl">
Expand Down

0 comments on commit 9720888

Please sign in to comment.