mirror of
https://github.com/neocities/neocities.git
synced 2025-08-06 01:24:56 +02:00
refactor file logic into models to prepare for API, minor touches.
This commit is contained in:
parent
9124ab81be
commit
6a36a9e3ac
9 changed files with 196 additions and 128 deletions
|
@ -20,8 +20,7 @@ javascript:
|
|||
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. The default file is always named <b>index.html</b>.
|
||||
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
|
||||
|
@ -36,14 +35,23 @@ javascript:
|
|||
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
|
||||
|
||||
- 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:10px"
|
||||
| To use in an HTML file, paste this text: <code class="tiny" style="margin:0"><img src="/#{file.filename}"></code>
|
||||
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
|
||||
|
|
|
@ -53,9 +53,7 @@ css:
|
|||
option value="ace/theme/twilight" Twilight
|
||||
option value="ace/theme/vibrant_ink" Vibrant Ink
|
||||
|
||||
div id="editor" style="width: 100%; height: 600px; position: relative; margin-bottom:25px"
|
||||
== encoding_fix @file_data
|
||||
|
||||
<div id="editor" style="width: 100%; height: 600px; position: relative; margin-bottom:25px">#{{encoding_fix(@file_data)}}</div>
|
||||
|
||||
.row
|
||||
.col.col-33.txt-Center style="margin-bottom:10px"
|
||||
|
@ -125,4 +123,5 @@ css:
|
|||
editor.getSession().setUseWrapMode(true);
|
||||
editor.setFontSize(14);
|
||||
editor.setShowPrintMargin(false);
|
||||
});
|
||||
|
||||
});
|
|
@ -1,8 +1,8 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name <%= current_site.domain %> *.<%= current_site.domain %>;
|
||||
server_name <%= domain %> *.<%= domain %>;
|
||||
access_log /var/log/nginx/neocities-domains.log neocitiesdomain;
|
||||
root /home/web/neocities-web/public/sites/<%= current_site.username %>;
|
||||
root /home/web/neocities-web/public/sites/<%= username %>;
|
||||
index /index.html;
|
||||
|
||||
error_page 404 = @notfound;
|
||||
|
|
|
@ -3,7 +3,7 @@ html
|
|||
head
|
||||
meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
|
||||
|
||||
title #{template_site_title @site.username} - Front Page
|
||||
title #{username}
|
||||
|
||||
meta name="description" content=""
|
||||
meta name="keywords" content=""
|
||||
|
|
|
@ -3,7 +3,7 @@ html
|
|||
head
|
||||
meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
|
||||
|
||||
title #{template_site_title @site.username} - Not Found
|
||||
title #{username} - Page Not Found
|
||||
|
||||
link href="//groundfloor.neocities.org/default.css" rel="stylesheet" type="text/css" media="all"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue