[Firefox hub] Make 'values' cards a shared include

RESOLVED WONTFIX

Status

www.mozilla.org
Pages & Content
RESOLVED WONTFIX
7 months ago
29 days ago

People

(Reporter: agibson, Unassigned)

Tracking

Production

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 months ago
Right now, nearly all Firefox hub pages feature three "value" cards that talk about "More privacy", "More freedom" and "More speed" [1].

These three "values" cards feature on nearly all Firefox hub pages, but right now the markup is copy / pasted between each template, which makes updating things like strings messy and prone to error. It would be nice if we moved this to use a shared include for the HTML, so we could update strings in one place and see it replicated on all the pages.

Some templates, such as the /feature pages [2] use a simplified two card variation of the same content. So perhaps we would need to create some form of shared macro that can accept some configurable parameters.

[1] https://www.mozilla.org/en-US/firefox/
[2] https://www.mozilla.org/en-US/firefox/features/fast/
(Reporter)

Updated

7 months ago
Blocks: 1354591
The product pages each have a different "featured" card. E.g. /firefox/desktop/ features "Performance" and /firefox/android/ features "Privacy." With pure CSS grid this would be easy but non-grid browsers get a float-based layout so the source order matters; the featured card has to come first. Not sure how to make that work in a macro :/ Maybe if each card is a separate include and the macro assembles them in the order indicated? And since the featured card has an image and the rest don't we need to be able to indicate which one is featured anyway. Maybe the same mechanism can also place it first in line.
(Reporter)

Comment 2

6 months ago
My initial idea was to make something along the lines of the cards variation on the Internet Health page:

https://github.com/mozilla/bedrock/blob/master/bedrock/mozorg/templates/mozorg/internet-health/index.html#L88-L124

The IH page randomizes the image card, but perhaps we could adapt a version for the FX hub where you can specify which item should be 'featured'.
(Reporter)

Comment 3

29 days ago
The Hub pages lived a short time, so this bug is no longer relevant.
Status: NEW → RESOLVED
Last Resolved: 29 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.