Display fortune cookie messages
goodmami opened this issue · comments
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:
- 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. - 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:
- Move the content of the FortuneCookies wiki to a
.js
file, e.g.:var fortunes = [ 'Recursive, adj: See "recursive"', ... ];
- Change
index.md
toindex.html
to avoid rendering with Gollum - Add code to
index.html
that loads thefortunes.js
(or whatever it's called) and displays a random one
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?
@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.
I'm sorry, what are fortune cookies? :) In our context, that is (I know of the restaurant context...)
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.
@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?