BuddhaNexus / buddhanexus-frontend-next

BuddhaNexus Frontend 2.0
buddhanexus-frontend-next.vercel.app
2 stars 1 forks source link

Segment numbers show filename #143

Open ayya-vimala opened 1 month ago

ayya-vimala commented 1 month ago

The segment numbers (when this option is on) show the filename as well:

This is a screenshot from buddhanexus.net. The filenames show 3.10 3.11 3.12 etc.

Image

This is a screenshot from the current BN2 site. The filenames show dn4:3.10 dn4:3.11 dn4:3.12 etc.

Image

The filename + : (in this case dn4:) is not necessary to show. We already know it is dn4.

And I don't know if it is needed here but on the old site (buddhanexus.net) when you click on a segment number, it opens that up in a new tab in that position. Sometimes that is easier to be able to save a position while you can scroll on on the original page. So each segment number is also a link. In this case the link would be to: https://buddhanexus2.kc-tbts.uni-hamburg.de/db/pli/dn4/text?selectedSegment=dn4%3A3.10%E2%80%931.1.3&selectedSegmentIndex=0

Is this something that needs to be done at the frontend or backend?

aminahbl commented 1 month ago

We can coerce this on the frontend, but ideally this would be given as an additional prop in the return... maybe something like segmentNumberLabel...?

ayya-vimala commented 1 month ago

I see. But as I cannot make any more changes to the backend I suggest for now you just do something likesegmentnr.split(":")[1]