bootstrap new version
This commit is contained in:
@@ -1,97 +0,0 @@
|
||||
.editor input[type="text"], .editor input[type="datetime-local"], .editor textarea {
|
||||
background-color: #f5f3f3;
|
||||
border-radius: .5em;
|
||||
border: 1px solid #ccc;
|
||||
outline: none;
|
||||
padding: .5em;
|
||||
line-height: 1.2em;
|
||||
width: 100%;
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
input[type="text"]:focus {
|
||||
border-bottom: 1px solid #26a69a;
|
||||
}
|
||||
.editor .block {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.editor fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.editor h1 textarea {
|
||||
font-size: 2em;
|
||||
font-weight: 400;
|
||||
resize: none;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
line-height: 1em;
|
||||
height: 1em;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
.editor fieldset h3 {
|
||||
display: inline-block
|
||||
}
|
||||
.editor label {
|
||||
font-size: .8em;
|
||||
color: #8b8b8b;
|
||||
font-weight: 500;
|
||||
}
|
||||
.editor .options {
|
||||
column-count: 2;
|
||||
column-gap: 1em;
|
||||
}
|
||||
.editor .block {
|
||||
break-inside: avoid;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
.editor .block .delete {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 1px;
|
||||
height: 2.5em;
|
||||
padding: 0 .7em;
|
||||
background: transparent;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
/* BUTTONS */
|
||||
|
||||
.editor button, .editor input[type="submit"] {
|
||||
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
outline: 0;
|
||||
padding: 0 2rem;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
background-color: #26a69a;
|
||||
text-align: center;
|
||||
letter-spacing: .5px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
transition: all .3s ease-out;
|
||||
}
|
||||
|
||||
/* TOOLBAR */
|
||||
|
||||
.editor #actions {
|
||||
display: flex;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.editor #actions> div {
|
||||
flex-basis: 50%;
|
||||
}
|
||||
.editor #actions div:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
@@ -1,5 +1 @@
|
||||
"use strict";
|
||||
|
||||
var ace = document.createElement('script');
|
||||
ace.src = 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js';
|
||||
document.head.appendChild(ace);
|
||||
'use strict';
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
{{ define "content" }}
|
||||
<div class="container editor {{ .Class }}">
|
||||
{{ if eq .Class "complete" }}
|
||||
<h1>
|
||||
<textarea id="site-title">{{ .Name }}</textarea>
|
||||
</h1>
|
||||
|
||||
<form method="POST" action=".">
|
||||
<div class="options">
|
||||
{{ template "frontmatter" .FrontMatter }}
|
||||
<button id="add-field">Add field</button>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
{{ if eq .Mode "markdown" }}
|
||||
<nav>
|
||||
<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>
|
||||
</nav>
|
||||
{{ end}}
|
||||
|
||||
<div id="editor-source" data-mode="{{ .Mode }}"></div>
|
||||
<textarea name="content">{{ .Content }}</textarea>
|
||||
<div id="editor-preview"></div>
|
||||
</form>
|
||||
{{ else if eq .Class "content-only" }}
|
||||
<form method="POST" action="">
|
||||
<h1 id="site-title">{{ .Name }}</h1>
|
||||
|
||||
<div class="main">
|
||||
<div id="editor-source" data-mode="{{ .Mode }}"></div>
|
||||
<textarea name="content">{{ .Content }}</textarea>
|
||||
</div>
|
||||
</form>
|
||||
{{ else }}
|
||||
<form method="POST" action="">
|
||||
<h1 id="site-title">{{ .Name }}</h1>
|
||||
|
||||
<div class="options">
|
||||
{{ template "frontmatter" .FrontMatter }}
|
||||
<button id="add-field">Add field</button>
|
||||
</div>
|
||||
</form>
|
||||
{{ end }}
|
||||
|
||||
<div id="actions">
|
||||
<div>
|
||||
<input type="submit" data-type="{{ .Class }}" data-regenerate="false" data-schedule="false" value="Save">
|
||||
</div>
|
||||
<div>
|
||||
{{ if and (eq .Class "complete") ( .IsPost ) }}<input type="submit" data-type="{{ .Class }}" data-schedule="true" data-regenerate="false" value="Schedule">
|
||||
{{ end }}
|
||||
<input type="submit" data-type="{{ .Class }}" data-regenerate="true" data-schedule="false" class="default" value="Publish">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
@@ -1,50 +0,0 @@
|
||||
{{ define "frontmatter" }}
|
||||
{{ range $key, $value := . }}
|
||||
|
||||
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
||||
<fieldset id="{{ $value.Name }}" data-type="{{ $value.Type }}">
|
||||
<div class="title">
|
||||
<h3>{{ SplitCapitalize $value.Title }}</h3>
|
||||
|
||||
<button class="delete" data-delete="{{ $value.Name }}">−</button>
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
{{ template "frontmatter" $value.Content }}
|
||||
<button class="add">Add field</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
{{ else }}
|
||||
|
||||
{{ if not (eq $value.Parent.Type "array") }}
|
||||
<div class="block" id="block-{{ $value.Name }}" data-content="{{ $value.Name }}">
|
||||
<label for="{{ $value.Name }}">{{ SplitCapitalize $value.Title }}</label>
|
||||
<button class="delete" data-delete="block-{{ $value.Name }}">×</button>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $value.Parent.Type "array" }}
|
||||
<div class="block" id="{{ $value.Name }}-{{ $key }}" data-type="array-item">
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $value.HTMLType "textarea" }}
|
||||
<textarea class="scroll" name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" data-parent-type="{{ $value.Parent.Type }}">{{ $value.Content }}</textarea>
|
||||
{{ else if eq $value.HTMLType "datetime" }}
|
||||
<input name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" value="{{ $value.Content.Format " 2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ $value.Parent.Type }}"></input>
|
||||
{{ else }}
|
||||
<input name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" value="{{ $value.Content }}" type="{{ $value.HTMLType }}" data-parent-type="{{ $value.Parent.Type }}"></input>
|
||||
{{ end }}
|
||||
|
||||
{{ if not (eq $value.Parent.Type "array") }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $value.Parent.Type "array" }}
|
||||
<button class="delete" data-delete="{{ $value.Name }}">×</button>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user