neocities/views/settings/sites.erb

42 lines
No EOL
1.1 KiB
Text

<h2>Your Sites</h2>
<% if current_site.children_dataset.count == 0 %>
<h6>No other sites are currently linked to this account.</h6>
<% else %>
<table class="table">
<tr>
<td>
<a href="//<%= current_site.host %>"><strong><%= current_site.title %></strong></a> (primary)
</td>
<td>
Manage this site
</td>
</tr>
<% current_site.children.each do |site| %>
<tr>
<td>
<a href="//<%= site.host %>" target="_blank"><%= site.title %></a>
</td>
<td>
<a href="#">Manage this site</a>
</td>
</tr>
<% end %>
</table>
<% end %>
<h3>Create New Site</h3>
<p>You can now create new sites that are linked to this account! Sites will share the free space you have available. You have <strong><%= Site::CHILD_SITES_MAX - current_site.children_dataset.count %></strong> new sites remaining.</p>
<form action="/site/create_child" method="POST">
<%== csrf_token_input_html %>
<p>Site Name:</p>
<input name="username" type="text">
<div>
<input class="btn-Action" type="submit" value="Create New Site">
</div>
</form>