mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Initial work on new page editor
This commit is contained in:
parent
52fdd1065a
commit
91817cb98b
2 changed files with 83 additions and 51 deletions
|
@ -1309,4 +1309,58 @@ a.tag:hover {
|
|||
font-size: 10px;
|
||||
vertical-align: .1em;
|
||||
margin-left: .1em;
|
||||
}
|
||||
.interior .header-Outro.editor {
|
||||
padding-top: 0px;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
margin-top: 22px;
|
||||
font-size: 15px;
|
||||
|
||||
a, a:visited {
|
||||
color: white;
|
||||
}
|
||||
.breadcrumbs {
|
||||
float: left;
|
||||
margin: 4px 0;
|
||||
.filename {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.row.content {
|
||||
padding: 15px 20px;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
}
|
||||
.tools {
|
||||
color: #8099A7;
|
||||
float: right;
|
||||
|
||||
.theme {
|
||||
font-size: .9em;
|
||||
display: inline;
|
||||
|
||||
select#theme {
|
||||
vertical-align: baseline;
|
||||
background: #25333c;
|
||||
color: #8099A7;
|
||||
}
|
||||
}
|
||||
#saveButton {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.row.editor {
|
||||
float: left;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
position: absolute;
|
||||
top: 105px;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
.col {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
|
@ -11,21 +11,26 @@
|
|||
position:relative;
|
||||
top:-50px;
|
||||
}
|
||||
.page {
|
||||
background: #161718;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
}
|
||||
.footer-Base {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="header-Outro">
|
||||
<div class="header-Outro editor">
|
||||
<div class="row content">
|
||||
<h1>Editing <%= @filename %></h1>
|
||||
<% if @filename.match /index.html$/ %>
|
||||
<h3 class="subtitle">Note: index.html is the first web page that gets loaded when users visit your site. Make sure there are <a href="http://www.w3schools.com/html/html_links.asp" target="_blank">HTML links</a> to your other pages from this page.</h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col col-50">
|
||||
<p>
|
||||
<div class="breadcrumbs">
|
||||
<a href="/dashboard">Dashboard</a> > <span class="filename"><%= @filename %></span>
|
||||
<% if @filename.match /index.html$/ %>
|
||||
<h3 class="subtitle">Note: index.html is the first web page that gets loaded when users visit your site. Make sure there are <a href="http://www.w3schools.com/html/html_links.asp" target="_blank">HTML links</a> to your other pages from this page.</h3>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div class="theme">
|
||||
Theme:
|
||||
<select id="theme" size="1" onchange="setTheme();" onkeyup="setTheme();">
|
||||
<optgroup label="Bright">
|
||||
|
@ -53,9 +58,9 @@
|
|||
<option value="ace/theme/mono_industrial">Mono Industrial</option>
|
||||
<option value="ace/theme/monokai">Monokai</option>
|
||||
<option value="ace/theme/pastel_on_dark">Pastel on dark</option>
|
||||
<option value="ace/theme/solarized_dark" selected="selected">Solarized Dark</option>
|
||||
<option value="ace/theme/solarized_dark">Solarized Dark</option>
|
||||
<option value="ace/theme/terminal">Terminal</option>
|
||||
<option value="ace/theme/tomorrow_night">Tomorrow Night</option>
|
||||
<option value="ace/theme/tomorrow_night" selected="selected">Tomorrow Night</option>
|
||||
<option value="ace/theme/tomorrow_night_blue">Tomorrow Night Blue</option>
|
||||
<option value="ace/theme/tomorrow_night_bright">Tomorrow Night Bright</option>
|
||||
<option value="ace/theme/tomorrow_night_eighties">Tomorrow Night 80s</option>
|
||||
|
@ -63,44 +68,10 @@
|
|||
<option value="ace/theme/vibrant_ink">Vibrant Ink</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-100">
|
||||
<div id="editor" style="width: 100%; position: relative; margin-bottom:25px"><%==encoding_fix(@file_data) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-25">
|
||||
<div class="txt-Center">
|
||||
<a class="btn-Action" href="/dashboard"><i class="fa fa-remove"></i> Exit Without Saving</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-25">
|
||||
<div class="txt-Center">
|
||||
<a id="saveButton" class="btn-Action" href="#" onclick="saveTextFile(false); return false" style="opacity: 0.5"><i class="fa fa-save"></i> Save Changes</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-25">
|
||||
<div class="txt-Center">
|
||||
<a id="saveAndExitButton" class="btn-Action" href="#" onclick="saveTextFile(true); return false" style="opacity: 0.5"><i class="fa fa-save"></i> Save and Exit</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-25">
|
||||
<div class="txt-Center">
|
||||
<a class="btn-Action" href="//<%= current_site.host %>/<%= @filename %>" target="_blank"><i class="fa fa-eye"></i> View</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-100 txt-Center">
|
||||
<a id="saveButton" class="btn btn-Action" href="#" onclick="saveTextFile(false); return false" style="opacity: 0.5"><i class="fa fa-save"></i>Save</a>
|
||||
<a class="btn btn-Action" href="//<%= current_site.host %>/<%= @filename %>" target="_blank">View</a>
|
||||
<!-- <a id="saveAndExitButton" class="btn-Action" href="#" onclick="saveTextFile(true); return false" style="opacity: 0.5"><i class="fa fa-save"></i> Save and Exit</a> -->
|
||||
<div id="editorUpdates" class="alert alert-success hidden">
|
||||
<span></span>
|
||||
</div>
|
||||
|
@ -108,6 +79,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row editor">
|
||||
<div class="col col-100">
|
||||
<div id="editor" style="width: 100%; position: relative;"><%==encoding_fix(@file_data) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script>
|
||||
|
|
Loading…
Add table
Reference in a new issue