v2.ocaml.org icon indicating copy to clipboard operation
v2.ocaml.org copied to clipboard

On Planet: Link to Blog itself

Open guptadiksha307 opened this issue 3 years ago • 1 comments

Issue Description

Fixes #1529

Changes Made

On the right of the planet page (Home -> Community -> OCaml Planet) there is a list of blogs. Clicking on one of them opens the rss rather than the blog itself. I have added a link to the blog itself so that if one of the blogs is clicked, then the main page of the blog opens up.

image

Please check if the PR fulfills these requirements

  • [x] PR is descriptively titled and links the original issue above
  • [x] Before/after screenshots (if this is a layout change)
  • [ ] Details of which platforms the change was tested on (if this is a browser-specific change)
  • [ ] Context for what motivated the change (if this is a change to some content)

guptadiksha307 avatar Apr 25 '21 09:04 guptadiksha307

Talking about the code structure, firstly I built a function get_blog_feeds that gave me list of tuples like [("name1","url1"); ("name2","url2");(..)] then I sorted this list according to name and then I changed this list as [("href","url1"); ("href","url2");(..)] then I iterated over this list to get first element [("href","url1")] and added this list as an attribute to a element

guptadiksha307 avatar Apr 25 '21 13:04 guptadiksha307