Skip to content

Add "Random Post" Button on Homepage #11779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KODURISAIKIRAN
Copy link

Description:
This PR adds a "🎲 Random Post" button to the homepage of the Public Lab website. The button is designed to enhance user engagement by letting visitors discover a random post with a single click. It's a fun and interactive way to explore content on the site.

Changes made:

Added a button labeled "🎲 Random Post".

The button links to the route /random, which loads a randomly selected post.
Related Issue:
Fixes #11187
Screenshot
screenshotOfRandomPostButton

@KODURISAIKIRAN KODURISAIKIRAN requested a review from a team as a code owner April 7, 2025 18:26
Copy link

welcome bot commented Apr 7, 2025

Thanks for opening this pull request! This space is protected by our Code of Conduct - and we're here to help.
Dangerbot will test out your code and reply in a bit with some pointers and requests.
Also please refer here for installation help 💿
There may be some errors, but don't worry! We'll work through them with you! 👍🎉😄


One thing that can help to get started is to make sure you've included a link back to the original issue you're solving, in the format fixes #0000 (for example). And to make sure the PR title describes what you're trying to do! (often it can be the same as the issue title) Thanks! 🙌


Then, you can say hello in our chatroom & share a link to this PR to get a review! 👋 ✅

@@ -501,4 +501,9 @@ def published_notes
.where('node.status = 1')
.where.not(nid: hidden_nids)
end
def random
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use empty lines between method definitions.

Copy link

codeclimate bot commented Apr 7, 2025

Code Climate has analyzed commit 8a1d8da and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Style 1

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GSoC '22] Refine User Interfaces across PublicLab.org - Project Planning
1 participant