mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
ability to temp disable create
This commit is contained in:
parent
9fa4cc0e13
commit
c31b45575f
2 changed files with 43 additions and 39 deletions
|
@ -80,6 +80,8 @@ get '/?' do
|
||||||
@blog_feed_html = SimpleCache.get :blog_feed_html
|
@blog_feed_html = SimpleCache.get :blog_feed_html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@create_disabled = defined?(BlackBox.create_disabled?) && BlackBox.create_disabled?(request)
|
||||||
|
|
||||||
erb :index, layout: :index_layout
|
erb :index, layout: :index_layout
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -96,54 +96,56 @@
|
||||||
<fieldset class="content">
|
<fieldset class="content">
|
||||||
<h2 class="gamma">Sign up for free</h2>
|
<h2 class="gamma">Sign up for free</h2>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="siteCreateInputs">
|
<% if @create_disabled %>
|
||||||
<label for="create-Input">Username</label>
|
<p>Sign up is not currently available, please try again later.</p>
|
||||||
<input type="text" name="prevent_autofill_username" id="prevent_autofill_username" value="" style="position:absolute; top:-2000px; left:-2000px;" />
|
<% else %>
|
||||||
<input type="password" name="prevent_autofill_password" id="prevent_autofill_password" value="" style="position:absolute; top:-2000px; left:-2000px;" />
|
<div class="siteCreateInputs">
|
||||||
<input type="text" class="input-Area" id="create-Input" name="username" placeholder="my-site-name" data-placement="left" data-trigger="manual" autocapitalize="off" autocorrect="off" autocomplete="off" />
|
<label for="create-Input">Username</label>
|
||||||
<label for="create-Input" id="domain-name">.neocities.org</label>
|
<input type="text" name="prevent_autofill_username" id="prevent_autofill_username" value="" style="position:absolute; top:-2000px; left:-2000px;" />
|
||||||
|
<input type="password" name="prevent_autofill_password" id="prevent_autofill_password" value="" style="position:absolute; top:-2000px; left:-2000px;" />
|
||||||
|
<input type="text" class="input-Area" id="create-Input" name="username" placeholder="my-site-name" data-placement="left" data-trigger="manual" autocapitalize="off" autocorrect="off" autocomplete="off" />
|
||||||
|
<label for="create-Input" id="domain-name">.neocities.org</label>
|
||||||
|
|
||||||
<label for="tags-input">Tags (your interests, site topics)</label>
|
<label for="tags-input">Tags (your interests, site topics)</label>
|
||||||
<input type="text" class="input-Area" id="tags-input" name="new_tags_string" placeholder="art, videogames, food, music, programming, gardening, cats" data-placement="left" data-trigger="manual" autocapitalize="off" autocorrect="off" autocomplete="off" />
|
<input type="text" class="input-Area" id="tags-input" name="new_tags_string" placeholder="art, videogames, food, music, programming, gardening, cats" data-placement="left" data-trigger="manual" autocapitalize="off" autocorrect="off" autocomplete="off" />
|
||||||
|
|
||||||
<div class="col col-50" style="padding-left:0;">
|
<div class="col col-50" style="padding-left:0;">
|
||||||
<label for="password-input">
|
<label for="password-input">
|
||||||
Password
|
Password
|
||||||
</label>
|
</label>
|
||||||
<input type="password" class="input-Area" id="password-input"
|
<input type="password" class="input-Area" id="password-input"
|
||||||
name="password" placeholder="password"
|
name="password" placeholder="password"
|
||||||
data-placement="left" data-trigger="manual"
|
data-placement="left" data-trigger="manual"
|
||||||
autocapitalize="off" autocorrect="off" autocomplete="off" />
|
autocapitalize="off" autocorrect="off" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-50">
|
<div class="col col-50">
|
||||||
<label for="email-input">
|
<label for="email-input">
|
||||||
Email
|
Email
|
||||||
</label>
|
</label>
|
||||||
<input type="email" class="input-Area"
|
<input type="email" class="input-Area"
|
||||||
id="email-input" name="email"
|
id="email-input" name="email"
|
||||||
placeholder="me@example.com" data-placement="left"
|
placeholder="me@example.com" data-placement="left"
|
||||||
data-trigger="manual" autocapitalize="off"
|
data-trigger="manual" autocapitalize="off"
|
||||||
autocorrect="off" autocomplete="off" />
|
autocorrect="off" autocomplete="off" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-50" style="padding-left:0">
|
<div class="col col-50" style="padding-left:0">
|
||||||
<label>
|
<label>
|
||||||
Confirm you are human
|
Confirm you are human
|
||||||
</label>
|
</label>
|
||||||
<%== hcaptcha_input %>
|
<%== hcaptcha_input %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col col-50">
|
<div class="col col-50">
|
||||||
<div style="margin-top: 15px">
|
<div style="margin-top: 15px">
|
||||||
<input type="submit" value="Create My Site" class="btn-Action float-Right" />
|
<input type="submit" value="Create My Site" class="btn-Action float-Right" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<% end %>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</div> <!-- end .col-50 -->
|
</div> <!-- end .col-50 -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue