update
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="{{ .Config.BaseURL }}/_filemanagerinternal/css/styles.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js"></script>
|
||||
<script src="{{ .Config.BaseURL }}/_filemanagerinternal/js/form-to-json.js"></script>
|
||||
<script src="{{ .Config.BaseURL }}/_filemanagerinternal/js/application.js"></script>
|
||||
{{ if ne .Config.StyleSheet "" }}<style>{{.Config.StyleSheet}}</style>{{ end }}
|
||||
</head>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div id="editor" class="container" data-kind="{{ .Class }}">
|
||||
<form method="POST" action="./">
|
||||
{{ if or (eq .Class "frontmatter-only") (eq .Class "complete") }}
|
||||
<div class="frontmatter">
|
||||
<div class="frontmatter" data-type="parent">
|
||||
{{ template "blocks" .FrontMatter }}
|
||||
<button class="add">Add field</button>
|
||||
</div>
|
||||
@@ -18,7 +18,8 @@
|
||||
{{ end }}
|
||||
|
||||
<div>
|
||||
<input type="submit" data-type="{{ .Class }}" value="Save">
|
||||
<button id="submit" type="submit" data-type="{{ .Class }}"><span><i class="material-icons">save</i></span> <span>save</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -28,30 +28,22 @@
|
||||
{{ template "fielset" $value }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<template id="arrayItem">
|
||||
|
||||
</template>
|
||||
|
||||
<template id="objectItem">
|
||||
|
||||
</template>
|
||||
{{ end }}
|
||||
|
||||
{{ define "value" }}
|
||||
{{ if eq .HTMLType "textarea" }}
|
||||
<textarea class="scroll" name="{{ .Name }}:{{ .Type }}" id="{{.Name }}" data-parent-type="{{ .Parent.Type }}">{{ .Content.Other }}</textarea>
|
||||
<textarea class="scroll" name="{{ .Name }}" id="{{.Name }}" data-parent-type="{{ .Parent.Type }}">{{ .Content.Other }}</textarea>
|
||||
{{ else if eq .HTMLType "datetime" }}
|
||||
<input name="{{ .Name }}:{{ .Type }}" id="{{ .Name }}" value="{{ .Content.Other.Format "2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
<input name="{{ .Name }}" id="{{ .Name }}" value="{{ .Content.Other.Format "2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
{{ else }}
|
||||
<input name="{{ .Name }}:{{ .Type }}" id="{{ .Name }}" value="{{ .Content.Other }}" type="{{ .HTMLType }}" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
<input name="{{ .Name }}" id="{{ .Name }}" value="{{ .Content.Other }}" type="{{ .HTMLType }}" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "fielset" }}
|
||||
<fieldset id="{{ .Name }}" data-type="{{ .Type }}">
|
||||
<h3>{{ SplitCapitalize .Title }}</h3>
|
||||
{{ if not (eq .Title "") }}<h3>{{ SplitCapitalize .Title }}</h3>{{ end }}
|
||||
<div class="action add">
|
||||
<i class="material-icons">add</i>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
<span class="checkbox">
|
||||
</div>
|
||||
{{- end}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user