<commit_before>// Package admin desrcibes the admin view containing references to
// various managers and editors
package admin

import (
	"bytes"
	"html/template"

	"github.com/nilslice/cms/content"
)

const adminHTML = `<!doctype html>
<html>
    <head>
        <title>CMS</title>
        <style type="text/css">
            label {
                display: block;
                margin-top: 11px;
            }
            input {
                display: block;
                margin-bottom: 11px;
                padding: 2px;
            }
        </style>
    </head>
    <body>
        <h1><a href="/admin">CMS</a></h1>
        <div class="types">
            <ul>
            {{ range $t, $f := .Types }}
                <li><a href="/admin/posts?type={{ $t }}">{{ $t }}</a></li>
            {{ end }}
            </ul>
        </div>
        {{ if .Subview}}
        <div class="manager">
            {{ .Subview }}
        </div>
        {{ end }}
    </body>
</html>`

type admin struct {
	Types   map[string]func() interface{}
	Subview template.HTML
}

// Admin ...
func Admin(manager []byte) []byte {
	a := admin{
		Types:   content.Types,
		Subview: template.HTML(manager),
	}

	buf := &bytes.Buffer{}
	tmpl := template.Must(template.New("admin").Parse(adminHTML))
	tmpl.Execute(buf, a)

	return buf.Bytes()
}
<commit_msg>css changes and additions for new input elements<commit_after>// Package admin desrcibes the admin view containing references to
// various managers and editors
package admin

import (
	"bytes"
	"html/template"

	"github.com/nilslice/cms/content"
)

const adminHTML = `<!doctype html>
<html>
    <head>
        <title>CMS</title>
        <style type="text/css">
            form {
                display: block;
                margin: 11px 0;
            }
            label {
            }
            input, textarea, select {
                display: block;
                margin: 11px 0 22px 0;
                padding: 2px;
            }
            input[type=checkbox] {
                display: inline-block;
                margin-left: 11px;
            }
        </style>
    </head>
    <body>
        <h1><a href="/admin">CMS</a></h1>
        <div class="types">
            <ul>
            {{ range $t, $f := .Types }}
                <li><a href="/admin/posts?type={{ $t }}">{{ $t }}</a></li>
            {{ end }}
            </ul>
        </div>
        {{ if .Subview}}
        <div class="manager">
            {{ .Subview }}
        </div>
        {{ end }}
    </body>
</html>`

type admin struct {
	Types   map[string]func() interface{}
	Subview template.HTML
}

// Admin ...
func Admin(manager []byte) []byte {
	a := admin{
		Types:   content.Types,
		Subview: template.HTML(manager),
	}

	buf := &bytes.Buffer{}
	tmpl := template.Must(template.New("admin").Parse(adminHTML))
	tmpl.Execute(buf, a)

	return buf.Bytes()
}

{'fraction_non_alphanumeric': 0.15760304814686527, 'fraction_numerical': 0.007273986837547627, 'mean_word_length': 1.635036496350365, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2092670', 'n_tokens_mistral': 942, 'n_tokens_neox': 887, 'n_words': 213}