interface tweaks

pull/20/head
Henrique Dias 2015-09-15 14:00:14 +01:00
parent 85aea63307
commit f931bb3ed0
5 changed files with 100 additions and 110 deletions

View File

@ -12,7 +12,7 @@ header {
height: 3em;
width: 100%;
background-color: #263238;
padding: 0 2em;
padding: 0 1em;
box-sizing: border-box;
z-index: 999;
color: #eee;
@ -60,50 +60,12 @@ header nav ul li a:hover {
}
main {
position: fixed;
top: 3em;
left: 0;
position: fixed;
width: 100%;
height: 100%;
overflow: inherit;
}
.container {
box-sizing: border-box;
top: 3em;
height: auto;
max-height: 100%;
bottom: 0;
}
.container.left {
position: fixed;
left: 0;
width: 25%;
background-color: #37474F;
height: calc(100% - 3em);
overflow: auto;
color: #eee;
padding: 1.5em 1.5em;
}
.container.main {
position: fixed;
right: 0;
width: 75%;
overflow: auto;
padding: 0;
margin-bottom: 3em;
}
.container *:first-child {
margin-top: 0;
}
.container.main textarea {
height: 100%;
width: 100%;
padding: 2em 5em;
box-sizing: border-box;
}
.content {
@ -112,17 +74,87 @@ main {
max-width: 800px;
}
textarea {
/* EDITOR STYLE */
.editor .sidebar {
position: fixed;
left: 0;
top: 3em;
overflow-y: auto;
overflow-x: hidden;
height: calc(100% - 3em);
width: 25%;
background-color: #37474F;
color: #fff;
box-sizing: border-box;
padding: 1.5em 1em;
}
.editor .container {
position: fixed;
top: 3em;
right: 0;
overflow: hidden;
height: calc(100% - 6em);
width: 75%;
box-sizing: border-box;
}
.editor .sidebar *:first-child {
margin-top: 0;
}
.editor textarea {
box-sizing: border-box;
height: 100%;
width: 100%;
min-height: 50em;
resize: none;
border: 0;
resize: vertical;
box-sizing: content-box;
font-family: inherit;
padding: 1.5em 11em;
font-family: monospace;
font-size: 1.05em;
}
.editor input {
width: 100%;
background-color: #fff;
border-radius: 5px;
padding: .5em 1em;
box-sizing: border-box;
}
.editor input:focus {
border: 1px solid #ddd;
}
.editor legend {
font-size: 1em;
font-weight: bold;
}
.action-bar {
position: fixed;
bottom: 0;
right: 0;
width: 75%;
background-color: #455A64;
height: 3em;
display: flex;
padding: 0.5em 1em;
box-sizing: border-box;
}
.action-bar .left {
margin-right: auto;
}
.action-bar *:last-child {
margin-left: 1em;
}
/* FORMS */
/* FORMS ELEMENTS */
form input {
color: rgba(0, 0, 0, 0.41);
@ -155,45 +187,6 @@ form legend {
font-size: 1.5em;
}
form .container.left input {
width: 100%;
background-color: #fff;
border-radius: 5px;
padding: .5em 1em;
box-sizing: border-box;
}
form .container.left input:focus {
border: 1px solid #ddd;
}
form .container.left label {}
form .container.left legend {
font-size: 1em;
font-weight: bold;
}
.action-bar {
position: fixed;
bottom: 0;
right: 0;
width: 75%;
background-color: #455A64;
height: 3em;
display: flex;
padding: 0.5em 1em;
box-sizing: border-box;
}
.action-bar .left {
margin-right: auto;
}
.action-bar *:last-child {
margin-left: 1em;
}
button, input[type="submit"] {
border: 0;
color: #fff;

View File

@ -1,7 +1,6 @@
$(document).ready(function() {
$('.scroll').perfectScrollbar();
$('form').submit(function(event) {
var data = JSON.stringify($(this).serializeField())
var url = $(this).attr('action')

View File

@ -32,11 +32,8 @@
</ul>
</nav>
</header>
<main>
{{ template "content" . }}
</main>
{{ template "content" . }}
<footer>
</footer>
</body>

View File

@ -1,24 +1,24 @@
{{ define "content" }} {{ with .Body }}
<form method="POST" action="">
<main class="editor">
<form method="POST" action="_self">
<div class="sidebar scroll">
<h2>Metadata</h2>
{{ template "frontmatter" .FrontMatter }}
</div>
<div class="container left scroll">
<h2>Metadata</h2>
{{ template "frontmatter" .FrontMatter }}
</div>
<div class="container">
<textarea name="content" class="scroll">
{{ .Content }}
</textarea>
</div>
<div class="container main">
<textarea name="content" class="scroll">
{{ .Content }}
</textarea>
</div>
<div class="action-bar">
<button id="preview" class="left">Preview</button>
<input type="submit" value="Save">
<input type="submit" class="default" value="Publish">
</div>
</form>
<div class="action-bar">
<button id="preview" class="left">Preview</button>
<input type="submit" value="Save">
<input type="submit" class="default" value="Publish">
</div>
</form>
</main>
{{ end }} {{ end }}

View File

@ -1,5 +1,5 @@
{{ define "content" }}
<main>
{{ with .Body }}
<div class="content">
<h1>Settings</h1>
@ -9,5 +9,6 @@
</form>
</div>
{{ end }}
</main>
{{ end }}