// Code generated by "embed -pattern */* -id tmpls"; DO NOT EDIT.
package tmpl
var tmpls map[string]string
func init() {
tmpls = make(map[string]string)
tmpls["css/main.css"] = `body {
}
main {
max-width: 700px;
margin: 0 auto;
}
input,
textarea {
display: block;
box-sizing: border-box;
}
a,
input,
button {
cursor: pointer;
}
textarea {
width: 100%;
resize: vertical;
min-height: 250px;
}
.input-html,
.input-markdown {
display: block !important; /* tinymce hides this. */
width: 0;
height: 0;
min-height: 0;
resize: none;
overflow: hidden;
position: relative;
left: 50%;
top: 100px;
margin: 0;
padding: 0;
}
/* To match stylesheet. */
form > legend,
.tox.tox-tinymce {
margin-bottom: 16px;
}
details > form {
margin-top: 16px;
margin-bottom: 16px;
}
`
tmpls["html/_footer.html"] = `
`
tmpls["html/_head.html"] = `
`
tmpls["html/_header.html"] = `
`
tmpls["html/content.html"] = `
{{ template "html/_head.html" }}
CMS | {{ .Space.Name }} | {{ .ContentType.Name }} | {{ (.Content.MustValueByName "name").Value }}
{{ template "html/_header.html" }}
{{ .Space.Name }} > {{ .ContentType.Name }} > {{ (.Content.MustValueByName "name").Value }}
Update Content
Delete Content
{{ template "html/_footer.html" }}
`
tmpls["html/contenttype.html"] = `
{{ template "html/_head.html" }}
CMS | {{ .Space.Name }} | {{ .ContentType.Name }}
{{ template "html/_header.html" }}
{{ .Space.Name }} > {{ .ContentType.Name }}
Create a {{ .ContentType.Name }} Content
Browse {{ .ContentType.Name }} Content
{{ if .ContentList }}
{{ else }}
No content has been created with a content type of {{ .ContentType.Name }}
{{ end }}
{{ template "html/_footer.html" }}
`
tmpls["html/index.html"] = `
{{ template "html/_head.html" }}
CMS
{{ template "html/_header.html" }}
Home
{{ if .User }}
Create a New Space
Logout
Available Spaces
{{ if .Spaces }}
{{ else }}
You haven't created any spaces yet.
{{ end }}
{{ else }}
Login
Signup
{{ end }}
{{ template "html/_footer.html" }}
`
tmpls["html/space.html"] = `
{{ template "html/_head.html" }}
CMS | {{ .Space.Name }}
{{ template "html/_header.html" }}
{{ .Space.Name }}
Create Content Type
Browse Content By Type
{{ if .ContentTypes }}
{{ else }}
You haven't created any content types yet.
{{ end }}
{{ template "html/_footer.html" }}
`
tmpls["js/content.js"] = `// Setup inputs for content create/update.
(function() {
// HTML
tinymce.init({
selector: 'textarea.input-html',
// statusbar: false,
setup: function(item) {
item.on('change', function() {
item.targetElm.value = item.getContent()
})
}
})
// MARKDOWN
tinymce.init({
selector: "textarea.input-markdown",
plugin: 'textpattern',
menubar: false,
toolbar: 'undo redo',
// statusbar: false,
textpattern_patterns: [
{start: '*', end: '*', format: 'italic'},
{start: '**', end: '**', format: 'bold'},
{start: '#', format: 'h1'},
{start: '##', format: 'h2'},
{start: '###', format: 'h3'},
{start: '####', format: 'h4'},
{start: '#####', format: 'h5'},
{start: '######', format: 'h6'},
{start: '1. ', cmd: 'InsertOrderedList'},
{start: '* ', cmd: 'InsertUnorderedList'},
{start: '- ', cmd: 'InsertUnorderedList'}
],
setup: function(item) {
item.on('change', function() {
item.targetElm.value = item.getContent()
})
}
});
})();
`
tmpls["js/space.js"] = `// Add more fields to space create.
(function() {
var addFieldBtn = document.getElementById('add-fieldbtn')
var i = 1
addFieldBtn.addEventListener('click', function(e) {
i++
e.preventDefault()
e.stopPropagation()
var el = document.createElement('div')
el.innerHTML = ` + "`" + `
` + "`" + `
addFieldBtn.parentNode.insertBefore(el, addFieldBtn)
var removeFieldBtn = document.getElementById(` + "`" + `remove-fieldbtn_${i}` + "`" + `)
removeFieldBtn.addEventListener('click', function(e) {
i--
e.preventDefault()
e.stopPropagation()
el.parentNode.removeChild(el)
})
})
})();
`
}
func Get(name string) (string, bool) {
val, ok := tmpls[name]
return val, ok
}
func Must(name string) string {
val, _ := tmpls[name]
return val
}