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.
 
 
 
 

35 lines
1.7 KiB

<div if(!state.removed) class=["post", component.kindClass("pk-"), state.multipart ? "multipart" : null]>
<div class="post-meta-row">
<div class="options color-menu">
<if-permitted user=input.user permission="post.move">
<a on-click("move", -1, true)>Up</a>
<a on-click("move", +1, true)>Down</a>
</if-permitted>
<if-permitted user=input.user permission="post.edit">
<a on-click("open", "edit") >Edit</a>
</if-permitted>
<if-permitted user=input.user permission="post.remove">
<a on-click("open", "remove")>Remove</a>
</if-permitted>
</div>
<post-meta kind="timestamp" value=input.post.time />
<post-meta kind="nick" class=("pk-"+input.post.kind) 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">
$ const prefix = (!state.multipart ? state.shortName + state.nameSuffix + " " : "");
<markdown class="post-content post-action" source=(prefix + 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>