The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
1.3 KiB

<div if(!state.removed) class=["post", component.kindClass("post-type")]>
<div class="post-meta-row">
<div class="options color-menu">
<a on-click("move", -1, true)>Up</a>
<a on-click("move", +1, true)>Down</a>
<a on-click("open", "edit") >Edit</a>
<a on-click("open", "remove")>Remove</a>
</div>
<post-meta kind="timestamp" value=input.post.time />
<post-meta kind="nick" value=input.post.nick />
</div>
<div if(input.post.kind.startsWith("annotation.")) class="post-body" >
<annotation level=(input.post.kind.substring(11))>
<markdown class="post-content" source=state.text />
</annotation>
</div>
<div if(input.post.kind === "scene") class="post-body color-text">
<markdown class="post-content post-scene" source=state.text />
</div>
<div if(input.post.kind === "action") class="post-body color-text">
<markdown class="post-content post-action" source=(state.shortName + state.nameSuffix + " " + state.text) />
</div>
<div if(input.post.kind === "text") class="post-body color-text">
<markdown class="post-content post-text" source=state.text />
</div>
<remove-post-modal enabled=(state.modal === "remove") post=input.post on-close("close") on-remove("remove") />
<edit-post-modal enabled=(state.modal === "edit") post=input.post on-close("close") on-edited("edited") />
</div>