Sito marketing, SEO, legal, live programmata e branding Match Live Tv.
Logo e favicon nel header, partite programmate su web e mobile, reset password, pagine FAQ/sitemap, privacy/termini GDPR e icona Android «Match Live Tv». Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
5
backend/app/helpers/legal_helper.rb
Normal file
5
backend/app/helpers/legal_helper.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
module LegalHelper
|
||||
def legal_last_updated
|
||||
"26 maggio 2026"
|
||||
end
|
||||
end
|
||||
@@ -15,6 +15,24 @@ module Public
|
||||
partials.map { |p| format_set_partial_entry(p) }.join(" · ")
|
||||
end
|
||||
|
||||
def live_scheduled_label(datetime)
|
||||
return nil unless datetime
|
||||
|
||||
datetime.in_time_zone.strftime("%d/%m/%Y alle %H:%M")
|
||||
end
|
||||
|
||||
def live_scheduled_relative(datetime)
|
||||
return nil unless datetime
|
||||
|
||||
if datetime.to_date == Time.zone.today
|
||||
"Oggi alle #{datetime.strftime('%H:%M')}"
|
||||
elsif datetime.to_date == Time.zone.tomorrow
|
||||
"Domani alle #{datetime.strftime('%H:%M')}"
|
||||
else
|
||||
live_scheduled_label(datetime)
|
||||
end
|
||||
end
|
||||
|
||||
def live_score_points_label(match, score_state)
|
||||
return "—" unless score_state
|
||||
|
||||
|
||||
33
backend/app/helpers/seo_helper.rb
Normal file
33
backend/app/helpers/seo_helper.rb
Normal file
@@ -0,0 +1,33 @@
|
||||
module SeoHelper
|
||||
DEFAULT_OG_IMAGE_PATH = "/og-share.png"
|
||||
|
||||
def seo_site_url
|
||||
MatchLiveTv.app_public_url.chomp("/")
|
||||
end
|
||||
|
||||
def seo_absolute_url(path)
|
||||
path = "/#{path}" unless path.start_with?("/")
|
||||
"#{seo_site_url}#{path}"
|
||||
end
|
||||
|
||||
def seo_canonical_url
|
||||
if content_for?(:canonical_url)
|
||||
content_for(:canonical_url)
|
||||
else
|
||||
request.original_url.split("?").first
|
||||
end
|
||||
end
|
||||
|
||||
def seo_og_image_url
|
||||
if content_for?(:og_image)
|
||||
img = content_for(:og_image)
|
||||
img.start_with?("http") ? img : seo_absolute_url(img)
|
||||
else
|
||||
seo_absolute_url(DEFAULT_OG_IMAGE_PATH)
|
||||
end
|
||||
end
|
||||
|
||||
def seo_robots_content
|
||||
content_for?(:robots) ? content_for(:robots) : "index, follow"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user