comments and captcha stuff

This commit is contained in:
biglyderv 2024-11-25 14:12:44 -05:00
parent e2ef83ec0c
commit 42aaebbd69
8 changed files with 25 additions and 28 deletions

View file

@ -1,6 +1,7 @@
<%- include('form_bare.ejs', { data: [ { label: "" , type: "text" , name: "targetId" , hidden: id }, { label: "" ,
type: "text" , name: "targetType" , hidden: route }, { label: "Your thoughts..." , type: "textarea" ,
name: "content" , hidden: route }, ], 'route' : '/api/form/comment' , 'title' : 'Comments' , }) -%>
name: "content" , hidden: route }, ], 'route' : '/api/form/comment' , 'title' : 'Comments' , noCaptcha: true })
-%>
<div class="content">
<% for (let comment of comments) { %>

View file

@ -1,3 +1,3 @@
<%- include('header.ejs') -%>
<%- include('form_bare.ejs') -%>
<%- include('form_bare.ejs', {noCaptcha: false}) -%>
<%- include('footer.ejs') -%>

View file

@ -3,20 +3,22 @@
<%= title %>
</h1>
<div class='form-message'></div>
<span class='form-key'>
<img src='/client/captcha'>
</span>
<input class='form-input' type='text' name='challenger' value='Type the captcha'>
<% for (let elem of data) { %>
<% if (!noCaptcha) { %>
<span class='form-key'>
<%= elem.label %>
<img class='captcha' src='/client/captcha'>
</span>
<% if (elem.type=='textarea' ) { %>
<textarea class='form-input' name='<%= elem.name %>'></textarea>
<% } else { %>
<input class='form-input' type='<%= elem.type %>' name='<%= elem.name %>' value='<%= elem.hidden %>'
<%=elem.hidden ? 'hidden ' : '' %>>
<% } %>
<% } %>
<input class='form-button' type='Submit' name='Submit'>
<input class='form-input' type='text' name='challenger' value='Type the captcha'>
<% } %>
<% for (let elem of data) { %>
<span class='form-key'>
<%= elem.label %>
</span>
<% if (elem.type=='textarea' ) { %>
<textarea class='form-input' name='<%= elem.name %>'></textarea>
<% } else { %>
<input class='form-input' type='<%= elem.type %>' name='<%= elem.name %>'
value='<%= elem.hidden %>' <%=elem.hidden ? 'hidden ' : '' %>>
<% } %>
<% } %>
<input class='form-button' type='Submit' name='Submit'>
</form>

View file

@ -2,8 +2,7 @@
<div class='banner'><img class='banner-background' src='/static/img/bg.svg'>
<div class='banner-content'>
<h1>BiglyChat</h1>
<p>BiglyChat is a niche community for broadcasting videos to your fanbase, with integrated games and active
developers.</p>
<p>BiglyChat is a niche community for broadcasting videos to your fanbase.</p>
<h2>Community</h2>
<%if (username=='!nobody' ) { %>
<a class='form-button' href="/client/register">Join the Community</a>