Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple one-liner descriptions #522

Open
vsoch opened this issue Oct 9, 2021 · 4 comments
Open

Multiple one-liner descriptions #522

vsoch opened this issue Oct 9, 2021 · 4 comments

Comments

@vsoch
Copy link
Member

vsoch commented Oct 9, 2021

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

image

@mtbc
Copy link
Contributor

mtbc commented Feb 10, 2022

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

@vsoch
Copy link
Member Author

vsoch commented Feb 10, 2022

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
Copy link
Contributor

mtbc commented Feb 10, 2022

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
Copy link
Member Author

vsoch commented Feb 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants