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

Display fortune cookie messages #22

Open
goodmami opened this issue Aug 13, 2021 · 6 comments
Open

Display fortune cookie messages #22

goodmami opened this issue Aug 13, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@goodmami
Copy link
Member

There was a request to re-add fortune cookie messages, at least to the front page. There are two issues with the way things are currently set up:

  1. The FortuneCookies are in a wiki, so we'd need a GitHub action triggered by wiki (gollum) events that captures edits to that page and extracts the fortunes out.
  2. The main page is rendered from index.md, and the rendering system strips out unsafe HTML like <script> and <link> tags, which makes it difficult to add javascript code to display the fortune.

I propose the following:

  1. Move the content of the FortuneCookies wiki to a .js file, e.g.:
    var fortunes = [
      'Recursive, adj: See "recursive"',
      ...
    ];
  2. Change index.md to index.html to avoid rendering with Gollum
  3. Add code to index.html that loads the fortunes.js (or whatever it's called) and displays a random one
@goodmami goodmami added the enhancement New feature or request label Aug 13, 2021
@arademaker
Copy link
Member

There was a request to re-add fortune cookie messages, at least to the front page.

How was that? Where? The request was made where by whom?

@goodmami
Copy link
Member Author

@arademaker I don't recall where, perhaps during the infrastructure session or the social afterward. It was actually a self-request, but I think Emily agreed.

@fcbond
Copy link
Member

fcbond commented Aug 14, 2021 via email

@olzama
Copy link
Contributor

olzama commented Aug 14, 2021

I'm sorry, what are fortune cookies? :) In our context, that is (I know of the restaurant context...)

@goodmami
Copy link
Member Author

https://github.com/delph-in/docs/wiki/FortuneCookies

In the old wiki, a random one would be displayed when you view a page. We used to add a few new ones roughly every summit.

@glenn-slayden
Copy link
Contributor

@fcbond: I agree that having the fortune cookies is a fun touch that shows people the spirit of DELPH-IN...

We are so fun... and maybe eclectic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants