mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
104 lines
5.1 KiB
Text
104 lines
5.1 KiB
Text
javascript:
|
|
function confirmFileDelete(name) {
|
|
$('#deleteFileName').html(name);
|
|
$('#deleteConfirmModal').modal();
|
|
}
|
|
|
|
function fileDelete() {
|
|
$('#deleteFilenameInput').val($('#deleteFileName').html());
|
|
$('#deleteFilenameForm').submit();
|
|
}
|
|
|
|
.content-Base
|
|
.row.content
|
|
.col.col-60
|
|
|
|
h1 Your Website
|
|
|
|
- current_site.file_list.each do |file|
|
|
- if file.ext == 'html' || file.ext == 'htm' || file.ext == 'txt' || file.ext == 'js' || file.ext == 'css' || file.ext == 'md'
|
|
span
|
|
<i class="icon-file-alt icon-3x"></i> <span style="font-size: 20pt">#{file.filename}</span>
|
|
- if file.filename == 'index.html'
|
|
p.tiny This is your index file! It is the "default file" that loads when you go to <a href="http://#{current_site.username}.neocities.org">#{current_site.username}.neocities.org</a>. In effect, it's your front page. If you want to change your front page, you need to edit (or overwrite) this file, which you should do right now if you just created your site. The default file is always named <b>index.html</b>, and you cannot delete it.
|
|
|
|
div style="margin-bottom:30px"
|
|
span
|
|
i class="icon-globe"
|
|
a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View <br />
|
|
span
|
|
i class="icon-edit"
|
|
a href="/site_files/text_editor/#{file.filename}" Edit with text editor <br />
|
|
span
|
|
i class="icon-edit"
|
|
span Edit with visual editor <small style="margin:0; display:inline">(coming soon)</small><br/>
|
|
span
|
|
i class="icon-edit"
|
|
span: a href="/site_files/download/#{file.filename}" Download <br />
|
|
|
|
- if file.filename != 'index.html'
|
|
span
|
|
i class="icon-trash"
|
|
a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete
|
|
- else
|
|
<i class="icon-picture icon-3x"></i> <span style="font-size: 20pt">#{file.filename}</span>
|
|
div style="margin-top: 3px; margin-bottom: 30px"
|
|
| To use in an HTML file, paste this text: <code class="tiny" style="margin:0"><img src="/#{file.filename}"></code>
|
|
span
|
|
i class="icon-globe"
|
|
a href="http://#{current_site.username}.neocities.org/#{file.filename}" target="_blank" View <br />
|
|
span
|
|
i class="icon-edit"
|
|
span: a href="/site_files/download/#{file.filename}" Download <br />
|
|
span
|
|
i class="icon-trash"
|
|
a href="#" onclick="confirmFileDelete('#{file.filename}')" Delete
|
|
|
|
.col.col-40
|
|
|
|
div.txt-Center.dash-SS
|
|
a href="http://#{current_site.username}.neocities.org" style="display:block" target="_blank": img src="/site_screenshots/#{current_site.username}.jpg" alt="screen shot"
|
|
br
|
|
h3 class="base" style="line-height:1": a href="http://#{current_site.username}.neocities.org" target="_blank" http://#{current_site.username}.neocities.org
|
|
p Your page has been accessed <b>#{current_site.hits.to_s.reverse.gsub(/...(?=.)/,'\&,').reverse}</b> times.
|
|
p: small
|
|
|
|
|
(access statistics updated hourly)
|
|
|
|
.progress.progress-info.progress-striped
|
|
.bar style="width: #{(current_site.total_space / Site::MAX_SPACE.to_f) * 100}%"
|
|
|
|
h4.base.txt-Center
|
|
p Using #{((current_site.total_space.to_f / Site::MAX_SPACE) * 100).round(1)}% (#{current_site.total_space_in_megabytes}MB) of your #{(Site::MAX_SPACE.to_f / 2**20).to_i}MB of free space.
|
|
|
|
div.txt-Center
|
|
a href="/site_files/upload" class="btn-Action" style="margin-bottom:10px" Upload New Files
|
|
br
|
|
a href="/site_files/new_page" class="btn-Action" style="margin-bottom:10px" Create New HTML Page
|
|
br
|
|
a href="/site_files/#{current_site.username}.zip" class="btn-Action" Download Entire Site
|
|
|
|
hr
|
|
|
|
div
|
|
<i class="icon-question-sign icon-3x"></i> <span style="font-size: 20pt">Need to learn web design?</span>
|
|
br
|
|
i class="icon-globe"
|
|
a href="/tutorials" target="_blank" Web Design, HTML, CSS, JavaScript Tutorials
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
.modal.hide.fade id="deleteConfirmModal" tabindex="-1" role="dialog" aria-labelledby="deleteConfirmModalLabel" aria-hidden="true"
|
|
.modal-header
|
|
button.close type="button" data-dismiss="modal" aria-hidden="true" x
|
|
h3 id="deleteConfirmModalLabel" Confirm delete of file
|
|
.modal-body
|
|
p You are about to delete the file <span id="deleteFileName"></span>. Are you sure?
|
|
.modal-footer
|
|
button.btn data-dismiss="modal" aria-hidden="true" Cancel
|
|
button.btn.btn-danger onclick="fileDelete()" Delete
|