Commit Graph

129 Commits

Author SHA1 Message Date
0bca23ff77 fix: correct state name presence check
Some checks failed
Docker Dev / docker (push) Has been cancelled
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Docker Main / docker (push) Has been cancelled
- Update condition to check for state presence instead of name
- Ensure proper rendering of state badge in city and weather art views

This change improves the logic for displaying the state badge by
checking for the presence of the state object directly, which
prevents potential errors when the state name is not set. It
ensures that the badge is displayed correctly when a state is
associated with a city or weather art.
2025-04-26 00:29:33 +08:00
639c36200b refactor: improve conditional rendering in views
- Replace 'else' with 'elsif' for better clarity
- Ensure badges are displayed only when country and state are present

These changes enhance the readability of the code and ensure that
only relevant information is displayed in the UI, improving the
user experience.
2025-04-26 00:23:03 +08:00
5b7f0bba4f feat: enhance city and weather art views with links
- Update country and state badges to be links when region is present
- Maintain fallback display for badges when region is not available
- Improve user navigation by linking to relevant city pages

These changes enhance the user experience by allowing users to
click on country and state badges to view related cities. The
previous static display has been improved to provide more
contextual navigation options, making the application more
interactive and user-friendly.
2025-04-26 00:14:34 +08:00
2a4faca6c8 style: remove commented-out title line
- Removed the commented-out title line from the application layout.

This change improves code readability by eliminating unnecessary comments.
It does not affect the rendering or functionality of the application.
2025-04-25 17:06:23 +08:00
6f01174ea9 feat: enhance city description generation
- Modify get_description method to include an additional
  parameter for user context
- Update usage in views to reflect the new parameter
- Adjust temporary description message based on user context

This change enhances the city description generation logic by
allowing differentiation in how the description is provided
depending on whether the calling context is a user. It improves
the user experience while ensuring that non-user contexts
handle descriptions differently. This minor enhancement also
included updating the view to support this new logic.
2025-04-12 14:46:44 +08:00
e33209ccdd feat: enhance city description generation
- Add 'quick' parameter to get_description method to enable
  asynchronous generation requests.
- Implement AI description generation in the background using
  GenerateCityDescriptionWorker.
- Create a shared partial for displaying city descriptions in
  the show views for both cities and weather arts.
- Update existing methods to support generated descriptions and
  new asynchronous behavior.
2025-04-12 14:31:09 +08:00
371b534c48 fix: correct alt attribute for image tag
Some checks failed
Docker Dev / docker (push) Has been cancelled
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Docker Main / docker (push) Has been cancelled
- Update alt attribute to reference the first item's image_alt
- This change improves accessibility by ensuring the correct
  descriptive text is used if the latest_arts is present.

Prior to this change, there was a risk of displaying an incorrect
description if the latest_arts was empty, which could lead to
confusion for users relying on alt text for context.
2025-04-10 22:47:33 +08:00
4236e1a81d feat: add image alt text generation
- Introduced `image_alt` method in the WeatherArt model
- Updated image tags in views to use the new method for alt text
- Ensured consistent and descriptive alt text for better accessibility

This change improves the overall usability for screen readers and helps maintain a standard format for alt descriptions across various components in the application.
2025-04-10 22:37:27 +08:00
0cfb3e8e5c feat: add alt text to weather art images
- Introduced alt text for featured weather art images
- Added descriptive alt attribute to improve accessibility
- Enhanced SEO and user experience for image content

This change improves the accessibility of weather art images
by providing descriptive alt text. This helps visually impaired
users and enhances the website's SEO performance.
2025-04-10 17:41:24 +08:00
69415b8ba1 feat: add Turbo0 listing badge to home page
- Include a link to the Turbo0 webpage
- Add an image badge indicating the listing

This change enhances the visibility of the listing
for the application on Turbo0, promoting user
engagement and providing proof of the application's
presence on external platforms.
2025-04-10 16:51:20 +08:00
7f856c2975 style: update layout margins in home index view
- Change the top margin to mt-12 and bottom margin to mb-12
- Adjust the container class for a more balanced spacing

These changes enhance the visual appearance of the home page by
providing a consistent layout, improving overall user experience.
2025-04-10 15:38:29 +08:00
b38d2fe65b feat: enhance home page layout and add sponsorship badges
- Restructure home page layout for better visual appeal
- Add links to sponsorship badges for ImgLab and Product Hunt
- Ensure buttons are styled consistently with updated classes

These changes improve the user experience by providing a more attractive and informative layout. The addition of sponsorship badges also helps in promoting partnerships.
2025-04-10 15:09:51 +08:00
a156cc04d1 feat: add default meta tags for SEO
- Implement default_meta_tags method in ApplicationHelper
- Refactor application layout to utilize default_meta_tags

This change improves SEO by centralizing the meta tags configuration. It
ensures consistent metadata across the application while reducing
repetition in the layout files.
2025-04-08 16:48:22 +08:00
41150ba78b fix: update city title for improved SEO
- Change title format to include city and country names
- Comment out default title setting to avoid fallback

This update enhances the title tag used in the meta data of
city pages, providing better search engine optimization by
including both the city name and its country. The change
also comments out the default title with a fallback to avoid
showing an incorrect title when the city details are not
available.
2025-04-08 16:33:10 +08:00
11d7adba99 chore: comment out unused popular arts section
- Comment out the popular weather art rendering and related titles in
  the home index view.
- Keep the latest weather art section active for display.

This change removes sections of code related to popular and random
weather art, which are not currently in use, while preserving a
clean interface for the latest weather art.
2025-04-08 11:14:00 +08:00
6e07435474 chore: remove unused analytics scripts
- Deleted LA_COLLECT script and initialization code
- Removed any references to unused analytics resources

These changes clean up the application layout by removing
scripts that were no longer in use, potentially improving
load times and reducing unnecessary code complexity.
2025-04-08 11:10:29 +08:00
0dc47e4a92 feat: add LA data collection script
- Include SDK script for user activity collection
- Initialize SDK with specific IDs

This change integrates a data collection tool into the
application, allowing for improved tracking of user
interactions. The SDK will help gather actionable insights
for enhancing user experience.
2025-04-07 17:31:36 +08:00
435244777c style: simplify wiki data badge display
Some checks failed
Docker Dev / docker (push) Has been cancelled
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Docker Main / docker (push) Has been cancelled
- Removed unnecessary div wrappers from the wiki data badge
- Cleaned up the code for better readability

This change enhances the markup simplicity without affecting the functionality,
ensuring the badge displays correctly while maintaining the same styling.
2025-04-02 15:37:51 +08:00
75e7004da6 style: update badge styling for wiki data display
- Change badge class from 'badge-ghost' to 'badge-info'
- Adjust the badge to have a softer appearance

This update improves the visual clarity of the wiki data badge, making it
more consistent with the overall design while ensuring the functionality
remains unchanged.
2025-04-02 15:27:52 +08:00
ddc10e9679 style: update wiki data badge layout
- Wrap badge content in a div for better layout.
- Maintain existing functionality and styling while improving structure.

This change enhances the HTML structure of the wiki data badge by
encapsulating the link in a div element, which aids in layout
management without altering the way the component functions or
displays.
2025-04-02 15:25:46 +08:00
025ee0d06a fix: correct rendering syntax for wiki data badge
- Updated rendering syntax in 'show' view for cities
- Updated rendering syntax in 'show' view for weather arts

These changes ensure that the 'wiki_data_badge' partial is rendered
correctly in both views, improving the consistency of the code
and fixing potential display issues caused by the previous syntax.
2025-04-02 15:06:02 +08:00
1cc1af0ff2 feat: extract wiki data badge into a shared partial
- Replace inline wiki data badge code with a render call to a new
  shared partial.
- This change promotes code reuse and simplifies the view
  templates for cities and weather arts.
- The shared partial handles the condition for displaying the badge
  based on the presence of `wiki_data_id`.

This refactor enhances maintainability and adheres to DRY
principles, allowing for easier updates or changes to the wiki
badge display in one location instead of multiple views.
2025-04-02 14:54:49 +08:00
3bfc64b0c8 feat: add translations for wiki data in locales
- Add translation for 'wiki_data' in Arabic
- Add translation for 'wiki_data' in Bengali
- Add translation for 'wiki_data' in German
- Add translation for 'wiki_data' in English
- Add translation for 'wiki_data' in Spanish
- Add translation for 'wiki_data' in Persian
- Add translation for 'wiki_data' in French
- Add translation for 'wiki_data' in Hindi
- Add translation for 'wiki_data' in Croatian
- Add translation for 'wiki_data' in Italian
- Add translation for 'wiki_data' in Japanese
- Add translation for 'wiki_data' in Korean
- Add translation for 'wiki_data' in Polish
- Add translation for 'wiki_data' in Portuguese
- Add translation for 'wiki_data' in Russian
- Add translation for 'wiki_data' in Turkish
- Add translation for 'wiki_data' in Ukrainian
- Add translation for 'wiki_data' in Urdu
- Add translation for 'wiki_data' in Chinese (Simplified)

This update provides localized support for the term 'wiki_data' across multiple languages, improving user experience and accessibility in international environments.
2025-04-02 14:43:03 +08:00
73c73a2a9e feat: add WikiData link to city details
- Include a link to the city's WikiData page if available
- The link opens in a new tab and has a tooltip for better user experience

This change enhances the city details page by providing
users with easy access to additional information about the
city on WikiData, improving overall user engagement
and knowledge access.
2025-04-02 14:36:31 +08:00
a4fc4d4961 fix: handle image loading errors in views
- Wrap image_tag calls in begin-rescue blocks to catch loading errors
- Log any exceptions to Rails logger for better debugging
- Provide user feedback with a placeholder when images fail to load

These changes improve the robustness of the application by ensuring that errors do not cause disruptions in the user interface.
2025-03-25 17:21:19 +08:00
b33552f6b1 fix: add error handling for image loading
- Implemented error handling for image loading to prevent application
  crashes when an image fails to load.
- Added logging to capture the error message when an image cannot be
  displayed.

This change improves the reliability of the image display feature on
the home page, ensuring that users are not met with a broken layout
if an image fails to load.
2025-03-25 17:15:19 +08:00
6b3d290c4e feat: add download card for weather arts
- Create a download card component for weather arts
- Include options for premium purchase, medium quality, and a free WebP version
- Ensure proper layout and styling for the download options

This addition enhances the user experience by providing a clear
and organized way to download various versions of the weather
art. It also includes functionality for both paid and free
options, addressing different user needs.
2025-03-24 17:31:05 +08:00
fb6133f736 fix: handle image load errors in arts view
- Wrap image tag with begin-rescue to catch errors
- Display fallback message when image fails to load
- Log error messages to Rails logger for debugging

This change improves the robustness of the image loading
feature in the arts view by handling potential exceptions
when loading images. Users will see a placeholder message
if the image fails to load, enhancing user experience and
ensuring that the application does not crash due to unhandled
image load errors.
2025-03-10 23:55:25 +08:00
5de3d4306f feat: add tag formatting helper 2025-03-05 16:20:08 +08:00
4e322bd6e9 feat: add JSON feed support for weather art
- Implement JSON feed generation in the RssController
- Add new API endpoint to serve JSON feed
- Update RSS feed view to include hidden machine-readable data

This commit introduces a new feature that allows the application to
serve weather art data in JSON format. The JSON feed includes
metadata such as the title, description, and additional custom
fields for better integration with other services. The changes
also enhance the existing RSS feed by embedding machine-readable
data within the HTML structure, improving accessibility and
usability for automated systems.
2025-03-05 14:59:02 +08:00
e22d3d86de feat: enhance RSS feed with weather data
- Add custom XML namespace for weather data
- Include additional weather fields: country, city, state,
  weather description, prompt, and formatted date
- Update enclosure type to 'image/webp' for better
  compatibility

This update improves the RSS feed by providing more detailed
weather information for each art piece, enhancing the
user experience and ensuring better data representation.
The new fields allow for richer content in the feed, making
it more informative for users.
2025-03-05 14:42:14 +08:00
c82af65c26 feat: enhance RSS feed with additional weather data
- Add country name, city name, and state name to the RSS feed
- Include weather description and AI-generated description
- Add weather date to provide more context for each item

These changes improve the RSS feed by providing more detailed
information about the weather art, enhancing the user experience
and making the feed more informative for subscribers.
2025-03-05 13:46:57 +08:00
acbde3b034 feat: add hashtag support to social share button
- Include data-hashtag attribute in the Facebook share button
- Comment out an alternative database URL in credentials

This update enhances the social sharing feature by allowing
users to include hashtags when sharing content on Facebook.
The commented-out database URL serves as a reference for
future configurations.
2025-03-04 14:46:13 +08:00
98f60d270e refactor: remove language switcher from navbar
- Removed the language switcher component from the
  navigation bar.
- This change simplifies the user interface, focusing
  on primary navigation elements.

The decision was made to streamline navigation and reduce
clutter, as the language switcher was deemed not essential
for the current user experience.
2025-02-28 13:23:21 +08:00
30508af344 feat: add pagination parameters to weather arts
- Include region, country, state, and query parameters
  in the pagination helper for better filtering.
- This change enhances the user experience by allowing
  users to navigate through weather arts based on
  specific criteria, improving the relevance of the
  displayed results.
2025-02-26 15:59:39 +08:00
df7fbcd118 feat: enhance city pagination and data fetching
- Update cities controller to include state in city data
- Modify results partial to pass pagination parameters
- Adjust index view to support turbo frame actions

These changes improve the pagination functionality by ensuring
that the correct parameters are passed for filtering cities
based on region, country, and state. This enhances the user
experience by providing more relevant data and better
navigation through the city listings.
2025-02-26 15:31:45 +08:00
90c9a8946b fix: update cities path parameters
- Change cities_path to include both region and country
- Update active class logic to reflect current state

This fix ensures that the dropdown links correctly point to the
appropriate cities based on the selected region and country,
improving navigation and user experience.
2025-02-26 10:21:45 +08:00
f51dc8370b feat: add state filtering to cities index
- Implement state filtering in the CitiesController
- Add new scope `by_state` in the City model
- Update cities index view to include state dropdown
- Add slug column to states for friendly URLs
- Update English locale to include 'All States'

This commit enhances the cities index page by allowing users to
filter cities based on the selected state. It introduces a new
scope in the City model for state filtering and updates the
view to present a dropdown for state selection. Additionally,
it adds a slug column to the states table to support friendly
URLs, improving the overall user experience.
2025-02-26 09:48:39 +08:00
3ae870047a feat: add sitemap management feature
- Implement index action to list sitemaps
- Create view for displaying sitemaps with details
- Add helper method for generating sitemap URLs
- Enhance error handling for S3 service errors

This commit introduces a new feature for managing sitemaps in the application. It includes an index view that lists all available sitemaps with their last modified date and size, along with a link to view each sitemap. The error handling for S3 interactions has also been improved to log errors and return appropriate responses.
2025-02-24 17:28:21 +08:00
5f98d9ebfd feat: enhance language switcher dropdown
- Update dropdown to support dynamic locales from I18n
- Limit dropdown height with overflow handling for better UX

This change improves the language switcher by dynamically
loading available locales from the I18n configuration. It
also enhances the user experience by limiting the height
of the dropdown and enabling scrolling, making it easier
to navigate through multiple language options.
2025-02-24 15:55:01 +08:00
b2cc7e7016 chore: update keywords for SEO optimization
- Refactor keywords in cities_controller.rb
- Refactor keywords in weather_arts_controller.rb
- Refactor keywords in application.html.erb

This change improves the SEO of the application by updating
keywords to include 'ai' and 'ai web', which are more relevant
and likely to enhance search visibility. The previous keywords
were less optimized for current trends in AI-related searches.
2025-02-24 14:12:51 +08:00
da2f4f6c86 fix: update keywords for better SEO
- Modify keywords in cities_controller.rb to include 'ai weather'
- Update keywords in weather_arts_controller.rb to include 'ai weather'
- Change keywords in application.html.erb to include 'ai weather'

These changes enhance the search engine optimization (SEO) of the
application by ensuring that relevant keywords are included in
meta tags, improving visibility for users searching for AI
weather-related content.
2025-02-24 14:10:32 +08:00
3661d2b008 chore: update meta keywords for SEO
- Modify keywords in CitiesController for better
  categorization of AI art and weather art.
- Update keywords in WeatherArtsController to include
  city country name and description.
- Add keywords in application layout for overall site
  SEO improvement.

These changes aim to improve search engine visibility
and better describe the content related to AI-generated
weather art.
2025-02-24 14:08:25 +08:00
d331a73a85 fix: update html lang attribute for I18n
- Change the lang attribute of the HTML tag to use the current I18n locale
- This change ensures that the application correctly reflects the user's language preferences

Updating this attribute improves accessibility and SEO by helping search engines and assistive technologies better understand the language of the content.
2025-02-22 15:19:40 +08:00
5b996bb64a style: update layout and improve accessibility
Some checks are pending
Docker Dev / docker (push) Waiting to run
- Adjust footer components for better spacing
- Move language switcher to navbar for easier access
- Simplify language switcher links using iteration
- Enhance copyright text to dynamically reflect the current year
2025-02-22 01:03:40 +08:00
bd42833953 feat: add translatable name module for countries and regions
- Introduced `TranslatableName` module to allow for
  localized names for `Country` and `Region` models.
- Updated views to display `localized_name` instead of
  `name` for improved internationalization.
- Refactored JSON serialization for `translations` attribute.
- Enhanced localization support by adding new languages:
  Japanese and Korean, with updated locale files.
- Removed outdated English and Chinese locales for countries
  and regions to clean up the codebase.
2025-02-21 23:46:25 +08:00
f6b9dcf187 feat: add internationalization support
- Implement locale extraction and fallback mechanism
- Add translation files for English and Chinese
- Update views to use translated strings for various UI elements

This commit introduces support for multiple languages in the application, enhancing accessibility for users. It includes a fallback mechanism for locales and updates to the user interface to display translated content.
2025-02-21 17:51:25 +08:00
9fe92b1fc4 feat: add RSS feed functionality
Some checks failed
Docker / docker (push) Has been cancelled
- Introduce RssController to handle RSS feed requests
- Add a new route for the RSS feed
- Implement RSS feed view to display weather art
- Update application layout to include RSS feed link
- Set content type for RSS responses

This commit adds an RSS feed feature that allows users to
subscribe to updates on daily AI-generated weather art.
The feed includes the latest weather art and relevant
metadata, enhancing user engagement and accessibility.
2025-02-19 17:38:49 +08:00
c35f09660a fix: handle nil safely for latest arts image
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Docker / docker (push) Has been cancelled
- Update image tag to safely access the first latest art
- Use safe navigation operator to prevent potential nil errors

This change ensures that if there are no latest arts or if the
image is not attached, the application will not raise an error.
It improves the robustness of the view by handling edge cases.
2025-02-19 14:18:14 +08:00
468a665354 style: update badge classes for weather art display
Some checks are pending
Docker / docker (push) Waiting to run
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
- Change badge class from 'badge-neutral' to 'badge-ghost' for
  better visual consistency.
- This update improves the UI by aligning the badge styles with
  the overall design language of the application.
2025-02-18 17:00:49 +08:00