Explorar o código

Show the sponsors in the sphinx docs

JC Brand %!s(int64=6) %!d(string=hai) anos
pai
achega
5d97445d3e

+ 1 - 1
buildout.cfg

@@ -11,4 +11,4 @@ eggs =
     sphinx-bootstrap-theme
 
 [versions]
-Sphinx = 1.7.5
+Sphinx = 1.8.1

+ 2 - 2
css/website.css

@@ -5865,7 +5865,7 @@ ul.features {
 .sponsors {
   clear: both;
   font-size: 1.4em;
-  padding: 2em 0 6em 0; }
+  padding: 0 0 4em 0; }
   .sponsors ul {
     padding: 0; }
 
@@ -5881,6 +5881,6 @@ ul.features {
 
 .sponsors-text {
   text-align: left;
-  padding: 0 0 2em 0; }
+  padding: 0 0 1em 0; }
 
 /*# sourceMappingURL=website.css.map */

+ 24 - 1
docs/source/_static/style.css

@@ -37,8 +37,31 @@ h5 {
     padding-left: 15px;
 }
 
+.bs-sidenav .sponsors-list li a:hover {
+    background-color: transparent;
+    border: none;
+}
+
+.sponsors-list li a {
+    text-align: center;
+}
+
+.centered-text-container {
+    display: block;
+    width: 100%;
+    text-align: center;
+}
+
+.patreon-link-container {
+    margin: 0.5em 0 1em 0;
+}
+
+.patreon-link-container a {
+    font-size: 85%;
+}
+
 #sidebar > .nav-list {
-    max-height: 70vh;
+    max-height: 48vh;
     overflow-y: scroll;
 }
 

+ 16 - 0
docs/source/_templates/sponsors.html

@@ -0,0 +1,16 @@
+<span class="centered-text-container">
+<h3 class="sidebar-title">Sponsored by</h3>
+</span>
+<ul class="sponsors-list">
+    <li><a href="https://www.keycdn.com/?utm_source=conversejs" target="_blank" rel="noopener">
+            <img style="height: 2em" src="/logo/keycdn.png" alt="KeyCDN">
+        </a>
+    </li>
+    <li><a href="https://wikisuite.org/?utm_source=conversejs" target="_blank" rel="noopener">
+            <img style="height: 3em" src="/logo/wikisuite.png" alt="WikiSuite">
+        </a>
+    </li>
+</ul>
+<span class="centered-text-container patreon-link-container">
+<a href="https://conversejs.org#sponsors">Become a sponsor</a>
+</span>

+ 1 - 1
docs/source/conf.py

@@ -177,7 +177,7 @@ html_favicon = "_static/favicon.ico"
 #html_use_smartypants = True
 
 # Custom sidebar templates, maps document names to template names.
-html_sidebars = {'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html']}
+html_sidebars = {'**': ['sponsors.html', 'localtoc.html', 'sourcelink.html', 'searchbox.html']}
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.

+ 4 - 2
index.html

@@ -231,6 +231,9 @@
                        <a href="https://liberapay.com/jcbrand" target="_blank" rel="noopener">Liberapay</a> or
                        <a href="https://opkode.com/contact.html" target="_blank" rel="noopener">contact us</a>.
                     </p>
+                    <p>Sponsorships of €50 or more will appear on this website and the online
+                       <a href="/docs/html/index.html">Converse documentation</a>.
+                    </p>
                 </div>
             </div>
         </div>
@@ -356,8 +359,7 @@
     */
     converse.initialize({
         // Please use this connection manager only for testing purposes
-        bosh_service_url: 'https://conversejs.org/http-bind/',
-        show_controlbox_by_default: true
+        bosh_service_url: 'https://conversejs.org/http-bind/'
     });
 </script>
 </html>

+ 2 - 2
sass/website.scss

@@ -411,7 +411,7 @@ ul.features {
 .sponsors {
     clear: both;
     font-size: 1.4em;
-    padding: 2em 0 6em 0;
+    padding: 0 0 4em 0;
     ul {
         padding: 0;
     }
@@ -428,5 +428,5 @@ ul.features {
 }
 .sponsors-text {
     text-align: left;
-    padding: 0 0 2em 0;
+    padding: 0 0 1em 0;
 }