Skip to content

Commit

Permalink
/plugins mobile ready
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperRonanCraft committed May 21, 2024
1 parent 9c9c2d7 commit 13de524
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
11 changes: 4 additions & 7 deletions src/components/plugins/Plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ export default function Plugin({ plugin }: { plugin: any }) {
className=" mx-auto my-2 h-20 hover: border rounded-xl bg-white bg-gradient-to-r from-cyan-500 to-blue-500"
src={"https://www.spigotmc.org/" + plugin.icon.url}
/>
<div className=" flex">
<div className="grow"></div>
<div className="grow-0">
<Ratings rating={plugin.rating.average} />
</div>
<div className="grow"></div>
</div>{" "}
<div className="flex">
<Ratings rating={plugin.rating.average} />
</div>

<p className="text-sm text-gray-500">{plugin.rating.count} ratings</p>
<p className="">{plugin.downloads} downloads</p>
</CardContent>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/rating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Ratings = ({ ...props }: RatingsProps) => {
) : null;

return (
<div className={cn("flex items-center gap-2")} {...props}>
<div className="flex mx-auto">
{[...Array(fullStars)].map((_, i) =>
React.cloneElement(Icon, {
key: i,
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Plugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const Plugins = () => {
<h1 className="text-center font-bold text-secondary px-4 bg-primary rounded-full">
Premium Plugins
</h1>
<div className="my-10 grid grid-cols-3 gap-3 mx-10">
{/* Premium Plugins */}
{/* Premium Plugins */}
<div className="my-10 grid grid-cols-2 sm:grid-cols-3 gap-3 mx-5">
{pluginsPremium.map((plugin) => (
<Plugin key={(plugin as any).id} plugin={plugin} />
))}
Expand All @@ -47,7 +47,7 @@ const Plugins = () => {
<h1 className="text-center font-bold text-secondary px-4 bg-primary rounded-full">
Free Plugins
</h1>
<div className="my-10 grid grid-cols-4 gap-3 mx-10">
<div className="my-10 grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3 mx-5">
{pluginsFree.map((plugin) => (
<Plugin key={(plugin as any).id} plugin={plugin} />
))}
Expand Down

0 comments on commit 13de524

Please sign in to comment.