Skip to content

Adding a Spotlight

Manuel Lera Ramirez edited this page Jul 14, 2022 · 6 revisions

The configuration for Spotlights and Explore PomBase items is in the website config file.

To add a new item find the last occurrence of: "panel_type": "spotlight" then copy and edit it to make a new entry. This parser for this file is quite fussy so things like commas and double quotes must be just right.

NOTE: Images have to be added to the website repo first, otherwise the github action will fail.

Here's an example:

    {
      "title": "Hirano et al., 2018",
      "title_link": null,
      "panel_type": "spotlight",
      "head_image": ["spotlight/2019-10-06-29292846-Lem2-nuclear-envelope.png"],
      "content": "Lem2 is retained at the nuclear envelope through its interaction with Bqt4 in fission yeast.  LEM domain directly binds to DNA.\nOriginally published in <a href='https://onlinelibrary.wiley.com/doi/full/10.1111/gtc.12557'>Genes Cells</a>.",
      "reference_id": "PMID:29292846",
      "link_label": "Publication record in PomBase ...",
      "date_added": "2019-10-06",
      "show_on_front_page": true
    },

These fields need to be edited when adding new items: title, head_image, content, reference_id and date_added.

The file for the head_image needs to be added to the src/assets/spotight directory in the website Git repository. That can be done on the command line or can be added using the "Upload files" button here: https://github.com/pombase/website/tree/master/src/assets/spotlight

We have also started adding large versions of the Spotlight images here in Git: https://github.com/pombase/website/tree/master/src/assets/graphical_abstract/

If the file in graphical_abstract has the same name as the file in assets/spotlight, the image on the publication page will become clickable to get the large version inline. Example: https://www.pombase.org/reference/PMID:35320724

The image should be 300x185 pixels, preferably in PNG format.

The large version can be any size and the any format that browsers can cope with. (PNG or JPEG are probably good choices)