~evanj/cms

11f342f709bebc11104ce97944871ad219349df6 — Evan M Jones 6 months ago 1ff0eb5
Feat(css): Reworking some css.
M internal/s/tmpl/css/main.css => internal/s/tmpl/css/main.css +45 -0
@@ 1,3 1,44 @@
body { 
  margin-left: auto;
  margin-right: auto;
}

body main {
  margin-left: 10px;
  margin-right: 10px;
}

fieldset {
  display: inline-block;
}

.contenttype details:nth-child(2) form fieldset,
.content details:nth-child(2) form fieldset {
  display: block;
}

fieldset + br { 
  height: 20px; 
  content: " "; 
  display: block; 
}

header nav { 
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav ul,
header nav li { 
  list-style: none;
}

header nav li { 
  float: left;
  margin-left: 10px;
}

.tox.tox-tinymce {
  min-height: 600px;
}


@@ 18,3 59,7 @@
.aa-dropdown-menu p:hover {
  background: rgba(0, 0, 0, 0.05);
}

span.tox-statusbar__branding {
  display: none;
}

M internal/s/tmpl/html/content.html => internal/s/tmpl/html/content.html +1 -1
@@ 4,7 4,7 @@
  {{ template "html/_head.html" }}
  <title>CMS | {{ .Space.Name }} | {{ .ContentType.Name }} | {{ (.Content.MustValueByName "name").Value }}</title>
</head>
<body class=content>
<body class=content style='max-width: 800px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}

M internal/s/tmpl/html/contenttype.html => internal/s/tmpl/html/contenttype.html +1 -1
@@ 6,7 6,7 @@
  <title>CMS | {{ .Space.Name }} | {{ .ContentType.Name }}</title>
</head>

<body class=contenttype>
<body class=contenttype style='max-width: 800px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}

M internal/s/tmpl/html/hook.html => internal/s/tmpl/html/hook.html +2 -1
@@ 6,7 6,8 @@
  <title>CMS | {{ .Space.Name }} | {{ .Hook.URL }}</title>
</head>

<body class=hook style='max-width: 500px;'>
<body class=index style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>

M internal/s/tmpl/html/index.html => internal/s/tmpl/html/index.html +4 -1
@@ 5,12 5,14 @@
  {{ template "html/_head.html" }}
  <title>CMS</title>
</head>
<body class=index style='max-width: 500px;'>
<body class=index style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>
    <article>
      {{ if .User }}
        <h1>Actions</h1>
        <details>
          <summary>Create a New Space</summary>
          <form method=POST action='/space/new' enctype='multipart/form-data'>


@@ 53,6 55,7 @@
          <p>You haven't created any spaces yet.</p>
        {{ end }}
      {{ else }}
        <h1>Account</h1>
        <details>
          <summary>Login</summary>
          <form method=POST action='/user/login' enctype='multipart/form-data'>

M internal/s/tmpl/html/space.html => internal/s/tmpl/html/space.html +2 -1
@@ 6,7 6,8 @@
  <title>CMS | {{ .Space.Name }}</title>
</head>

<body class=space style='max-width: 500px;'>
<body class=space style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>

M internal/s/tmpl/tmpls_embed.go => internal/s/tmpl/tmpls_embed.go +56 -7
@@ 7,7 7,48 @@ var tmpls map[string]string
func init() {
	tmpls = make(map[string]string)

	tmpls["css/main.css"] = `.tox.tox-tinymce {
	tmpls["css/main.css"] = `body { 
  margin-left: auto;
  margin-right: auto;
}

body main {
  margin-left: 10px;
  margin-right: 10px;
}

fieldset {
  display: inline-block;
}

.contenttype details:nth-child(2) form fieldset,
.content details:nth-child(2) form fieldset {
  display: block;
}

fieldset + br { 
  height: 20px; 
  content: " "; 
  display: block; 
}

header nav { 
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav ul,
header nav li { 
  list-style: none;
}

header nav li { 
  float: left;
  margin-left: 10px;
}

.tox.tox-tinymce {
  min-height: 600px;
}



@@ 27,6 68,10 @@ func init() {
.aa-dropdown-menu p:hover {
  background: rgba(0, 0, 0, 0.05);
}

span.tox-statusbar__branding {
  display: none;
}
`

	tmpls["css/mvp.css"] = `:root {


@@ 422,7 467,7 @@ blockquote footer {
  {{ template "html/_head.html" }}
  <title>CMS | {{ .Space.Name }} | {{ .ContentType.Name }} | {{ (.Content.MustValueByName "name").Value }}</title>
</head>
<body class=content>
<body class=content style='max-width: 800px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}


@@ 621,7 666,7 @@ blockquote footer {
  <title>CMS | {{ .Space.Name }} | {{ .ContentType.Name }}</title>
</head>

<body class=contenttype>
<body class=contenttype style='max-width: 800px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}


@@ 815,7 860,8 @@ blockquote footer {
  <title>CMS | {{ .Space.Name }} | {{ .Hook.URL }}</title>
</head>

<body class=hook style='max-width: 500px;'>
<body class=index style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>


@@ 852,12 898,14 @@ blockquote footer {
  {{ template "html/_head.html" }}
  <title>CMS</title>
</head>
<body class=index style='max-width: 500px;'>
<body class=index style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>
    <article>
      {{ if .User }}
        <h1>Actions</h1>
        <details>
          <summary>Create a New Space</summary>
          <form method=POST action='/space/new' enctype='multipart/form-data'>


@@ 900,6 948,7 @@ blockquote footer {
          <p>You haven't created any spaces yet.</p>
        {{ end }}
      {{ else }}
        <h1>Account</h1>
        <details>
          <summary>Login</summary>
          <form method=POST action='/user/login' enctype='multipart/form-data'>


@@ 963,7 1012,8 @@ blockquote footer {
  <title>CMS | {{ .Space.Name }}</title>
</head>

<body class=space style='max-width: 500px;'>
<body class=space style='max-width: 600px;'>
  <style>{{ template "css/main.css" }}</style>
  <main>
    {{ template "html/_header.html" $ }}
    <hr/>


@@ 1190,7 1240,6 @@ blockquote footer {
      var content = inputs[1]

      var opts = {
        debug: true,
        autoselect: true,
        autoselectOnBlur: true, 
        tabAutocomplete: true,