usrse.github.io icon indicating copy to clipboard operation
usrse.github.io copied to clipboard

Multiple one-liner descriptions

Open vsoch opened this issue 4 years ago • 4 comments

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

image

vsoch avatar Oct 09 '21 18:10 vsoch

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

mtbc avatar Feb 10 '22 20:02 mtbc

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.

vsoch avatar Feb 10 '22 20:02 vsoch

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.

mtbc avatar Feb 10 '22 20:02 mtbc

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.

vsoch avatar Feb 10 '22 21:02 vsoch