add user signatures
This commit is contained in:
@ -4,5 +4,5 @@
|
||||
<button type=button id="post-editor-strike" title="Insert Strikethrough">S</button>
|
||||
<button type=button id="post-editor-code" title="Insert Code block">Code</button>
|
||||
</span>
|
||||
<textarea class="babycode-editor" name="<%= ta_name %>" id="post_content" placeholder="Post body" required><%- prefill or "" %></textarea>
|
||||
<textarea class="babycode-editor" name="<%= ta_name %>" id="<%= ta_id or "post_content" %>" placeholder="<%= ta_placeholder or "Post body"%>" <%= not optional and "required" or "" %>><%- prefill or "" %></textarea>
|
||||
<script src="/static/js/post-editor.js"></script>
|
||||
|
@ -58,7 +58,15 @@
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<% if not edit then %>
|
||||
<div class="post-inner">
|
||||
<%- post.content %>
|
||||
</div>
|
||||
<% if render_sig and #post.signature_rendered > 0 then %>
|
||||
<div class="signature-container">
|
||||
<hr>
|
||||
<%- post.signature_rendered %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% render("views.common.babycode-editor", {
|
||||
cancel_url = post_url,
|
||||
|
@ -8,7 +8,7 @@
|
||||
<span>Posted in <a href="<%= url_for("topic", {slug = topic.slug}) %>"><%= topic.name %></a></span>
|
||||
</nav>
|
||||
<% for i, post in ipairs(posts) do %>
|
||||
<% render("views.threads.post", {post = post, is_latest = i == #posts}) %>
|
||||
<% render("views.threads.post", {post = post, render_sig = true, is_latest = i == #posts}) %>
|
||||
<% end %>
|
||||
</main>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<img src="<%= avatar_url(me) %>">
|
||||
<input id="file" type="file" name="avatar" accept="image/*" required>
|
||||
<div>
|
||||
<input type="submit" value="Update avatar" <%= disable_avatar and "disabled=disabled" %>>
|
||||
<input type="submit" value="Upload avatar" <%= disable_avatar and "disabled=disabled" %>>
|
||||
<% if not me:is_default_avatar() then %>
|
||||
<input type="submit" value="Clear avatar" formaction="<%= url_for("user_clear_avatar", {username = me.username}) %>" formnovalidate>
|
||||
<% end %>
|
||||
@ -16,8 +16,10 @@
|
||||
</form>
|
||||
<form method="post" action="">
|
||||
<label for="status">Status</label>
|
||||
<input type="text" id="status" name="status" value="<%= me.status %>" maxlength="30">
|
||||
<input type="submit" value="Save status">
|
||||
<input type="text" id="status" name="status" value="<%= me.status %>" maxlength="70" placeholder="Will be shown under your username. Max 70 characters">
|
||||
<label for="signature">Signature</label><br>
|
||||
<% render("views.common.babycode-editor-component", {ta_name = "signature", ta_id = "signature", prefill = me.signature_original_markup, ta_placeholder = "Will be shown under each of your posts", optional = true}) %>
|
||||
<input type="submit" value="Save settings">
|
||||
</form>
|
||||
<div>
|
||||
<a class="linkbutton critical" href="<%= url_for("user_delete_confirm", {username = me.username}) %>">Delete account</a>
|
||||
|
Reference in New Issue
Block a user