The renderStory function takes a Story as input and generates an HTML element based on the type of the story. Depending on whether the story is a Paragraph, Future, Factory, or EmptyStory, it will create different HTML elements to represent the story item. Additionally, it provides informational messages in case of unknown story item types.
renderStory : Story -> Html msg renderStory story = case story of Paragraph paragraph -> case paragraph.type_ of "paragraph" -> Html.p [] [ Html.text paragraph.text ] _ -> Html.text ("⚠️ INFO Paragraph – Unknown story item type: " ++ paragraph.type_) Future future -> case future.type_ of "future" -> Html.div [] [ Html.text ("⚠️ INFO Future – Known story item type: " ++ future.type_) ] _ -> Html.div [] [ Html.text ("⚠️ INFO Future – Unknown story item type: " ++ future.type_) ] Factory factory -> Html.text "⚠️ INFO – Factory" EmptyStory -> Html.text "⚠️ INFO – Empty Story"
Side-by-Side Comparison commit
We see the same Wiki Page JSON displayed on one side (left) by the fedwiki reference implementation and on the other side (right) by the elm-pages prototype. matrix
refactor(renderStory): Move function to Wiki Module. commit
~
Federated wiki collects Context for links based on sites mentioned on the page. This context is consulted when a link is clicked.
The inside of a container supports concurrent transformation of its contents, just like the inside of a theater full of people supports concurrent breathing.
Sometimes we hear "context is everything." It may not be everything but it really helps make sense of situations.
The FedWiki is programmable and selectable to do Computations that involve the content of any open page in your FedWiki. That is an unusual and powerful type of context indeed.
The lineup is the list of wiki pages currently displayed within one tab, in order, with duplication possible.
Lots of explanatory material can be left out of a page, because it can be accessed immediately and adjacently as needed. It is rather like having a open dictionary next to an open book.
DOT strict digraph rankdir=LR node [shape=box style="solid,rounded,filled" fillcolor=lightyellow penwidth=3 color=black] HERE NODE node [style="solid,rounded,filled" fillcolor=white penwidth=1 color=black] edge [style=solid penwidth=1 color=black] BACKLINKS NODE -> HERE node [style="dotted,rounded,filled" penwidth=1 fillcolor=white color=grey] edge [style=dotted penwidth=1 color=grey] HERE BACKLINKS NODE -> HERE