Skip to content

Commit

Permalink
run format script on whole project
Browse files Browse the repository at this point in the history
  • Loading branch information
nhitz committed May 25, 2024
1 parent 59b4d8e commit 327ba7c
Show file tree
Hide file tree
Showing 37 changed files with 723 additions and 665 deletions.
7 changes: 6 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", "schedule:weekly", "group:allNonMajor", ":automergeMinor"],
"extends": [
"config:base",
"schedule:weekly",
"group:allNonMajor",
":automergeMinor"
],
"rangeStrategy": "bump"
}
13 changes: 13 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// .prettierrc.mjs
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};
Binary file removed bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"test": "vitest"
"test": "vitest",
"format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
},
"dependencies": {
"@astrojs/svelte": "^5.0.0",
Expand Down
4 changes: 1 addition & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
"extends": ["config:recommended"]
}
13 changes: 2 additions & 11 deletions repositories.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,7 @@
},
"description": "GoatFlix fork of Overseerr",
"owner": "nhitz",
"topics": [
"plex",
"radarr",
"sonarr"
],
"topics": ["plex", "radarr", "sonarr"],
"stars": 0,
"forks": 0,
"watchers": 0,
Expand Down Expand Up @@ -257,12 +253,7 @@
},
"description": "Testing out PrimeVue theming with Vue 3 and Vite. Demo deployed to Azure free tier with GitHub Actions.",
"owner": "nhitz",
"topics": [
"primefaces",
"primevue",
"vite",
"vue"
],
"topics": ["primefaces", "primevue", "vite", "vue"],
"stars": 0,
"forks": 0,
"watchers": 0,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DotsButton.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import {Icon} from "astro-icon/components";
import { Icon } from "astro-icon/components";
interface Props {
size?: "md" | "lg";
Expand Down
3 changes: 2 additions & 1 deletion src/components/HomepageCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const { extraText } = Astro.props;
>
<div class="w-40">
<div class="relative group mx-auto h-40 w-full flex-none shadow-lg">
<img class="homepage-card-image"
<img
class="homepage-card-image"
src={imageUrl}
alt={title}
class="object-cover h-full w-full rounded-md shadow-[5px_0_30px_0px_rgba(0,0,0,0.3)]"
Expand Down
2 changes: 1 addition & 1 deletion src/components/LikeButton.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import {Icon} from "astro-icon/components";
import { Icon } from "astro-icon/components";
interface Props {
size?: "md" | "lg";
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageHeader.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import {Icon} from "astro-icon/components";
import { Icon } from "astro-icon/components";
---

<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlayButton.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import {Icon} from "astro-icon/components";
import { Icon } from "astro-icon/components";
interface Props {
size?: "md" | "lg";
Expand Down
11 changes: 5 additions & 6 deletions src/components/PlaylistDetailedList.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
import PlaylistCard from "./PlaylistCard.astro";
import {morePlaylists} from "../lib/musicData";
import { morePlaylists } from "../lib/musicData";
---

<div class="px-6 relative z-10 mt-4">
<h2 class="text-2xl font-bold">Made for you</h2>
<div class="flex flex-wrap mt-6 gap-4">
{morePlaylists.map((playlist) =>
<PlaylistCard playlist={playlist}/>)}
</div>
<h2 class="text-2xl font-bold">Made for you</h2>
<div class="flex flex-wrap mt-6 gap-4">
{morePlaylists.map((playlist) => <PlaylistCard playlist={playlist} />)}
</div>
</div>
4 changes: 3 additions & 1 deletion src/components/PlaylistSimpleList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { playlists } from "../lib/musicData";
import PlaylistItemCard from "./PlaylistItemCard.astro";
---

<div class="grid gap-y-4 gap-x-6 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 mt-6">
<div
class="grid gap-y-4 gap-x-6 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 mt-6"
>
{playlists.map((playlist) => <PlaylistItemCard playlist={playlist} />)}
</div>
2 changes: 1 addition & 1 deletion src/components/PureInlineOwners.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
interface Props {
owner: string;
owner: string;
}
const { owner } = Astro.props;
Expand Down
15 changes: 10 additions & 5 deletions src/components/RepoDetailedList.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
---
import RepositoryCard from "./RepositoryCard.astro";
import {repositories} from "../lib/githubData";
import { repositories } from "../lib/githubData";
---

<div class="px-6 relative z-10 mt-4">
<h2 class="text-2xl font-bold">The same repos displayed differently...</h2>
<div class="flex flex-wrap mt-6 gap-4">
{repositories.map((repository) => <RepositoryCard repository={repository}/>)}
</div>
<h2 class="text-2xl font-bold">The same repos displayed differently...</h2>
<div class="flex flex-wrap mt-6 gap-4">
{
repositories.map((repository) => (
<RepositoryCard repository={repository} />
))
}
</div>
</div>
10 changes: 8 additions & 2 deletions src/components/RepoSimpleList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { repositories } from "../lib/githubData";
import RepositoryItemCard from "./RepositoryItemCard.astro";
---

<div class="grid gap-y-4 gap-x-6 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 mt-6">
{repositories.map((repository) => (<RepositoryItemCard repository={repository} />))}
<div
class="grid gap-y-4 gap-x-6 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 mt-6"
>
{
repositories.map((repository) => (
<RepositoryItemCard repository={repository} />
))
}
</div>
50 changes: 25 additions & 25 deletions src/components/RepositoryCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ import type { Repository } from "../lib/githubData";
import PlayButton from "./PlayButton.astro";
import PureInlineOwners from "./PureInlineOwners.astro";
interface Props {
repository: Repository;
repository: Repository;
}
const { repository } = Astro.props;
---

<a
href={`/repositories/${repository.id}`}
class="playlist-card p-4 flex-col items-center group relative transition-all duration-300 overflow-hidden gap-5 rounded-md shadow-lg hover:shadow-xl outline-none bg-zinc-500/5 hover:bg-zinc-500/20 focus:bg-zinc-500/20"
data-color={repository.color.dark}
transition:name=`playlist ${repository.id} box`
href={`/repositories/${repository.id}`}
class="playlist-card p-4 flex-col items-center group relative transition-all duration-300 overflow-hidden gap-5 rounded-md shadow-lg hover:shadow-xl outline-none bg-zinc-500/5 hover:bg-zinc-500/20 focus:bg-zinc-500/20"
data-color={repository.color.dark}
transition:name=`playlist ${repository.id} box`
>
<div class="w-40">
<div class="relative group mx-auto h-40 w-full flex-none shadow-lg">
<div
class="absolute right-2 bottom-2 translate-y-4 group-hover:translate-y-0 opacity-0 group-hover:opacity-100 transition-all"
transition:name=`playlist ${repository.id} play`
>
<PlayButton />
</div>
</div>
<div class="pt-2">
<div
class="font-bold block truncate"
transition:name=`playlist ${repository.id} title`
>
{repository.name}
</div>
<div class="text-gray-400 text-xs">
<PureInlineOwners owner={repository.owner} />
</div>
</div>
<div class="w-40">
<div class="relative group mx-auto h-40 w-full flex-none shadow-lg">
<div
class="absolute right-2 bottom-2 translate-y-4 group-hover:translate-y-0 opacity-0 group-hover:opacity-100 transition-all"
transition:name=`playlist ${repository.id} play`
>
<PlayButton />
</div>
</div>
<div class="pt-2">
<div
class="font-bold block truncate"
transition:name=`playlist ${repository.id} title`
>
{repository.name}
</div>
<div class="text-gray-400 text-xs">
<PureInlineOwners owner={repository.owner} />
</div>
</div>
</div>
</a>
4 changes: 3 additions & 1 deletion src/components/RepositoryItemCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const { repository } = Astro.props;
transition:name=`playlist ${repository.id} box`
>
<div
class="font-bold block"transition:name=`playlist ${repository.id} title`>
class="font-bold block"
transition:name=`playlist ${repository.id} title`
>
{repository.name}
</div>
<div
Expand Down
50 changes: 30 additions & 20 deletions src/components/RepositoryTable.astro
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
---
import PureInlineOwners from "./PureInlineOwners.astro";
import InlineOwners from "./InlineOwners.astro";
import {repositories} from "../lib/githubData";
const {id} = Astro.params;
const repository = repositories.find((repository) => repository.id.toString() === id);
import { repositories } from "../lib/githubData";
const { id } = Astro.params;
const repository = repositories.find(
(repository) => repository.id.toString() === id
);
---

<table class="table-auto text-left min-w-full divide-y-2 divide-gray-500/30">
<thead>
<thead>
<tr class="text-gray-300">
<th class="font-normal px-4 py-2 whitespace-nowrap">#</th>
<th class="font-normal px-4 py-2 whitespace-nowrap">Title</th>
<th class="font-normal px-4 py-2 whitespace-nowrap">Link</th>
<th class="font-normal px-4 py-2 whitespace-nowrap">#</th>
<th class="font-normal px-4 py-2 whitespace-nowrap">Title</th>
<th class="font-normal px-4 py-2 whitespace-nowrap">Link</th>
</tr>
</thead>
<tbody>
</thead>
<tbody>
{
(
<tr class="text-gray-100">
<!--<td class="px-4 py-2 whitespace-nowrap">{index + 1}</td>-->
<td class="px-4 py-2 whitespace-nowrap">
<a href={repository?.url} class="hover:underline">{repository?.name}</a>
<!--<InlineOwners owners={repo.owner} />-->
</td>
<td class="px-4 py-2 whitespace-nowrap">
<a href={repository?.url} class="hover:underline">{repository?.name}</a>
<PureInlineOwners owner={repository?.owner || ''}/>
</td>
<td class="px-4 py-2 whitespace-nowrap text-right">{repository?.updated_at}</td>
{/* <td class="px-4 py-2 whitespace-nowrap">{index + 1}</td> */}
<td class="px-4 py-2 whitespace-nowrap">
<a href={repository?.url} class="hover:underline">
{repository?.name}
</a>
{/* <InlineOwners owners={repo.owner} /> */}
</td>
<td class="px-4 py-2 whitespace-nowrap">
<a href={repository?.url} class="hover:underline">
{repository?.name}
</a>
<PureInlineOwners owner={repository?.owner || ""} />
</td>
<td class="px-4 py-2 whitespace-nowrap text-right">
{repository?.updated_at}
</td>
</tr>
)
}
</tbody>
</tbody>
</table>
8 changes: 2 additions & 6 deletions src/components/Side/SideItemMusic.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ const { playlist } = Astro.props;
/>
</div>
<div class="flex flex-auto flex-col truncate">
<div class="font-semibold w-full flex-none truncate">
Music
</div>
<div class="text-gray-400 text-sm truncate flex-1">
Spotify
</div>
<div class="font-semibold w-full flex-none truncate">Music</div>
<div class="text-gray-400 text-sm truncate flex-1">Spotify</div>
</div>
</a>
6 changes: 2 additions & 4 deletions src/components/Side/SideItemRepos.astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ const { playlist } = Astro.props;
/>
</div>
<div class="flex flex-auto flex-col truncate">
<div class="font-semibold w-full flex-none truncate">
Git Repos
</div>
<div class="font-semibold w-full flex-none truncate">Git Repos</div>
<div class="text-gray-400 text-sm truncate flex-1">
<PureInlineOwners owner=nhitz />
<PureInlineOwners owner="nhitz" />
</div>
</div>
</a>
2 changes: 1 addition & 1 deletion src/components/Side/SideMenuItem.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import {Icon} from "astro-icon/components";
import { Icon } from "astro-icon/components";
type Props = {
href?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ declare global {
window.coloradTimeout = null;
for (const playlist of document.querySelectorAll(".playlist-item")) {
playlist.addEventListener("mouseover", () =>
onMouseOverColorad(playlist)
onMouseOverColorad(playlist),
);
playlist.addEventListener("mouseout", onMouseOutColorad);
playlist.addEventListener("focus", () => onMouseFocusColorad(playlist));
Expand All @@ -87,7 +87,7 @@ declare global {
if (!dataColor) return;
window.coloradTimeout = setTimeout(
() => setContainerColor(dataColor),
200
200,
);
}
}
Expand Down
Loading

0 comments on commit 327ba7c

Please sign in to comment.