mozilla / learning.mozilla.org

This repo is for tracking initiatives of the Mozilla Learning Networks team.
https://learning.mozilla.org
Mozilla Public License 2.0
60 stars 91 forks source link

Allow for multiple links on the Gigabit portfolio detail pages #2510

Closed hannahkane closed 7 years ago

hannahkane commented 7 years ago

In a given Gigabit Portfolio item detail page (see an example), there is a button at the bottom, labeled "website" that takes the user to an external site.

Some projects have up to three links to point to, so we need to allow for that in the UI.

Looking for a relatively quick solution that accommodates 0, 1, 2, or 3 links. Ideally, we'd be able to control the label on the button, but that's not a requirement.

hannahkane commented 7 years ago

cc @jenntbeard

gvn commented 7 years ago

You can now add as many links (with labels) as you want by editing portfolio.json.

All Links properties can either be null or an array of link objects, following this schema:

    "Links": [
      {
        "url": "http://www.mozilla.org/",
        "label": null
      },
      {
        "url": "http://www.example.org/",
        "label": "label goes here"
      }
    ],

If a label is null it will show up as "Website".