Project

catpop

0.0
The project is in a healthy, maintained state
Catpop is a gem that provides a random cat emoji popup for Rails applications. The emoji appears at a random position on the screen and disappears after a few seconds.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Catpop Gem

Overview

catpop is a Ruby on Rails gem that adds a random cat emoji popup to your web page at random intervals. The emoji appears at random positions and sizes, and disappears after a few seconds.

How to Install (English)

Prerequisites

  • Ruby version: 2.7.8 or later
  • Rails version: 6.x or later

1. Add the gem to your Gemfile

Add the following line to your Rails application's Gemfile:

gem "catpop"

2. Install the gem

Run the following command to install the gem:

bundle install

3. Include the helper in your layout

Edit your application.html.erb layout file and include the catpop_script_tag to load the JavaScript.

<!DOCTYPE html>
<html>
  <head>
    <title>CatpopTest</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <%= catpop_script_tag %> <!-- Add this line -->
    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
  </head>
  ...

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.