Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render GOV.UK chat on some browse pages
If the page's `base_path` matches one in a predefined list, we want to render the GOV.UK Chat promo to point users to the new chat service. This adds the markup to the browse and 2nd level browse pages. For the second level it's pretty straightfoward, as we already have a 2/3 width `div` on the left and we just want to put the promo to the right of it, so we can drop it in a 1/3 width `div` immediately after in the markup. For the top level browse page it's a tiny bit more complicated. There's a "Popular tasks" element which spans the full width and has a bottom blue border. We need to embed the promo to the right of this content so that it shares the border. So we just need to wrap everything in a row, and then render the "Popular tasks" content in a full-width `div` if we're not showing the promo, and a 2/3 width `div` if we are showing the promo.
- Loading branch information