update editor nav
parent
5a609a2c0d
commit
64ae8d74c2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -131,6 +131,10 @@ body > footer p {
|
||||||
font-size: .9em
|
font-size: .9em
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body > footer a {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* NOFICATIONS */
|
/* NOFICATIONS */
|
||||||
|
|
||||||
|
@ -375,6 +379,11 @@ fieldset input {
|
||||||
line-height: 3em;
|
line-height: 3em;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor .content nav a.active {
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#editor-preview {
|
#editor-preview {
|
||||||
|
|
|
@ -32,6 +32,8 @@ $(document).on('page:editor', function() {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
preview.hide();
|
preview.hide();
|
||||||
editor.fadeIn();
|
editor.fadeIn();
|
||||||
|
$(this).addClass('active');
|
||||||
|
$("#see-preview").removeClass('active');
|
||||||
$("#see-preview").data("previewing", "false");
|
$("#see-preview").data("previewing", "false");
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -44,6 +46,8 @@ $(document).on('page:editor', function() {
|
||||||
if ($(this).data("previewing") == "true") {
|
if ($(this).data("previewing") == "true") {
|
||||||
preview.hide();
|
preview.hide();
|
||||||
editor.fadeIn();
|
editor.fadeIn();
|
||||||
|
$(this).removeClass('active');
|
||||||
|
$("#see-source").addClass('active');
|
||||||
$(this).data("previewing", "false");
|
$(this).data("previewing", "false");
|
||||||
} else {
|
} else {
|
||||||
// If it's in editing mode, convert the markdown to html
|
// If it's in editing mode, convert the markdown to html
|
||||||
|
@ -55,6 +59,8 @@ $(document).on('page:editor', function() {
|
||||||
// Hide the editor and show the preview
|
// Hide the editor and show the preview
|
||||||
editor.hide();
|
editor.hide();
|
||||||
preview.html(html).fadeIn();
|
preview.html(html).fadeIn();
|
||||||
|
$(this).addClass('active');
|
||||||
|
$("#see-source").removeClass('active');
|
||||||
$(this).data("previewing", "true");
|
$(this).data("previewing", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{ if eq .Mode "markdown" }}
|
{{ if eq .Mode "markdown" }}
|
||||||
<nav>
|
<nav>
|
||||||
<a id="see-source"><i class="fa fa-code"></i> Source</a>
|
<a id="see-source" class="active"><i class="fa fa-code"></i> Source</a>
|
||||||
<a id="see-preview"><i class="fa fa-eye"></i> Preview</a>
|
<a id="see-preview"><i class="fa fa-eye"></i> Preview</a>
|
||||||
</nav>
|
</nav>
|
||||||
{{ end}}
|
{{ end}}
|
||||||
|
|
Loading…
Reference in New Issue