USRSE / usrse.github.io

US RSE umbrella web page
https://us-rse.org
28 stars 83 forks source link

Multiple one-liner descriptions #522

Open vsoch opened 2 years ago

vsoch commented 2 years ago

Original issue: https://github.com/vsoch/usrse.github.io/issues/63 posted by @cosden with discussion from @mtbc

image

mtbc commented 2 years ago

Should pick tagline on each load so solution probably must be client-side.

vsoch commented 2 years ago

Yep! And to add detail, I think we should have a data file, e.g., _data/taglines.yaml that has some listing of them, and then they are loaded into a javascript array, and then on page load we randomly select one from the array and populate the header. Given that the browser doesn't have javascript (rare but not impossible) there should be the one that is currently there already set.

mtbc commented 2 years ago

What helpers do we like to use for JavaScript? At a glance I see we seem to have an old Alpine and an older jQuery? Maybe something else. Don't know what we want to add more code depending on.

vsoch commented 2 years ago

JQuery would be good for this - feel free to update to newer! I don't think we need to add anything else, it's literally just parsing the data structure into a script block as an array, random sample, and then targeting a div to change the text.