Skip to content

Commit

Permalink
Merge pull request #326 from mokletdev/development
Browse files Browse the repository at this point in the history
Sync
  • Loading branch information
ahsanzizan authored Jan 7, 2025
2 parents 5376d48 + 1b739af commit 7d9c871
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 50 deletions.
61 changes: 61 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Contributing to Moklet.org

Thank you for considering contributing to Moklet.org! Your support helps us enhance this project.

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [How to Contribute](#how-to-contribute)
- [Reporting Issues](#reporting-issues)
- [Rules for Verified Issues](#rules-for-verified-issues)
- [Submitting Pull Requests](#submitting-pull-requests)
- [Development Setup](#development-setup)
- [Style Guidelines](#style-guidelines)
- [License](#license)

## Code of Conduct

Please adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) in all interactions.

## How to Contribute

### Reporting Issues

- **Search Existing Issues**: Before reporting, check if the issue already exists.
- **Create a New Issue**: If not found, open a new issue with detailed information, including steps to reproduce, expected behavior, and screenshots if necessary.

### Rules for Verified Issues

- **Labeling**: Verified issues will have the label `todo`.
- **Open for Contribution**: Anyone can work on `todo` issues **if they are not assigned to someone**.
- **Self-Assignment**: You can assign yourself to an issue to indicate that you are working on it.
- **Claiming an Issue**: Leave a comment to express your intent to work on a `todo` issue before assigning it to yourself.

### Submitting Pull Requests

- **Fork the Repository**: Start by forking the repository to your GitHub account.
- **Branch Selection**:
- For simple changes, you can commit directly to the `development` branch of your fork.
- For more complex changes, create a new branch in your fork with a descriptive name (e.g., `feature/add-user-auth` or `bugfix/fix-navbar-issue`).
- **Implement Changes**: Make your changes and ensure they align with the project's code formatting and guidelines.
- **Write a Clear Description**: When opening a pull request (PR), provide a clear and concise description of your changes, including:
- The purpose of the PR.
- Any relevant details about the implementation.
- How the changes improve the project.
- **Link to Issues**:
If your PR is related to an issue, link it to the issue by following [GitHub's guide for linking pull requests to issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue). This helps maintain traceability and context for the changes.
- Example: Include text like `Fixes #123` or `Closes #456` in your PR description to automatically close the related issue when the PR is merged.
- **Submit the PR**: Open a pull request to the `development` branch of the main repository. Collaborators will review your changes and provide feedback if necessary.

### Discussions

- Use [GitHub Discussions](https://github.com/mokletdev/moklet.org/discussions) for brainstorming ideas, seeking feedback, or discussing potential features. This helps maintain clear communication among contributors.

## Style Guidelines

- **Code Formatting**: Follow the project's `.eslintrc.json` and `.prettierrc` configurations.
- **Commit Messages**: Use clear and descriptive messages. Follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for structured commit messages.

## License

By contributing, you agree that your contributions will be licensed under the [GPL-3.0 License](LICENSE).
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Technologies used in the project:
- NextAuth.JS
- Prisma

## 🤝 Contributing

We welcome contributions to this project! Please take a moment to review our [📄 CONTRIBUTING.md](https://github.com/mokletdev/moklet.org/blob/development/CONTRIBUTING.md) guide for details on our code of conduct, contribution process, and how to get started.

Your support and ideas make this project even better. Thank you for being part of our community! 🌟

<h2>🛡️ License:</h2>

This project is licensed under the GNU [General Public License v3.0](https://github.com/mokletdev/moklet.org/blob/development/LICENSE.md)
88 changes: 44 additions & 44 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dotenv-cli": "^7.4.1",
"echarts": "^5.5.0",
"echarts-for-react": "^3.0.2",
"next": "^14.2.5",
"next": "^14.2.22",
"next-auth": "^4.24.7",
"next-nprogress-bar": "^2.3.11",
"nextjs-toploader": "^1.6.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function RelatedNewsFigure({
</div>
<div className="flex flex-col items-start justify-start gap-[26px]">
<div>
<div className="mb-[16px] mt-[26px] flex gap-[10px]">
<div className="mb-[16px] mt-[26px] flex flex-wrap gap-[10px]">
{post.tags.map((tag) => (
<Tags tag={tag} key={tag.tagName} />
))}
Expand Down
2 changes: 1 addition & 1 deletion src/app/(main)/berita/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default async function Post({ params }: { params: { slug: string } }) {
/>
</div>
<div className="w-full">
<div className="mb-[42px] flex flex-col lg:flex-row justify-between items-start gap-[32px] lg:gap-0 lg:items-center">
<div className="mb-[42px] flex flex-col lg:flex-row justify-between items-start gap-[32px] lg:items-center">
<div className="flex flex-wrap gap-[10px]">
{post?.tags.map((tag) => (
<Tags tag={tag} key={tag.tagName} />
Expand Down
6 changes: 4 additions & 2 deletions src/app/(main)/berita/tags/[tag]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import { findPostByTag } from "@/utils/database/tag.query";
import GoBack from "../../[slug]/_components/BackButton";

export default async function Tag({ params }: { params: { tag: string } }) {
const filteredPost = await findPostByTag(params.tag, true);
const decodedTag = decodeURIComponent(params.tag);

const filteredPost = await findPostByTag(decodedTag, true);

return (
<SmallSectionWrapper id="tag">
<GoBack />

<div className="mt-8">
<H2 className="mb-[54px]">Post dengan tag &quot;{params.tag}&quot;</H2>
<H2 className="mb-[54px]">Post dengan tag &quot;{decodedTag}&quot;</H2>
<div className="flex flex-wrap gap-x-[36px] gap-y-[62px]">
{filteredPost?.map((post) => (
<NewsFigure post={post as PostWithTagsAndUser} key={post.id} />
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/global/NewsFigure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function Tags({ tag }: Readonly<{ tag: Tag }>) {
<Link
key={tag.tagName}
href={`/berita/tags/${tag.tagName}`}
className="rounded-full bg-primary-50 text-primary-400 px-[18px] py-1.5 transition-all duration-500 hover:bg-primary-400 hover:text-primary-50"
className="rounded-[18px] bg-primary-50 text-primary-400 px-[18px] py-1.5 transition-all duration-500 hover:bg-primary-400 hover:text-primary-50"
>
<span className="text-sm">{tag.tagName}</span>
</Link>
Expand Down

0 comments on commit 7d9c871

Please sign in to comment.