From b71625823caa6b337218d8d0c8ee3c7df5359f44 Mon Sep 17 00:00:00 2001
From: Vince Salvino <salvino@coderedcorp.com>
Date: Sun, 2 Aug 2020 19:05:35 -0400
Subject: [PATCH] Tweak docs theme, remove version selector

---
 docs/_static/docs.css          | 55 ++++++++++++------------
 docs/_static/versions.js       | 28 -------------
 docs/_templates/globaltoc.html |  1 -
 docs/_templates/relations.html | 19 ---------
 docs/_templates/versions.html  |  3 --
 docs/conf.py                   | 77 +---------------------------------
 docs/releases/v0.19.0.rst      |  4 ++
 7 files changed, 32 insertions(+), 155 deletions(-)
 delete mode 100644 docs/_static/versions.js
 delete mode 100644 docs/_templates/relations.html
 delete mode 100644 docs/_templates/versions.html

diff --git a/docs/_static/docs.css b/docs/_static/docs.css
index 3ef9371a..8541b92c 100644
--- a/docs/_static/docs.css
+++ b/docs/_static/docs.css
@@ -1,10 +1,13 @@
+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');
+
 body {
-    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",sans-serif;
-    line-height: 1.4em;
+    font-family: "Inter",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue","Arial Nova",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",sans-serif;
+    font-weight: 400;
+    line-height: 1.5em;
 }
 
 code, pre {
-    background-color:#f0f0f3;
+    background-color:#f1f3fa;
     font-family: SFMono-Regular,Menlo,Monaco,Consolas,monospace;
     font-size: 0.85em;
     line-height: unset;
@@ -23,12 +26,11 @@ div.body h4,
 div.body h5,
 div.body h6 {
     border: none;
-    font-weight: 600;
+    font-weight: 700;
     margin: 1.5em 0 0 0;
     padding: 0;
 }
 div.body h1 {
-    font-weight: 300;
     font-size: 2.5em;
     margin-bottom: 1em;
     line-height: 1;
@@ -55,10 +57,15 @@ div.body li li {
 }
 
 div.bodywrapper {
-    background-color:#f0f0f3;
+    background-color:#f1f3fa;
     margin: 0 0 0 300px;
 }
 
+div.document {
+    background: linear-gradient(135deg, #200030 0vh, #102060 100vh);
+    background-attachment: fixed;
+}
+
 div.related {
     line-height: unset;
     padding: 20px 0;
@@ -94,7 +101,7 @@ div.prevnext a:hover {
 div.logowrapper {
     margin: -20px -20px 40px -20px;
     padding: 20px;
-    background-color: #d33;
+    background-color: #d00;
     text-align: center;
 }
 
@@ -140,11 +147,16 @@ div.sphinxsidebarwrapper {
 
 div.sphinxsidebar {
     padding: 20px;
+    font-size: 0.875em;
 }
-div.sphinxsidebar h3 {
+div.sphinxsidebar .sphinxsidebarwrapper > ul {
     margin-top: 40px;
-    font-size: 1.6em;
-    font-weight: 300;
+}
+div.sphinxsidebar h3 {
+    text-transform: uppercase;
+    font-size: 0.875em;
+    font-weight: 700;
+    color: #fff;
 }
 div.sphinxsidebar input {
     font-family: inherit;
@@ -172,7 +184,7 @@ div.sphinxsidebar #searchbox input[type='submit'] {
     background-color: rgba(255,255,255,0.3);
     color: #fff;
     padding: 0.5em 0.8em;
-    font-weight: 600;
+    font-weight: 700;
     transition: .2s ease all;
 }
 div.sphinxsidebar #searchbox input[type='submit']:hover,
@@ -199,20 +211,7 @@ div.sphinxsidebar p.topless {
 div.sphinxsidebar li.toctree-l1.current > a,
 div.sphinxsidebar a.current.reference {
     color: #fff;
-    font-weight: 600;
-}
-
-#other-versions a {
-    background-color: rgba(255,255,255,0.1);
-    border-radius: 4px;
-    font-weight: 600;
-    padding: 0.1em 0.5em;
-    margin: 0.25em;
-    transition: .2s ease all;
-}
-#other-versions a:hover {
-    background-color: rgba(255,255,255,0.2);
-    transition: .2s ease all;
+    font-weight: 700;
 }
 
 div.prevnext {
@@ -285,10 +284,10 @@ table.docutils th {
 
 .mobile-header {
     display:none;
-    background-color: #d33;
+    background-color: #d00;
     color: #fff;
     text-align: center;
-    font-weight: bold;
+    font-weight: 700;
     padding: 15px;
 }
 .mobile-header a {
@@ -329,4 +328,4 @@ table.docutils th {
     .mobile-header {
         display: block;
     }
-}
\ No newline at end of file
+}
diff --git a/docs/_static/versions.js b/docs/_static/versions.js
deleted file mode 100644
index ff80dc39..00000000
--- a/docs/_static/versions.js
+++ /dev/null
@@ -1,28 +0,0 @@
-vroot = '/cms/';
-vfile = 'versions.txt';
-
-function setversions(data) {
-    data.split('\n').forEach((item, index) => {
-        if(item.trim() != '') {
-            newa = document.createElement('a', );
-            newa.setAttribute('href', vroot + item + '/');
-            newa.innerHTML = item;
-            document.getElementById("other-versions").appendChild(newa);
-        }
-    });
-}
-
-$(document).ready(function() {
-    if(sessionStorage.getItem(vroot+vfile)) {
-        setversions(sessionStorage.getItem(vroot+vfile));
-    }
-    else {
-        $.ajax({
-            url: vroot + vfile,
-            success: function(data) {
-                sessionStorage.setItem(vroot+vfile, data);
-                setversions(data);
-            }
-        });
-    }
-});
\ No newline at end of file
diff --git a/docs/_templates/globaltoc.html b/docs/_templates/globaltoc.html
index 6ffcf430..f080c58a 100644
--- a/docs/_templates/globaltoc.html
+++ b/docs/_templates/globaltoc.html
@@ -7,5 +7,4 @@
     :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 #}
-<h3>{{ _('Table of Contents') }}</h3>
 {{ toctree() }}
diff --git a/docs/_templates/relations.html b/docs/_templates/relations.html
deleted file mode 100644
index 48b047d5..00000000
--- a/docs/_templates/relations.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{#
-    basic/relations.html
-    ~~~~~~~~~~~~~~~~~~~~
-
-    Sphinx sidebar template: relation links.
-
-    :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-#}
-{%- if prev %}
-  <h3>{{ _('Previous topic') }}</h3>
-  <p class="topless">← <a href="{{ prev.link|e }}"
-                        title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
-{%- endif %}
-{%- if next %}
-  <h3>{{ _('Next topic') }}</h3>
-  <p class="topless">→ <a href="{{ next.link|e }}"
-                        title="{{ _('next chapter') }}">{{ next.title }}</a></p>
-{%- endif %}
\ No newline at end of file
diff --git a/docs/_templates/versions.html b/docs/_templates/versions.html
deleted file mode 100644
index b3f04e24..00000000
--- a/docs/_templates/versions.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<h3>Versions</h3>
-<p id="other-versions"></p>
-{{ js_tag('_static/versions.js') }}
\ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index 46f81e3a..1b4cb804 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -118,85 +118,10 @@
 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
 # 'searchbox.html']``.
 #
-html_sidebars = {'**': ['searchbox.html', 'globaltoc.html', 'relations.html', 'versions.html']}
+html_sidebars = {'**': ['searchbox.html', 'globaltoc.html']}
 
 html_context = {
     'css_files': ['_static/docs.css'],
 }
 
 html_last_updated_fmt = ''
-
-
-# -- Options for HTMLHelp output ---------------------------------------------
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'CodeRedCMSdoc'
-
-
-# -- Options for LaTeX output ------------------------------------------------
-
-latex_elements = {
-    # The paper size ('letterpaper' or 'a4paper').
-    #
-    # 'papersize': 'letterpaper',
-
-    # The font size ('10pt', '11pt' or '12pt').
-    #
-    # 'pointsize': '10pt',
-
-    # Additional stuff for the LaTeX preamble.
-    #
-    # 'preamble': '',
-
-    # Latex figure (float) alignment
-    #
-    # 'figure_align': 'htbp',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-#  author, documentclass [howto, manual, or own class]).
-latex_documents = [
-    (master_doc, 'CodeRedCMS.tex', 'CodeRed CMS Documentation',
-     'CodeRed LLC', 'manual'),
-]
-
-
-# -- Options for manual page output ------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
-    (master_doc, 'coderedcms', 'CodeRed CMS Documentation',
-     [author], 1)
-]
-
-
-# -- Options for Texinfo output ----------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-#  dir menu entry, description, category)
-texinfo_documents = [
-    (master_doc, 'CodeRedCMS', 'CodeRed CMS Documentation',
-     author, 'CodeRedCMS', 'One line description of project.',
-     'Miscellaneous'),
-]
-
-
-# -- Options for Epub output -------------------------------------------------
-
-# Bibliographic Dublin Core info.
-epub_title = project
-
-# The unique identifier of the text. This can be a ISBN number
-# or the project homepage.
-#
-# epub_identifier = ''
-
-# A unique identification for the text.
-#
-# epub_uid = ''
-
-# A list of files that should not be packed into the epub file.
-epub_exclude_files = ['search.html']
diff --git a/docs/releases/v0.19.0.rst b/docs/releases/v0.19.0.rst
index d643064e..b9f68ae0 100644
--- a/docs/releases/v0.19.0.rst
+++ b/docs/releases/v0.19.0.rst
@@ -27,6 +27,10 @@ New features
 * ``coderedcms start`` no longer creates a boilerplate Dockerfile. This has
   been replaced with a more thorough guide: :doc:`/how_to/docker`.
 
+* As of 0.19, we will no longer maintain separate versions of docs for each
+  release. The single stable docs will contain notes for each feature if that
+  feature is changed, added, or removed in a particular release.
+
 
 Upgrade considerations
 ----------------------
