Commit Graph

8 Commits

Author SHA1 Message Date
Javi Martín
1d955b7a20 Simplify using helper methods in components
The `use_helpers` method was added in ViewComponent 3.8.0, and it's
included by default in all components since version 3.11.0.

Note we sometimes delegated the `can?` method to the controller instead
of the helpers, for no particularly reason. We're unifying that code as
well.
2024-03-02 17:34:25 +01:00
Javi Martín
56d834783c Open links to social networks in the same window
As mentioned in earlier commits, opening external links in a new
tab/window results in usability and accessibility issues.

Since these links are usually at the top or bottom of the page and
contain icons of well-known sites, IMHO there's no need to even notify
people that these are external links.

Since we're no longer using the `shared.target_blank` translation inside
a sentence, we can remove the space and parenthesis in the translations.
2023-10-24 16:41:03 +02:00
taitus
291b478050 Fix typo for "instagram"
This typo was accidentally introduced in commit 3b00f3c141.
2022-01-28 14:30:34 +01:00
Javi Martín
bf10cf0c18 Simplify calls to content_block helper
All calls were using `I18n.locale` as the second parameter, so we might
as well make it optional.
2021-06-24 13:15:04 +02:00
Javi Martín
da76c848fc Avoid rendering an empty list in footer
We've had an accessibility error reported by the Spanish "Portal
Administración electrónica" (PAe). While I can't find any accessibility
rule saying empty lists should be avoided, it looks like some screen
readers report finding lists with 0 items, which is annoying.

We could also do it with CSS using `ul:empty { display: none}`. However,
at the time of writing no browser supports this rule when the tag
contains whitespace.
2021-06-24 13:15:03 +02:00
Javi Martín
211ed101b9 Simplify code in social component 2021-06-24 12:43:44 +02:00
Javi Martín
3b00f3c141 Remove duplication in social icons in footer 2021-06-24 12:43:44 +02:00
Javi Martín
0aba34ad4d Extract social links to a component 2021-06-24 12:43:43 +02:00