浏览代码

Add logo and custom CSS for the API docs

JC Brand 6 年之前
父节点
当前提交
76b32bea92
共有 3 个文件被更改,包括 119 次插入1 次删除
  1. 48 0
      docs/source/_static/api.css
  2. 65 0
      docs/source/_templates/jsdoc_layout.tmpl
  3. 6 1
      docs/source/conf.json

+ 48 - 0
docs/source/_static/api.css

@@ -0,0 +1,48 @@
+body {
+  font-size: 1.2rem;
+}
+
+.brand-heading {
+  display: flex;
+}
+
+.brand-heading__text {
+  font-size: 6rem;
+  margin-left: 1rem;
+  margin-top: -1rem;
+}
+
+.subdued {
+  color: darkgray;
+}
+
+.byline {
+  font-size: 30%;
+  margin-top: 0;
+}
+
+h2 {
+  font-size: 45px;
+}
+
+h3 {
+  font-size: 35px;
+}
+
+h4 {
+  font-size: 30px;
+  margin-top: 40px;
+}
+
+p {
+  font-size: 1.3rem;
+}
+
+.details {
+  margin-bottom: 20px;
+}
+
+.prettyprint code {
+  padding: 8px 12px;
+  font-family: courier;
+}

+ 65 - 0
docs/source/_templates/jsdoc_layout.tmpl

@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: <?js= title ?></title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+    <link type="text/css" rel="stylesheet" href="/docs/source/_static/api.css">
+</head>
+
+<body>
+
+<div id="main">
+    <h1 class="brand-heading fade-in">
+        <svg 
+            style="height: 8rem"
+            xmlns:svg="http://www.w3.org/2000/svg"
+            xmlns="http://www.w3.org/2000/svg"
+            xmlns:xlink="http://www.w3.org/1999/xlink"
+            viewBox="0 0 364 364">
+        <title>Converse</title>
+        <g class="cls-1" id="g904">
+            <g data-name="Layer 2">
+                <g data-name="Layer 7">
+                    <path
+                        class="cls-3"
+                        d="M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z" />
+                    <path
+                        class="cls-4"
+                        d="M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z" />
+                </g>
+            </g>
+        </g>
+    </svg>
+    <span class="brand-heading__text">
+        <span>converse<span class="subdued">.js</span></span>
+        <p class="byline">API Documentation</p>
+    </span>
+    </h1>
+
+    <h1 class="page-title"><?js= title ?></h1>
+
+    <?js= content ?>
+</div>
+
+<nav>
+    <?js= this.nav ?>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc <?js= env.version.number ?></a><?js if(env.conf.templates && env.conf.templates.default && env.conf.templates.default.includeDate !== false) { ?> on <?js= (new Date()) ?><?js } ?>
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>

+ 6 - 1
docs/source/conf.json

@@ -1,3 +1,8 @@
 {
-    "plugins": ["plugins/markdown"]
+    "plugins": ["plugins/markdown"],
+    "templates": {
+        "default": {
+            "layoutFile": "_templates/jsdoc_layout.tmpl"
+        }
+    }
 }