mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
126 lines
No EOL
5.3 KiB
Text
126 lines
No EOL
5.3 KiB
Text
<script type="text/javascript">
|
|
function confirmFileDelete(name) {
|
|
$('#deleteFileName').html(name);
|
|
$('#deleteConfirmModal').modal();
|
|
}
|
|
|
|
function fileDelete() {
|
|
$('#deleteFilenameInput').val($('#deleteFileName').html());
|
|
$('#deleteFilenameForm').submit();
|
|
}
|
|
</script>
|
|
|
|
<div class="header-Outro">
|
|
<div class="row content wide" style="padding-top: 10px">
|
|
|
|
<div class="col col-50 signup-Area" style="width: 289px;">
|
|
<div class="signup-Form">
|
|
<fieldset class="content">
|
|
<img class="screenshot" src="/site_screenshots/<%= current_site.username %>.jpg">
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col col-50">
|
|
<h2 class="eps">My Website</h2>
|
|
<p style="font-size:19px; margin-top: -11px; margin-bottom: 8px;"><a href="http://<%= current_site.username %>.neocities.org" target="_blank">http://<%= current_site.username %>.neocities.org</a></p>
|
|
<ul>
|
|
<% if current_site.updated_at %>
|
|
<li>Last updated <%= current_site.updated_at %></li>
|
|
<% end %>
|
|
<li>Using <strong><%= current_site.space_percentage_used %>% of your <%= current_site.maximum_space_in_megabytes %> MB</strong>. <% if !current_site.supporter? %>Need more space? <a href="/plan">Become a Supporter!</a><% end %></li>
|
|
<li><strong><%= current_site.hits.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse %></strong> visitors</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div> <!-- end .row -->
|
|
</div> <!-- end .header-Outro -->
|
|
|
|
<main class="content-Base">
|
|
|
|
<div class="content wide">
|
|
|
|
<div class="welcome">
|
|
<div class="close-button"></div>
|
|
<h4>Hello! Welcome to your new site.</h4>
|
|
To get started, click on the <strong>index.html</strong> file below to edit it. It's your home page! You can add more files (such as images) from your computer by dragging them into the box below. Need help building web sites? Check out these <a href="/tutorials">tutorials</a>!
|
|
</div>
|
|
|
|
<div class="files">
|
|
<div class="header">
|
|
<div class="breadcrumbs">My Files</div> <!-- Should be Home when Folders are implemented -->
|
|
<div class="actions">
|
|
<a href="/site_files/new_page" class="btn-Action new-Page"><span>New Page</span></a>
|
|
<!--<a href="" class="btn-Action new-Folder"><span>New Folder</span></a>-->
|
|
<a href="/site_files/upload" class="btn-Action upload"><span>Upload</span></a>
|
|
</div>
|
|
</div>
|
|
<div class="list">
|
|
<div class="upload-Boundary with-instruction"> <!--should remove instruction after at least one new file have been uploaded-->
|
|
|
|
<% current_site.file_list.each do |file| %>
|
|
<div class="file filehover">
|
|
<% if file.ext.match(/html|htm/) %>
|
|
<div class="html-thumbnail html fileimagehover">
|
|
<img src="https://neocities.org//site_screenshots/bigpig.jpg">
|
|
<div class="overlay"></div>
|
|
</div>
|
|
<% elsif file.ext.match(/jpg|png|bmp|gif/) %>
|
|
<div class="html-thumbnail image fileimagehover">
|
|
<img src="https://neocities.org/assets/img/cat-larger.png" style="">
|
|
<div class="overlay"></div>
|
|
</div>
|
|
<% else %>
|
|
<div class="html-thumbnail misc fileimagehover">
|
|
<div class="misc-icon"><%= file.ext %></div>
|
|
<div class="overlay"></div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<a class="title">
|
|
<% if file.filename.length > 15 %>
|
|
<%= file.filename.slice(0..15) %>…
|
|
<% else %>
|
|
<%= file.filename %>
|
|
<% end %>
|
|
</a>
|
|
<div class="overlay">
|
|
<% if file.ext.match(/html|htm|txt|js|css|md/) %>
|
|
<a href="/site_files/text_editor/<%= file.filename %>"><i class="icon-edit" style="margin-right: 10px" title="Edit"> Edit</i></a>
|
|
<% end %>
|
|
<% if file.filename != 'index.html' %>
|
|
<a href="#" onclick="confirmFileDelete('<%= file.filename %>')"><i class="icon-trash" style="margin-right: 10px" title="Delete"> Delete</i></a>
|
|
<% end %>
|
|
<a class="link-overlay" href="http://<%= current_site.username %>.neocities.org/<%= file.filename %>" title="View <%= file.filename %>" target="_blank"></a>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form method="POST" action="/site_files/delete" id="deleteFilenameForm">
|
|
<input name="csrf_token" type="hidden" value="<%= csrf_token %>">
|
|
<input type="hidden" id="deleteFilenameInput" name="filename">
|
|
</form>
|
|
|
|
<div class="modal hide fade" id="deleteConfirmModal" tabindex="-1" role="dialog" aria-labelledby="deleteConfirmModalLabel" aria-hidden="true">
|
|
<div class="modal-header">
|
|
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">x</button>
|
|
<h3 id="deleteConfirmModalLabel">Confirm deletion</h3>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>You are about to delete the file <span id="deleteFileName"></span>. Are you sure?</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
|
<button class="btn btn-danger" onclick="fileDelete()">Delete</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="site-actions">
|
|
<a href="/site_files/<%= current_site.username %>.zip">Allowed file types</a> | <a href="/site_files/<%= current_site.username %>.zip">Download entire site</a>
|
|
</div>
|
|
|
|
</div>
|
|
</main> |