Files
growstuff/app/views/home/index.html.haml
google-labs-jules[bot] 2742dba7fa feat: Add meta descriptions to pages
Adds a meta description tag to the landing, crops, plantings, harvests, seeds, and comments pages.

Also creates a new index page for comments.
2025-12-01 13:54:54 +00:00

82 lines
2.7 KiB
Plaintext

- content_for :title do
= ENV['GROWSTUFF_SITE_NAME']
- content_for :meta_description do
Growstuff is a community of food gardeners. Let's learn to grow food together.
- if member_signed_in?
.row
.col-lg-8.col-md-12
%h1.display-4= t('.welcome', site_name: ENV['GROWSTUFF_SITE_NAME'], member_name: current_member)
%p= render 'stats', cached: true
.col
%br
%p
- if current_member.plantings.active.any?
= link_to member_path(current_member, anchor: "content"), class: 'btn btn-dark' do
= planting_icon
Track my plantings
%p
= link_to member_gardens_path(current_member, anchor: "content"), class: 'btn btn-dark' do
= garden_icon
Show me my garden
- else
.hidden-xs
%section.jumbotron= render 'blurb', cached: true
.row
.col-xl-9.col-12
%section.crops
%h2= t('home.crops.our_crops')
= render 'crops'
= link_to "#{t('home.crops.view_all')} »", crops_path, class: 'btn btn-block'
.col-xl-3.col-12
%section.recent-crops.card
- cache cache_key_for(Crop, 'recent') do
%h2= t('.recently_added')
%p.card-body
!= CropSearchService.recent(30).map { |c| link_to(c['name'], crop_path(slug: c['slug'])) }.join(", ")
.col-xl-4.col
%section.plantings
= cute_icon
=render 'plantings'
%p.text-right= link_to "#{t('home.plantings.view_all')} »", plantings_path, class: 'btn btn-block'
.col-xl-4.col
%section.harvests
= cute_icon
= render 'harvests'
%p.text-right= link_to "#{t('home.harvests.view_all')} »", harvests_path, class: 'btn btn-block'
.col-xl-4.col
%section.activities
= cute_icon
= render 'activities'
%p.text-right= link_to "#{t('home.activities.view_all')} »", activities_path, class: 'btn btn-block'
.col-12.col-md-6
%section.seeds
= cute_icon
= render 'seeds'
%p.text-right
= link_to "#{t('home.seeds.view_all')} »", seeds_path(tradeable_to: ['locally', 'nationally', 'internationally']), class: 'btn btn-block'
.col-12.col-lg-6
%section.discussion.text-center
= cute_icon
= render 'discuss', cached: true
.col-12.col-lg-6
%section.members
= cute_icon
= render 'members', cached: true
.row
.col-12.col-lg-6
%section.pwa-install
= cute_icon
%h2.text-center= t('home.pwa_title')
.index-cards
.card
.card-body
%h3= t('home.pwa_ios_title')
%p= t('home.pwa_ios_steps_html')
.card
.card-body
%h3= t('home.pwa_android_title')
%p= t('home.pwa_android_steps_html')
.col-12.col-lg-6
= render 'releases'