mirror of
https://github.com/neocities/neocities.git
synced 2025-08-05 01:01:30 +02:00
separate site and account settings context
This commit is contained in:
parent
7e36dc83f8
commit
d0970cdf9e
16 changed files with 515 additions and 443 deletions
60
views/settings/site/custom_domain.erb
Normal file
60
views/settings/site/custom_domain.erb
Normal file
|
@ -0,0 +1,60 @@
|
|||
<h2>Custom Domain</h2>
|
||||
<h3 class="subtitle">Add your own domain name to your Neocities site!</h3>
|
||||
|
||||
<p>
|
||||
Adding a custom domain allows you to have a domain name attached to your web site. So if you had a domain like <strong>catsknitting.com</strong>, you could have it point to your Neocities site!
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You will have to purchase a domain name from a registrar like <a href="https://www.namecheap.com/?aff=53678" target="_blank">Namecheap</a>, and then add an A record to point your domain (catsknitting.com) to the following IP address:
|
||||
</p>
|
||||
|
||||
<p><code>198.27.81.179</code></p>
|
||||
|
||||
<p>
|
||||
If you want to add a <strong>www</strong> subdomain, or use a wildcard that will answer to everything (<strong>*</strong>), you will have to make a CNAME pointing to <strong>catsknitting.com</strong> for <strong>www</strong> and/or <strong>*</strong>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
After that, you can add the domain to the box below (just the <strong>catsknitting.com</strong>, don't add any subdomains), and your domain should come online within 5 minutes:
|
||||
</p>
|
||||
|
||||
<form method="POST" action="/settings/<%= @site.username %>/custom_domain">
|
||||
<%== csrf_token_input_html %>
|
||||
<input name="domain" type="text" placeholder="catsknitting.com" value="<%= @site.domain %>">
|
||||
<br>
|
||||
<input class="btn-Action" type="submit" value="Update Domain">
|
||||
</form>
|
||||
|
||||
<h2>Add SSL Certificate</h2>
|
||||
<p>
|
||||
This allows you to add an SSL key and certificate for your domain, enabling encryption for your site (https). It can take up to 5-30 minutes for the changes to go live, so please be patient. All files must be in PEM format. If your certificate is not bundled with the root and intermediate certificates, ask your certificate provider for help on how to do that.
|
||||
</p>
|
||||
|
||||
<% if @site.domain.nil? || @site.domain.empty? %>
|
||||
<p><strong>Cannot upload SSL certificate until domain is added.</strong></p>
|
||||
<% else %>
|
||||
|
||||
<form method="POST" action="/settings/<%= @site.username %>/ssl" enctype="multipart/form-data">
|
||||
<%== csrf_token_input_html %>
|
||||
|
||||
<p>
|
||||
<strong>
|
||||
Status: <%= @site.ssl_installed? ? 'Installed' : 'Inactive' %>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
SSL Key (yourdomain.com.key):
|
||||
<input name="key" type="file">
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Bundled Certificates (yourdomain.com-bundle.crt):
|
||||
<input name="cert" type="file">
|
||||
</p>
|
||||
|
||||
<input class="btn-Action" type="submit" value="Upload SSL Key and Certificate">
|
||||
|
||||
</form>
|
||||
<% end %>
|
20
views/settings/site/nsfw.erb
Normal file
20
views/settings/site/nsfw.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<h2>18+ Content</h2>
|
||||
|
||||
<p class="tiny">
|
||||
If your site contains objectionable (18+) content, check this box. Your site will not be removed, but it will be listed on a special browse page. We don't have an official policy on what defines 18+ content yet, but basically it's just pornography and lewd/sick/gross images. Thanks for your patience and understanding as we try to find a way to balance out the needs of everyone.
|
||||
</p>
|
||||
|
||||
<form method="POST" action="/settings/<%= @site.username %>/change_nsfw">
|
||||
<%== csrf_token_input_html %>
|
||||
<input name="is_nsfw" type="hidden" value="false">
|
||||
<p>
|
||||
<strong>
|
||||
My page has 18+ content:
|
||||
<input name="is_nsfw" type="checkbox" value="true" style="margin-top: 0px"
|
||||
<% if @site.is_nsfw %>checked<% end %>
|
||||
>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
<input class="btn-Action" type="submit" value="Update">
|
||||
</form>
|
14
views/settings/site/profile.erb
Normal file
14
views/settings/site/profile.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
<h2>Site Profile</h2>
|
||||
<div>
|
||||
<form method="POST" action="/settings/<%= @site.username %>/profile">
|
||||
<%== csrf_token_input_html %>
|
||||
<p>
|
||||
<input name="site[profile_comments_enabled]" type="hidden" value="true">
|
||||
<input name="site[profile_comments_enabled]" type="checkbox" value="false"
|
||||
<% if @site.profile_comments_enabled == false %>checked<% end %>
|
||||
> Turn off profile comments
|
||||
</p>
|
||||
|
||||
<input class="btn-Action" type="submit" value="Update Site Profile Settings">
|
||||
</form>
|
||||
</div>
|
19
views/settings/site/username.erb
Normal file
19
views/settings/site/username.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<h2>Change Site (User) Name</h2>
|
||||
<form method="POST" action="/settings/<%= @site.username %>/change_name">
|
||||
<%== csrf_token_input_html %>
|
||||
<p class="tiny">
|
||||
It cannot contain spaces, and can only use the following characters: a-z A-Z 0-9 _ -
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Current Name:
|
||||
<span style="color: green"><strong><%= @site.username %></strong></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
New name:
|
||||
<input name="name" class="input-Area" type="text" placeholder="newname" style="width: 200px">
|
||||
</p>
|
||||
|
||||
<input class="btn-Action" type="submit" value="Change Name">
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue