caprenter / bcb-website

A place to track issues about the bcb website
GNU General Public License v3.0
0 stars 1 forks source link

Programme pages refinement #130

Open caprenter opened 4 years ago

caprenter commented 4 years ago

For some shows e.g. BCB Xtra, Bradford Spice, where content/presenters may be different each day, it would be nice to find a way to show that on the listen next, past shows info.

In practice this means take something from the google calendar description

caprenter commented 4 years ago

Started this in 42d5b92d16c089fa713dcbfd6cc9bea38ae9bfcc

Kind of works for BCB Xtra. The output might need themeing. It's a bit tricky becuase it depends on what goes in the google calendar - we might want to pick a format/rules for how it's entered at google. It's trimmed to 140 chars at the moment, but we could alter that. Also the presenter is not turned into a link...

@notshi if you want to, you might have thoughts on this approach and want to see how to theme: https://www.bcbradio.co.uk/programmes/bcb-xtra/

notshi commented 4 years ago

Have started a bit on this, think it'll take a few iterations to get 'right'. Twitter limit is now 280 char so we can put plenty of stuff in there. I'm guessing the google calendar description will be taken from the google form. And looks like the the presenter link is working for https://www.bcbradio.co.uk/programmes/asian-beats/ at least.

Could we make it so that the description and "Presented by:" have their own containers @caprenter? This is so that I can give them different stylings; ie.

Screenshot-20200430035138-299x184

At the moment, it's just a one liner so I've hacked it by using nl2br and hiding the second <br/> so it's not such a jarring space. Having it as a one liner made it hard to read.

caprenter commented 4 years ago

Great - yeah, it all relies on parsing the google calendar text, so that relies abit on how people put text in.

[We look for the exact string 'Presented by:' in order to make links for presenters for example - so figuring out how to mark up the text and parse it might need some thought, Or it might just be 'use everything before 'presented by..']

Will have a play

notshi commented 4 years ago

Ok so it doesn't work when the body text is also the header.

Is there any way to separate the title of the show from the body content?

Screenshot-20200811025534-617x579