Merge branch 'docs-toolchain-upgrade' of github.com:PowershellNinja/evennia into PowershellNinja-docs-toolchain-upgrade

This commit is contained in:
Griatch 2025-08-14 16:46:33 +02:00
commit f1fc8343b7
8 changed files with 488 additions and 2162 deletions

View file

@ -1,21 +1,6 @@
# requirements for building the docs # requirements for building the docs
sphinx==3.2.1 sphinx>=7.3.7,<8.0.0
myst-parser==0.15.2 myst-parser>=2.0.0,<3.0.0
myst-parser[linkify]==0.15.2 Jinja2>=3.1
Jinja2 < 3.1 linkify-it-py>=2.0.0
# pinned to allow for sphinx 3.x to still work, latest required 5+
alabaster==0.7.13
sphinxcontrib-applehelp<1.0.7
sphinxcontrib-devhelp<1.0.6
sphinxcontrib-htmlhelp<2.0.5
sphinxcontrib-qthelp<1.0.7
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-serializinghtml<1.1.10
# sphinx-multiversion with evennia fixes
git+https://github.com/evennia/sphinx-multiversion.git@evennia-mods#egg=sphinx-multiversion
# sphinxcontrib-lunrsearch custom branch with evennia-specific fixes
# git+https://github.com/evennia/sphinxcontrib-lunrsearch.git@evennia-mods#egg=sphinxcontrib-lunrsearch

View file

@ -1,810 +0,0 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
width: 21%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin: 10px 0;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
}
/* images in the body */
p > img {
float: right;
padding:0.5em 1em 0.5em 1em;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
margin-left: auto;
margin-right: auto;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable ul {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
}
table.indextable > tbody > tr > td > ul {
padding-left: 0em;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- domain module index --------------------------------------------------- */
table.modindextable td {
padding: 2px;
border-collapse: collapse;
}
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #787878;
padding: 5px 7px 7px 15px;
background-color: #f5fdff;
width: 40%;
float: right;
}
p.sidebar-title {
font-weight: bold;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
border: 0;
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
th > p:first-child,
td > p:first-child {
margin-top: 0px;
}
th > p:last-child,
td > p:last-child {
margin-bottom: 0px;
}
thead {
border-bottom: 2px solid #aaa;
}
.row-odd {
background: #edeee4;
}
.row-even {
background: #f4f4ed;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
table.field-list td, table.field-list th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
li > p:first-child {
margin-top: 0px;
}
li > p:last-child {
margin-bottom: 0px;
}
ul.simple > li > ul > li {
margin-left: -25px;
}
ul > li > ul > li {
margin-left: -7px;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd > p:first-child {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dt:target, span.highlighted {
background-color: #fffbde;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}
td.linenos pre {
padding 5px, 0px;
border: 0;
background-color: transparent;
color: #aaa;
-webkit-box-shadow: 0px 0px 0px #fff;
font-size: 1.4em;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
/* padding: 0 0.5em 0 0.5em; */
}
div.code-block-caption {
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
div.highlight > pre {
font-family: "Courier Prime", monospace;
line-height: 1.4em;
font-size: smaller;
}
/* default ({code-block}, no arg) - used for in-game code */
div.highlight-shell.notranslate > div.highlight > pre {
background-color: #505050;
color: white;
}
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 0.9em;
}
code.descclassname {
background-color: transparent;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
font-family: "Courier Prime", monospace;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
span.eqno a.headerlink {
position: relative;
left: 0px;
z-index: 1;
}
div.math:hover a.headerlink {
visibility: visible;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

View file

@ -0,0 +1,444 @@
/* ===========================================================================
Evennia Docs Custom CSS for Sphinx 7.x
(Auto-generated: ports all styles from live Evennia nature.css,
adapted for modern Sphinx, minimal layout overrides)
COMMENTS:
- All major overrides/fixes are documented.
- Responsive and layout hacks are clearly marked for Sphinx 7.x compatibility.
- Magic values from live Evennia docs are annotated for traceability.
========================================================================== */
/* --- Imports & Font Setup --- */
@import url("https://fonts.googleapis.com/css?family=Arvo:400,700,400italic");
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic");
@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap");
/* --- Page Layout & Core Backgrounds --- */
/* HACK: Body and wrappers for Evennia look. Padding/margin settings ensure consistent backgrounds and edge gutters. */
body {
font-family: "Open Sans", Helvetica, Arial, sans-serif;
background-color: #eee !important;
color: #555;
width: 100% !important;
min-width: 0 !important;
max-width: none !important;
margin: 0 !important;
padding: 0 24px !important; /* Adjust padding as you like */
}
.bodywrapper {
width: 100% !important;
min-width: 0 !important;
max-width: none !important;
margin: 0 !important;
padding: 0 !important;
}
/* Container styling for max-width, background, shadow, and border-radius—matches Evennia's live docs. */
div.document {
background-color: #eeeeea !important;
max-width: 1090px; /* Copied from live Evennia for page width */
margin: 0 0;
box-shadow: 0 0 4px 0 #ececec;
border-radius: 6px;
}
div.body {
background-color: #f1f1ef !important;
color: #3E4349;
padding: 0 30px 30px 30px;
font-size: 0.9em;
margin-top: -9px;
}
div.documentwrapper {
display: flex;
flex-wrap: wrap;
}
div.bodywrapper {
width: 79%;
box-sizing: border-box;
}
hr {
border: 1px solid #B1B4B6;
}
/* --- Header/Footer Bar --- */
/* Header & footer bars: color, margin, radius, and link color tuned for Evennia branding */
div.related {
background-color: #dbe9f0 !important;
line-height: 32px;
color: #9FA0A0;
font-size: 0.9em;
max-width: 1090px;
margin: 0 0;
border-radius: 0 0 6px 6px;
}
div.related a {
color: #565F62;
text-shadow: none;
}
div.footer {
color: #555;
width: 100%;
padding: 13px 0;
text-align: center;
font-size: 75%;
max-width: 1080px;
margin: 0 auto;
}
div.footer a {
color: #444;
text-decoration: underline;
}
/* --- Logo Centering --- */
/* Center Evennia logo in sidebar or header—matches live docs. */
.logo {
padding-left: 1px;
margin-left: auto;
margin-right: auto;
display: block;
margin-top: -12px;
opacity: 0.8;
}
/* --- Sidebar --- */
/* SIDEBAR LAYOUT: Custom overrides to maintain left sidebar (pre-Sphinx 7 behavior)
and adapt sidebar coloring/spacing to Evennia's look as of July 2025. */
div.sphinxsidebar {
font-size: 0.75em;
line-height: 1.5em;
background-color: #fafaf8;
border-right: 1px solid #e4e4dc;
background: #eeeeea;
}
div.sphinxsidebarwrapper {
padding: 20px 0;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: Arvo, sans-serif;
color: #4f4f4f;
font-size: 1.2em;
font-weight: normal;
margin: 0;
padding: 5px 10px;
background-color: #dbe9f0 !important;
border-radius: 2px;
margin-top: 15px;
margin-bottom: 4px;
}
div.sphinxsidebar h4 {
font-size: 1.1em;
}
div.sphinxsidebar h3 a {
color: #444;
text-shadow: none;
}
div.sphinxsidebar p {
color: #888;
padding: 5px 20px;
}
div.sphinxsidebar ul {
margin: 10px 20px;
padding: 0;
color: #000;
}
div.sphinxsidebar a {
color: #444;
}
div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: Arvo, sans-serif;
font-size: 1em;
background-color: #f7f7f7;
}
div.sphinxsidebar .searchformwrapper {
margin-left: 20px;
margin-right: 20px;
}
/* --- Main Content Headers --- */
/* HEADINGS: Matches Evennia live doc headers for background, border, and text style */
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: Arvo, Monaco, serif;
background-color: #f7f7f3 !important;
font-weight: normal;
color: #212224;
margin: 30px 0px 10px 0px;
padding: 5px 0 5px 10px;
text-shadow: 0px 1px 0 white;
border-bottom: 1px solid #c6d7df;
border-left: 10px solid #cfdde8;
border-top: 0px solid #cfdde8;
}
div.body h1 { margin-top: 20px solid #fff; font-size: 230%; }
div.body h2 { font-size: 150%; }
div.body h3 { font-size: 120%; }
div.body h4 { font-size: 110%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
/* --- Blockquotes --- */
blockquote {
font-style: italic;
color: #797979;
background-color: #e1e8e2;
border: 1px solid #c7cdc8;
padding-left: 14px;
padding-right: 15px;
margin-left: 0;
width: 96%;
border-left-style: dotted;
border-left-width: medium;
position: relative;
}
blockquote:before {
content: "!";
float: left;
font-size: 230%;
opacity: 0.3;
padding-right: 5px;
}
/* --- Admonitions, Notes, Warnings --- */
div.note, .admonition.note {
background-color: #e1e8e2 !important;
border: 1px solid #ccc;
font-style: italic;
text-indent: -2.9em;
padding-left: 3.5em;
}
div.note > p { text-indent: 0em; }
div.important, .admonition.important {
background-color: #fbf7c3 !important;
border: 1px solid #c8c59b;
font-style: italic;
text-indent: -5.5em;
padding-left: 6.1em;
}
div.important > p { text-indent: 0em; }
div.warning, .admonition.warning {
background-color: #ffe4e4 !important;
border: 1px solid #f66;
font-style: italic;
text-indent: -4.6em;
padding-left: 5.2em;
}
div.warning > p { text-indent: 0em; }
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic, aside.topic {
background-color: #eee;
}
div.attention { background-color: #e5f3ff; border-color: #65b9ff; }
div.danger { background-color: #fff2f0; border-color: #f33; }
p.admonition-title {
margin-right: 0.2em;
display: inline;
font-weight: bold;
padding-right: 0.6em;
}
p.admonition-title:after { content: ":"; }
div.admonition p.admonition-title + p { display: inline; }
/* --- Version added/changed/deprecated boxes --- */
.versionadded { background-color: #e9f6e1; }
.versionchanged { background-color: #b7e6e8; padding-left: 10px; }
.deprecated { background-color: #fff3f3; }
/* --- Lists & Lists in API Docs --- */
li > p:first-child { margin-top: 0px; margin-bottom: 0px; }
li > p { margin-top: 0px; margin-bottom: 0px; }
dl.field-list.simple > dd.field-odd > ul.simple > li > ul { margin-left: 24px; }
dd.field-odd > ul.simple > li > ul > li > dl.simple { margin-bottom: -8px; }
/* --- Code blocks, Inline code, API highlighting --- */
/* Pygments highlighting is loaded separately—only container backgrounds here. */
div.highlight {
background-color: #f1f1ef !important;
border-left: 4px double #7ea6b3;
border-radius: 4px;
margin: 18px 0;
}
.highlight .hll { background-color: #ffffcc !important; border-radius: 5px; }
pre {
padding: 10px;
background-color: #e3e3e3;
color: #222;
line-height: 1.2em;
border: 1px solid #C6C9CB;
font-size: 1.1em;
margin: 1.5em 0 1.5em 0;
box-shadow: 1px 1px 1px #d8d8d8;
}
pre, div[class*="highlight-"] { clear: none; }
code {
background-color: #f7f7f7 !important;
color: #6e0e0e !important;
font-size: 0.9em;
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
font-weight: normal;
border-radius: 3px;
padding: 1px 4px;
}
.viewcode-back {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}
div.viewcode-block:target {
background-color: #f4e9d9;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
div.code-block-caption {
background-color: #ddd;
color: #222;
border: 1px solid #C6C9CB;
}
/* --- API/Class/Method Styling --- */
.class {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
font-size: 0.9em;
background-color: #f5ffff;
padding: 5px;
}
.method {
background-color: #e3ecec;
padding: 5px;
font-size: 1.0em;
}
.sig-param {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}
.sig-paren { margin-left: 1px; }
.property {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}
dl.class > dd > p,
dl.method > dd > p {
font-style: italic;
}
code.descname { font-size: 0.9em; }
.function { background-color: #eff; padding: 5px; }
.exception { background-color: #fff9f9; padding: 5px; }
div.linenodiv>pre {
font-size: 0.9em;
line-height: 153%;
padding-right: 0;
padding-top: 8px;
}
/* --- Develop branch warning header --- */
.develop {
background-color: #ffe4e4;
align-content: center;
width: auto;
text-align: center;
letter-spacing: 15px;
}
/* --- Miscellaneous Tweaks --- */
a {
color: #005B81;
text-decoration: underline;
text-decoration-color: #fff;
text-decoration-color: #bdcbdf;
}
a:hover {
color: #0492CA;
text-decoration: underline;
text-decoration-color: #9bbed5;
}
a:visited { color: #551A8B; }
a.headerlink { color: #7caeb7; font-size: 0.8em; padding: 0 4px 0 4px; text-decoration: none; }
a.headerlink:hover { color: #7caeb7; }
ul.sidebar-links { list-style: none; padding-left: 0; margin: 14px 0; }
ul.sidebar-links li { padding-bottom: 2px; }
/* --- Responsive Tweaks --- */
/* These media queries are for legacy mobile and tablet support. */
@media print, screen and (max-width: 960px) {
div.body { min-width: auto; max-width: none; padding: 0 30px 30px 30px; }
div.bodywrapper { margin-left: 0px; margin-top: 110px; }
div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; }
#top-link { display: none; }
}
@media print, screen and (max-width: 720px) {
div.related>ul { visibility: hidden; }
div.related>ul>li.nav-item.nav-item-0 { visibility: visible; }
}
@media print, screen and (max-width: 480px) {
div.body { box-sizing: border-box; padding: 5px; }
div.sphinxsidebar, div.document, div.documentwrapper, div.bodywrapper { width: 100%; }
}
/* ━━━━━━━━━━━━━━━━━━━ Sidebar Responsive Layout Fix ━━━━━━━━━━━━━━━━━━━ */
/* -- Force old-style left sidebar layout for Sphinx 7 --
Sphinx 7+ switched to a single-column mobile-first layout;
this hack restores flex-row with sidebar left/content right for desktop.
Remove this when upstream Sphinx supports left sidebars natively again.
*/
.document {
display: flex !important;
flex-direction: row !important;
align-items: flex-start;
width: 100%;
box-sizing: border-box;
}
/* Sidebar goes left, main content right */
.sphinxsidebar {
order: 0 !important;
width: 18vw !important;
min-width: 170px !important;
max-width: 228.891px !important; /* Magic number: matches live Evennia sidebar width at 1200px */
flex-shrink: 0 !important;
box-sizing: border-box;
position: static !important;
z-index: 10 !important;
background-clip: padding-box;
overflow-y: auto;
max-height: 100vh;
margin: 0 !important;
}
/* Main content fills remaining space */
.documentwrapper {
order: 1 !important;
flex: 1 1 0 !important; /* THIS is what fills the rest! */
min-width: 0 !important; /* Required for flex overflow to work */
width: auto !important;
max-width: none !important;
box-sizing: border-box;
margin: 0 !important; /* Remove any stray margin */
padding: 0 !important;
}
/* Mobile: Stack vertically again at 480px, matches legacy Sphinx/Evennia */
@media screen and (max-width: 480px) {
.document {
flex-direction: column !important;
}
.sphinxsidebar,
.documentwrapper {
width: 100% !important;
min-width: 0 !important;
max-width: 100vw !important;
}
.sphinxsidebar {
margin-bottom: 24px !important;
}
}
/* Avoid pop-under: clear floats just in case */
.clearer {
display: none !important;
}
/* End of Evennia custom CSS */

View file

@ -1,536 +0,0 @@
/*
* nature.css_t
* ~~~~~~~~~~~~
*
* Sphinx stylesheet -- nature theme.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@import url("basic.css");
@import url(https://fonts.googleapis.com/css?family=Arvo:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Open%20Sans:400,700,400italic);
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');
/* -- page layout ----------------------------------------------------------- */
body {
font-family:"Open Sans", Helvetica, Arial, sans-serif;
font-size: 100%;
background-color: #eee;
color: #555;
margin: 0;
padding: 0;
}
div.documentwrapper {
display: flex;
flex-wrap: wrap;
}
div.bodywrapper {
width: 79%;
box-sizing: border-box;
}
hr {
border: 1px solid #B1B4B6;
}
div.document {
background-color: #eeeeea;
max-width: 1090px;
}
div.body {
background-color: #f1f1ef;
color: #3E4349;
padding: 0 30px 30px 30px;
font-size: 0.9em;
margin-top: -9px;
}
div.footer {
color: #555;
width: 100%;
padding: 13px 0;
text-align: center;
font-size: 75%;
max-width:1080px;
}
div.footer a {
color: #444;
text-decoration: underline;
}
div.related {
background-color: #dbe9f0;
line-height: 32px;
color: #9FA0A0;
/*! text-shadow: 0px 1px 0 #444; */
font-size: 0.9em;
max-width: 1090px;
}
div.related a {
color: #565F62;
}
blockquote {
font-style: italic;
color: #797979;
background-color: #e1e8e2;
border: 1px solid #c7cdc8;
padding-left: 14px;
padding-right: 15px;
margin-left: 0;
width: 96%;
border-left-style: dotted;
border-left-width: medium;
}
blockquote:before {
content: "!";
float: left;
font-size: 230%;
opacity: 0.3;
padding-right: 5px;
}
div.sphinxsidebar {
font-size: 0.75em;
line-height: 1.5em;
}
div.sphinxsidebarwrapper{
padding: 20px 0;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: Arvo, sans-serif;
color: #4f4f4f;
font-size: 1.2em;
font-weight: normal;
margin: 0;
padding: 5px 10px;
background-color: #dbe9f0;
}
div.sphinxsidebar h4{
font-size: 1.1em;
}
div.sphinxsidebar h3 a {
color: #444;
}
div.sphinxsidebar p {
color: #888;
padding: 5px 20px;
}
div.sphinxsidebar p.topless {
}
div.sphinxsidebar ul {
margin: 10px 20px;
padding: 0;
color: #000;
}
div.sphinxsidebar a {
color: #444;
}
div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: Arvo, sans-serif;
font-size: 1em;
}
div.sphinxsidebar .searchformwrapper {
margin-left: 20px;
margin-right: 20px;
}
input {
background-color: #f7f7f7;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #005B81;
text-decoration: underline;
text-decoration-color: #fff;
text-decoration-color: #bdcbdf;
}
a:hover {
color: #0492CA;
text-decoration: underline;
text-decoration-color: #9bbed5;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: Arvo, Monaco, serif;
background-color: #f7f7f3;
font-weight: normal;
color: #212224;
margin: 30px 0px 10px 0px;
padding: 5px 0 5px 10px;
text-shadow: 0px 1px 0 white
border-bottom: 1px solid #d1d1d1;
border-left: 10px solid #cfdde8;
border-bottom: 1px solid #c6d7df;
}
div.body h1 {
margin-top: 20px solid #fff;
font-size: 230%;
}
div.body h2 {
font-size: 150%;
}
div.body h3 {
font-size: 120%;
}
div.body h4 {
font-size: 110%;
}
div.body h5 {
font-size: 100%;
}
div.body h6 {
font-size: 100%;
}
a.headerlink {
color: #7caeb7;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
}
a.headerlink:hover {
color: #7caeb7;
}
div.body p, div.body dd, div.body li {
line-height: 1.5em;
}
div.admonition p.admonition-title + p {
display: inline;
}
p.admonition-title {
margin-right: 0.2em;
}
div.highlight {
background-color: #f1f1ef;
border-left: 4px;
border-color: #7ea6b3;
border-left-style: double;
}
.highlight .hll {
background-color: #ffffcc54 !important;
border-radius: 5px;
}
/* Shell code style (for in-game blocks) */
div.highlight-shell.notranslate > div.highlight .nb{
color: white !important;
}
div.highlight-shell.notranslate > div.highlight .m{
color: white !important;
font-weight: normal !important;
}
div.highlight-shell.notranslate > div.highlight .k{
color: white !important;
font-weight: normal !important;
}
div.highlight-shell.notranslate > div.highlight .o{
color: white !important;
font-weight: normal !important;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
font-style: italic;
text-indent: -2.9em;
padding-left: 3.5em;
}
div.note > p {
text-indent: 0em;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
font-style: italic;
text-indent: -4.6em;
padding-left: 5.2em;
}
div.warning > p {
text-indent: 0em;
}
div.important {
text-indent: -5.5em;
padding-left: 6.1em;
}
div.important > p {
text-indent: 0em;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
li > p:first-child {
margin-top: 0px;
margin-bottom: 0px;
}
li > p {
margin-top: 0px;
margin-bottom: 0px;
}
/* The indents of kwarg - lists in api docs */
dl.field-list.simple > dd.field-odd > ul.simple > li > ul {
margin-left: 24px;
}
dd.field-odd > ul.simple > li > ul > li > dl.simple {
margin-bottom: -8px;
}
.admonition.important {
background-color: #fbf7c3;
border: 1px solid #c8c59b;
font-style: italic;
}
.admonition.note {
background-color: #e1e8e2;
}
pre {
padding: 10px;
background-color: #e3e3e3;
color: #222;
line-height: 1.2em;
border: 1px solid #C6C9CB;
font-size: 1.1em;
margin: 1.5em 0 1.5em 0;
-webkit-box-shadow: 1px 1px 1px #d8d8d8;
-moz-box-shadow: 1px 1px 1px #d8d8d8;
}
code {
background-color: #ecf0f3;
color: #6e0e0e;
/* padding: 1px 2px; */
font-size: 0.9em;
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
font-weight: normal;
background-color: #f7f7f7;
}
.viewcode-back {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}
div.viewcode-block:target {
background-color: #f4e9d9;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
div.code-block-caption {
background-color: #ddd;
color: #222;
border: 1px solid #C6C9CB;
}
.logo {
padding-left: 1px;
margin-left: auto;
margin-right: auto;
display: block;
margin-top: -12px;
opacity: 0.8;
}
.versionadded {
background-color: #e9f6e1;
}
.versionchanged {
background-color: #b7e6e8;
padding-left: 10px;
}
.deprecated {
background-color: #fff3f3;
}
/* API-docs custom coloring */
.class {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
font-size: 0.9em;
background-color: #f5ffff;
padding: 5px;
}
.method {
background-color: #e3ecec;
padding: 5px;
font-size: 1.0em;
}
.sig-param {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}
.sig-paren {
margin-left: 1px;
}
.property {
font-family: "Courier Prime", Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
}
dl.class > dd > p {
font-style: italic;
}
dl.method > dd > p {
font-style: italic;
}
code.descname {
font-size: 0.9em;
}
.function {
background-color: #eff;
padding: 5px;
}
.exception {
background-color: #fff9f9;
padding: 5px;
}
div.linenodiv>pre {
font-size: 0.9em;
line-height: 153%;
padding-right: 0;
padding-top: 8px;
}
/* The develop-branch warning header */
.develop {
background-color: #ffe4e4;
align-content: center;
width: auto;
text-align: center;
letter-spacing: 15px;
}
/* -- screen sizes ------------------------------------------------------------------ */
@media print, screen and (max-width: 960px) {
div.body {
min-width: auto;
max-width: none;
padding: 0 30px 30px 30px;
}
div.bodywrapper {
margin-left: 0px;
margin-top: 110px;
}
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
}
#top-link {
display: none;
}
}
@media print, screen and (max-width: 720px) {
div.related>ul {
visibility: hidden;
}
div.related>ul>li.nav-item.nav-item-0 {
visibility: visible;
}
}
@media print, screen and (max-width: 480px) {
div.body {
box-sizing: border-box;
padding: 5px;
}
/*
* At screen sizes this small, the sidebar stacks on top
* of the main content, so they both are 100% width.
*/
div.sphinxsidebar {
width: 100%;
}
div.document,
div.documentwrapper,
div.bodywrapper {
width: 100%;
}
}

View file

@ -1,542 +0,0 @@
/*
* searchtools.js
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
if (!Scorer) {
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array query, [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// Evennia optimized scorer
score: function(inquery, result) {
query = inquery.toLowerCase();
var title = result[1].toLowerCase().replace(/<\/?[^>]+(>|$)/g, "");
var score = result[4];
var mscore = score;
if (query === title) {
mscore = score * 10;
}
else if (title.startsWith(query)) {
mscore = score * 8;
if (title.startsWith("evennia.")) {
mscore *= 0.2;
}
}
else if (title.includes(query)) {
mscore = score * 7;
if (title.startsWith("evennia.")) {
mscore *= 0.2;
}
}
else {
mscore = score * 0.5;
}
// console.log("result: " + title + ", " + score + "->" + mscore);
return mscore;
},
// query matches the full name of an object
objNameMatch: 3,
// or matches in the last dotted part of the object name
objPartialMatch: 2,
// Additive scores depending on the priority of the object
objPrio: {0: 3, // used to be importantResults
1: 2, // used to be objectResults
2: -15}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 12,
partialTitle: 3,
// query found in terms
term: 2,
partialTerm: 1
};
}
if (!splitQuery) {
function splitQuery(query) {
return query.split(/\s+/);
}
}
/**
* Search Module
*/
var Search = {
_index : null,
_queued_query : null,
_pulse_status : -1,
htmlToText : function(htmlString) {
var htmlElement = document.createElement('span');
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
if(docContent === undefined) {
console.warn("Content block not found. Sphinx search tries to obtain it " +
"via '[role=main]'. Could you check your theme or template.");
return "";
}
return docContent.textContent || docContent.innerText;
},
init : function() {
var params = $.getQueryParameters();
if (params.q) {
var query = params.q[0];
$('input[name="q"]')[0].value = query;
this.performSearch(query);
}
},
loadIndex : function(url) {
$.ajax({type: "GET", url: url, data: null,
dataType: "script", cache: true,
complete: function(jqxhr, textstatus) {
if (textstatus != "success") {
document.getElementById("searchindexloader").src = url;
}
}});
},
setIndex : function(index) {
var q;
this._index = index;
if ((q = this._queued_query) !== null) {
this._queued_query = null;
Search.query(q);
}
},
hasIndex : function() {
return this._index !== null;
},
deferQuery : function(query) {
this._queued_query = query;
},
stopPulse : function() {
this._pulse_status = 0;
},
startPulse : function() {
if (this._pulse_status >= 0)
return;
function pulse() {
var i;
Search._pulse_status = (Search._pulse_status + 1) % 4;
var dotString = '';
for (i = 0; i < Search._pulse_status; i++)
dotString += '.';
Search.dots.text(dotString);
if (Search._pulse_status > -1)
window.setTimeout(pulse, 500);
}
pulse();
},
/**
* perform a search for something (or wait until index is loaded)
*/
performSearch : function(query) {
// create the required interface elements
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p class="search-summary">&nbsp;</p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
this.startPulse();
// index already loaded, the browser was quick!
if (this.hasIndex())
this.query(query);
else
this.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query : function(query) {
var i;
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
var searchterms = [];
var excluded = [];
var hlterms = [];
var tmp = splitQuery(query);
var objectterms = [];
for (i = 0; i < tmp.length; i++) {
if (tmp[i] !== "") {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
// skip this "word"
continue;
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
// prevent stemmer from cutting word smaller than two chars
if(word.length < 3 && tmp[i].length >= 3) {
word = tmp[i];
}
var toAppend;
// select the correct list
if (word[0] == '-') {
toAppend = excluded;
word = word.substr(1);
}
else {
toAppend = searchterms;
hlterms.push(tmp[i].toLowerCase());
}
// only add if not already in the list
if (!$u.contains(toAppend, word))
toAppend.push(word);
}
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
// console.debug('SEARCH: searching for:');
// console.info('required: ', searchterms);
// console.info('excluded: ', excluded);
// prepare search
var terms = this._index.terms;
var titleterms = this._index.titleterms;
// array of [filename, title, anchor, descr, score]
var results = [];
$('#search-progress').empty();
// lookup as object
for (i = 0; i < objectterms.length; i++) {
var others = [].concat(objectterms.slice(0, i),
objectterms.slice(i+1, objectterms.length));
results = results.concat(this.performObjectSearch(objectterms[i], others));
}
// lookup as search terms in fulltext
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) {
for (i = 0; i < results.length; i++)
results[i][4] = Scorer.score(query, results[i]);
}
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort(function(a, b) {
var left = a[4];
var right = b[4];
if (left > right) {
return 1;
} else if (left < right) {
return -1;
} else {
// same score: sort alphabetically
left = a[1].toLowerCase();
right = b[1].toLowerCase();
return (left > right) ? -1 : ((left < right) ? 1 : 0);
}
});
// for debugging
//Search.lastresults = results.slice(); // a copy
//console.info('search results:', Search.lastresults);
// print the results
var resultCount = results.length;
function displayNextItem() {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
dirname = dirname.substring(0, dirname.length-6);
} else if (dirname == 'index/') {
dirname = '';
}
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
}
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}});
} else {
// no source available, just display title
Search.output.append(listItem);
listItem.slideDown(5, function() {
displayNextItem();
});
}
}
// search finished, update title and status message
else {
Search.stopPulse();
Search.title.text(_('Search Results'));
if (!resultCount)
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
else
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
Search.status.fadeIn(500);
}
}
displayNextItem();
},
/**
* search for object names
*/
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var docnames = this._index.docnames;
var objects = this._index.objects;
var objnames = this._index.objnames;
var titles = this._index.titles;
var i;
var results = [];
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
var score = 0;
var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
if (otherterms.length > 0) {
var haystack = (prefix + ' ' + name + ' ' +
objname + ' ' + title).toLowerCase();
var allfound = true;
for (i = 0; i < otherterms.length; i++) {
if (haystack.indexOf(otherterms[i]) == -1) {
allfound = false;
break;
}
}
if (!allfound) {
continue;
}
}
var descr = objname + _(', in ') + title;
var anchor = match[3];
if (anchor === '')
anchor = fullname;
else if (anchor == '-')
anchor = objnames[match[1]][1] + '-' + fullname;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2])) {
score += Scorer.objPrio[match[2]];
} else {
score += Scorer.objPrioDefault;
}
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
}
}
}
return results;
},
/**
* search for full-text terms in the index
*/
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
var docnames = this._index.docnames;
var filenames = this._index.filenames;
var titles = this._index.titles;
var i, j, file;
var fileMap = {};
var scoreMap = {};
var results = [];
// perform the search on the required terms
for (i = 0; i < searchterms.length; i++) {
var word = searchterms[i];
var files = [];
var _o = [
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
// add support for partial matches
if (word.length > 2) {
for (var w in terms) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
}
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
break;
}
// found search word in contents
$u.each(_o, function(o) {
var _files = o.files;
if (_files === undefined)
return
if (_files.length === undefined)
_files = [_files];
files = files.concat(_files);
// set score for the word in each file to Scorer.term
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
}
}
// now check if the files don't contain excluded terms
for (file in fileMap) {
var valid = true;
// check if all requirements are matched
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length
if (
fileMap[file].length != searchterms.length &&
fileMap[file].length != filteredTermCount
) continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
if (terms[excluded[i]] == file ||
titleterms[excluded[i]] == file ||
$u.contains(terms[excluded[i]] || [], file) ||
$u.contains(titleterms[excluded[i]] || [], file)) {
valid = false;
break;
}
}
// if we have still a valid result we can add it to the result list
if (valid) {
// select one (max) score for the file.
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
}
}
return results;
},
/**
* helper function to return a node containing the
* search summary for a given text. Keywords is a list
* of stemmed words, hlwords is the list of normal, unstemmed
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
var i = textLower.indexOf(this.toLowerCase());
if (i > -1)
start = i;
});
start = Math.max(start - 120, 0);
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
var rv = $('<div class="context"></div>').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
return rv;
}
};
$(document).ready(function() {
Search.init();
});

View file

@ -1,236 +0,0 @@
{#
basic/layout.html
~~~~~~~~~~~~~~~~~
Master layout template for Sphinx themes.
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}{%- if html5_doctype %}
<!DOCTYPE html>
{%- else %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{%- endif %}{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &#187;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{# XXX necessary? #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &#8212; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- macro relbar() %}
<div class="related" role="navigation" aria-label="related navigation">
<h3>{{ _('Navigation') }}</h3>
<ul>
{%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
{%- endfor %}
{%- block rootrellink %}
<li class="nav-item nav-item-0"><a href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }} {{ release }}</a>{{ reldelim1 }}</li>
{%- endblock %}
{%- for parent in parents %}
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
{%- endfor %}
<li class="nav-item nav-item-this"><a href="{{ link|e }}">{{ title }}</a></li>
{%- block relbaritems %} {% endblock %}
</ul>
</div>
{%- endmacro %}
{%- macro sidebar() %}
{%- if render_sidebar %}
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc)|e }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- if sidebars != None %}
{#- new style sidebar: explicitly include/exclude templates #}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}
{%- include "localtoc.html" %}
{%- endblock %}
{%- block sidebarrel %}
{%- include "relations.html" %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- include "sourcelink.html" %}
{%- endblock %}
{%- if customsidebar %}
{%- include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- include "searchbox.html" %}
{%- endblock %}
{%- endif %}
</div>
</div>
{%- endif %}
{%- endmacro %}
{%- macro script() %}
<script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- for js in script_files %}
{{ js_tag(js) }}
{%- endfor %}
{%- endmacro %}
{%- macro css() %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1)|e }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %}
{%- if css|attr("filename") %}
{{ css_tag(css) }}
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
{%- endif %}
{%- endfor %}
{%- endmacro %}
{%- if html_tag %}
{{ html_tag }}
{%- else %}
<html{% if not html5_doctype %} xmlns="http://www.w3.org/1999/xhtml"{% endif %}{% if language is not none %} lang="{{ language }}"{% endif %}>
{%- endif %}
<head>
{%- if not html5_doctype and not skip_ua_compatible %}
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
{%- endif %}
{%- if use_meta_charset or html5_doctype %}
<meta charset="{{ encoding }}" />
{%- else %}
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
{%- endif %}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{- metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{%- block css %}
{{- css() }}
{%- endblock %}
{%- if not embedded %}
{%- block scripts %}
{{- script() }}
{%- endblock %}
{%- if pageurl %}
<link rel="canonical" href="{{ pageurl|e }}" />
{%- endif %}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1)|e }}"/>
{%- endif %}
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
</head>
{%- block body_tag %}<body>{% endblock %}
{%- block header %}
{% if current_is_legacy %}
<div class="admonition important">
<p class="first admonition-title">Note</p>
<p class="last">You are reading an old version of the Evennia documentation. <a href="https://www.evennia.com/docs/latest/index.html">The latest version is here</a></p>.
</div>
{% endif %}
{% endblock %}
{%- block relbar1 %}{{ relbar() }}{% endblock %}
{%- block content %}
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
<div class="document">
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
<div class="bodywrapper">
{%- endif %}
<div class="body" role="main">
{% block body %} {% endblock %}
</div>
{%- if render_sidebar %}
</div>
{%- endif %}
</div>
{%- endblock %}
</div>
{%- endblock %}
{%- block relbar2 %}{{ relbar() }}{% endblock %}
{%- block footer %}
{% if current_is_legacy %}
<div class="admonition important">
<p class="first admonition-title">Note</p>
<p class="last">You are reading an old version of the Evennia documentation. <a href="https://www.evennia.com/docs/latest/index.html">The latest version is here</a></p>.
</div>
{% endif %}
<div class="footer" role="contentinfo">
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
{%- endblock %}
</body>
</html>

View file

@ -1,13 +1,15 @@
{% if versions %} {% if versions or legacy_versions %}
<h3>{{ _('Doc Versions') }}</h3> <h3>{{ _('Doc Versions') }}</h3>
<ul> <ul>
{% for item in versions %} {% for item in versions %}
<li><a href="{{ item.url }}">{{ item.release }} ({{ item.name }} branch)</a></li> <li>
{%- endfor %} <a href="{{ item.url }}">{{ item.release }} ({{ item.name }} branch)</a>
{% if legacy_versions %} </li>
{%- for item in legacy_versions %} {% endfor %}
<li><a href="{{ item.url }}">{{ item.branch }} branch (outdated)</a></li> {% for item in legacy_versions %}
<li>
<a href="{{ item.url }}">{{ item.release }} branch (outdated)</a>
</li>
{% endfor %} {% endfor %}
{% endif %}
</ul> </ul>
{% endif %} {% endif %}

View file

@ -22,10 +22,18 @@ author = "The Evennia developer community"
# This will be used for multi-version selection options. # This will be used for multi-version selection options.
release = "latest" release = "latest"
# -- Add Sphinx 7.X Custom CSS -----------------------------------------------
html_static_path = ["_static"]
html_css_files = [
"custom.css",
]
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
extensions = [ extensions = [
"sphinx_multiversion", #"sphinx_multiversion",
"sphinx.ext.napoleon", "sphinx.ext.napoleon",
"sphinx.ext.autosectionlabel", "sphinx.ext.autosectionlabel",
"sphinx.ext.viewcode", "sphinx.ext.viewcode",
@ -53,10 +61,10 @@ html_static_path = ["_static"]
# which branches to include in multi-versioned docs # which branches to include in multi-versioned docs
# smv_branch_whitelist = r"^develop$|^v[0-9\.]+?$" # smv_branch_whitelist = r"^develop$|^v[0-9\.]+?$"
# smv_branch_whitelist = r"^develop$|^master$|^v1.0$" # smv_branch_whitelist = r"^develop$|^master$|^v1.0$"
smv_branch_whitelist = r"^main$" #smv_branch_whitelist = r"^main$"
smv_outputdir_format = "{config.release}" #smv_outputdir_format = "{config.release}"
# don't make docs for tags # don't make docs for tags
smv_tag_whitelist = r"^$" #smv_tag_whitelist = r"^$"
# used to fill in versioning.html links for versions that are not actually built. # used to fill in versioning.html links for versions that are not actually built.
# These are also read from the deploy.py script. These are also the names of # These are also read from the deploy.py script. These are also the names of
@ -65,19 +73,30 @@ latest_version = "latest"
legacy_versions = ["5.x", "4.x", "3.x", "2.x", "1.x", "0.x"] legacy_versions = ["5.x", "4.x", "3.x", "2.x", "1.x", "0.x"]
legacy_branches = ["v5.0.0", "v4.0.0", "v3.0.0", "v2.0.0", "v1.0.0", "v0.9.5"] legacy_branches = ["v5.0.0", "v4.0.0", "v3.0.0", "v2.0.0", "v1.0.0", "v0.9.5"]
DOCS_BASE = "https://www.evennia.com/docs/"
def add_legacy_versions_to_html_page_context(app, pagename, templatename, context, doctree): def add_legacy_versions_to_html_page_context(app, pagename, templatename, context, doctree):
# this is read by versioning.html template (sidebar) # Add "latest" (main) version
context["versions"] = [
# set this when building legacy docs, to show the 'you are reading an old version' headers {
current_is_legacy = False "release": "latest",
"name": "main",
"url": f"{DOCS_BASE}latest/index.html"
}
]
# Add legacy versions
LVersion = namedtuple("legacy_version", ["release", "name", "url", "branch"]) LVersion = namedtuple("legacy_version", ["release", "name", "url", "branch"])
context["legacy_versions"] = [ context["legacy_versions"] = [
LVersion(release=f"{vers}", name=f"v{vers}", url=f"../{vers}/index.html", branch=branch) LVersion(
for (vers, branch) in zip(legacy_versions, legacy_branches) release=branch, # e.g. v5.0.0
name=vers, # e.g. 5.x
url=f"{DOCS_BASE}{vers}/index.html", # absolute path!
branch=branch
)
for vers, branch in zip(legacy_versions, legacy_branches)
] ]
context["current_is_legacy"] = current_is_legacy context["current_is_legacy"] = False
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------