forked from OpenNeo/impress
Bold the Terms of Use link when it's been changed recently
This commit is contained in:
parent
0316544e32
commit
9156fa7162
4 changed files with 19 additions and 2 deletions
|
@ -123,6 +123,9 @@ ul.buttons
|
||||||
margin: 0 .5em
|
margin: 0 .5em
|
||||||
#locale-form
|
#locale-form
|
||||||
float: right
|
float: right
|
||||||
|
.terms
|
||||||
|
&[data-updated-recently]
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
=flash
|
=flash
|
||||||
margin-bottom: 1em
|
margin-bottom: 1em
|
||||||
|
|
|
@ -200,6 +200,18 @@ module ApplicationHelper
|
||||||
def md(text)
|
def md(text)
|
||||||
RDiscount.new(text).to_html.html_safe
|
RDiscount.new(text).to_html.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def terms_updated_at
|
||||||
|
Date.new(2024, 2, 29)
|
||||||
|
end
|
||||||
|
|
||||||
|
def terms_updated_timestamp
|
||||||
|
terms_updated_at.strftime("%b %Y")
|
||||||
|
end
|
||||||
|
|
||||||
|
def terms_updated_recently
|
||||||
|
terms_updated_at >= 2.months.ago
|
||||||
|
end
|
||||||
|
|
||||||
def translate_markdown(key, options={})
|
def translate_markdown(key, options={})
|
||||||
md translate("#{key}_markdown", **options)
|
md translate("#{key}_markdown", **options)
|
||||||
|
|
|
@ -61,7 +61,9 @@
|
||||||
|
|
||||||
%ul
|
%ul
|
||||||
%li= link_to t('.footer.source_code'), 'https://github.com/openneo/impress'
|
%li= link_to t('.footer.source_code'), 'https://github.com/openneo/impress'
|
||||||
%li= link_to t('.footer.terms'), terms_path
|
%li.terms{"data-updated-recently": terms_updated_recently }
|
||||||
|
= link_to t('.footer.terms', date: terms_updated_timestamp),
|
||||||
|
terms_path
|
||||||
|
|
||||||
%div
|
%div
|
||||||
#{t('.footer.contact')}:
|
#{t('.footer.contact')}:
|
||||||
|
|
|
@ -33,7 +33,7 @@ en:
|
||||||
footer:
|
footer:
|
||||||
blog: Blog
|
blog: Blog
|
||||||
source_code: Source Code
|
source_code: Source Code
|
||||||
terms: Terms of Use (updated Feb 2024)
|
terms: Terms of Use (updated %{date})
|
||||||
contact: Contact
|
contact: Contact
|
||||||
suggestions: Suggestions
|
suggestions: Suggestions
|
||||||
email: Questions, comments, bugs
|
email: Questions, comments, bugs
|
||||||
|
|
Loading…
Reference in a new issue