Initial commit

This commit is contained in:
Matthew Holt 2020-01-24 12:47:52 -07:00
commit 03b6fddeb0
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
77 changed files with 7599 additions and 0 deletions

View file

@ -0,0 +1,155 @@
/*
Derived from https://gist.github.com/nicolashery/5765395
Adjusted to be high-contrast
*/
/*
Solarized Light (High Contrast)
Derived from http://ethanschoonover.com/solarized
*/
.chroma { background-color: #f0f9fb; color: #586e75 }
.chroma .c { color: #93a1a1 } /* Comment */
.chroma .err { color: #586e75 } /* Error */
.chroma .g { color: #586e75 } /* Generic */
.chroma .k { color: #577b00 } /* Keyword */
.chroma .l { color: #586e75 } /* Literal */
.chroma .n { color: #586e75 } /* Name */
.chroma .o { color: #577b00 } /* Operator */
.chroma .x { color: #d03d00 } /* Other */
.chroma .p { color: #586e75 } /* Punctuation */
.chroma .cm { color: #93a1a1 } /* Comment.Multiline */
.chroma .cp { color: #577b00 } /* Comment.Preproc */
.chroma .c1 { color: #93a1a1 } /* Comment.Single */
.chroma .cs { color: #577b00 } /* Comment.Special */
.chroma .gd { color: #008076 } /* Generic.Deleted */
.chroma .ge { color: #586e75; font-style: italic } /* Generic.Emph */
.chroma .gr { color: #dc322f } /* Generic.Error */
.chroma .gh { color: #d03d00 } /* Generic.Heading */
.chroma .gi { color: #577b00 } /* Generic.Inserted */
.chroma .go { color: #586e75 } /* Generic.Output */
.chroma .gp { color: #586e75 } /* Generic.Prompt */
.chroma .gs { color: #586e75; font-weight: bold } /* Generic.Strong */
.chroma .gu { color: #d03d00 } /* Generic.Subheading */
.chroma .gt { color: #586e75 } /* Generic.Traceback */
.chroma .kc { color: #d03d00 } /* Keyword.Constant */
.chroma .kd { color: #0673bf } /* Keyword.Declaration */
.chroma .kn { color: #577b00 } /* Keyword.Namespace */
.chroma .kp { color: #577b00 } /* Keyword.Pseudo */
.chroma .kr { color: #0673bf } /* Keyword.Reserved */
.chroma .kt { color: #dc322f } /* Keyword.Type */
.chroma .ld { color: #586e75 } /* Literal.Date */
.chroma .m { color: #008076 } /* Literal.Number */
.chroma .s { color: #008076 } /* Literal.String */
.chroma .na { color: #586e75 } /* Name.Attribute */
.chroma .nb { color: #B58900 } /* Name.Builtin */
.chroma .nc { color: #0673bf } /* Name.Class */
.chroma .no { color: #d03d00 } /* Name.Constant */
.chroma .nd { color: #0673bf } /* Name.Decorator */
.chroma .ni { color: #d03d00 } /* Name.Entity */
.chroma .ne { color: #d03d00 } /* Name.Exception */
.chroma .nf { color: #0673bf } /* Name.Function */
.chroma .nl { color: #586e75 } /* Name.Label */
.chroma .nn { color: #586e75 } /* Name.Namespace */
.chroma .nx { color: #586e75 } /* Name.Other */
.chroma .py { color: #586e75 } /* Name.Property */
.chroma .nt { color: #0673bf } /* Name.Tag */
.chroma .nv { color: #0673bf } /* Name.Variable */
.chroma .ow { color: #577b00 } /* Operator.Word */
.chroma .w { color: #586e75 } /* Text.Whitespace */
.chroma .mf { color: #008076 } /* Literal.Number.Float */
.chroma .mh { color: #008076 } /* Literal.Number.Hex */
.chroma .mi { color: #008076 } /* Literal.Number.Integer */
.chroma .mo { color: #008076 } /* Literal.Number.Oct */
.chroma .sb { color: #93a1a1 } /* Literal.String.Backtick */
.chroma .sc { color: #008076 } /* Literal.String.Char */
.chroma .sd { color: #586e75 } /* Literal.String.Doc */
.chroma .s2 { color: #008076 } /* Literal.String.Double */
.chroma .se { color: #d03d00 } /* Literal.String.Escape */
.chroma .sh { color: #586e75 } /* Literal.String.Heredoc */
.chroma .si { color: #008076 } /* Literal.String.Interpol */
.chroma .sx { color: #008076 } /* Literal.String.Other */
.chroma .sr { color: #dc322f } /* Literal.String.Regex */
.chroma .s1 { color: #008076 } /* Literal.String.Single */
.chroma .ss { color: #008076 } /* Literal.String.Symbol */
.chroma .bp { color: #0673bf } /* Name.Builtin.Pseudo */
.chroma .vc { color: #0673bf } /* Name.Variable.Class */
.chroma .vg { color: #0673bf } /* Name.Variable.Global */
.chroma .vi { color: #0673bf } /* Name.Variable.Instance */
.chroma .il { color: #008076 } /* Literal.Number.Integer.Long */
@media (prefers-color-scheme: dark) {
/*
Solarized Dark (High Contrast)
Derived from http://ethanschoonover.com/solarized
*/
.chroma { background-color: #002b36; color: #93a1a1 }
.chroma .c { color: #586e75 } /* Comment */
.chroma .err { color: #93a1a1 } /* Error */
.chroma .g { color: #93a1a1 } /* Generic */
.chroma .k { color: #76a507 } /* Keyword */
.chroma .l { color: #93a1a1 } /* Literal */
.chroma .n { color: #93a1a1 } /* Name */
.chroma .o { color: #76a507 } /* Operator */
.chroma .x { color: #ec662e } /* Other */
.chroma .p { color: #93a1a1 } /* Punctuation */
.chroma .cm { color: #586e75 } /* Comment.Multiline */
.chroma .cp { color: #76a507 } /* Comment.Preproc */
.chroma .c1 { color: #586e75 } /* Comment.Single */
.chroma .cs { color: #76a507 } /* Comment.Special */
.chroma .gd { color: #09a598 } /* Generic.Deleted */
.chroma .ge { color: #93a1a1; font-style: italic } /* Generic.Emph */
.chroma .gr { color: #dc322f } /* Generic.Error */
.chroma .gh { color: #ec662e } /* Generic.Heading */
.chroma .gi { color: #76a507 } /* Generic.Inserted */
.chroma .go { color: #93a1a1 } /* Generic.Output */
.chroma .gp { color: #93a1a1 } /* Generic.Prompt */
.chroma .gs { color: #93a1a1; font-weight: bold } /* Generic.Strong */
.chroma .gu { color: #ec662e } /* Generic.Subheading */
.chroma .gt { color: #93a1a1 } /* Generic.Traceback */
.chroma .kc { color: #ec662e } /* Keyword.Constant */
.chroma .kd { color: #0090f5 } /* Keyword.Declaration */
.chroma .kn { color: #76a507 } /* Keyword.Namespace */
.chroma .kp { color: #76a507 } /* Keyword.Pseudo */
.chroma .kr { color: #0090f5 } /* Keyword.Reserved */
.chroma .kt { color: #dc322f } /* Keyword.Type */
.chroma .ld { color: #93a1a1 } /* Literal.Date */
.chroma .m { color: #09a598 } /* Literal.Number */
.chroma .s { color: #09a598 } /* Literal.String */
.chroma .na { color: #93a1a1 } /* Name.Attribute */
.chroma .nb { color: #B58900 } /* Name.Builtin */
.chroma .nc { color: #0090f5 } /* Name.Class */
.chroma .no { color: #ec662e } /* Name.Constant */
.chroma .nd { color: #0090f5 } /* Name.Decorator */
.chroma .ni { color: #ec662e } /* Name.Entity */
.chroma .ne { color: #ec662e } /* Name.Exception */
.chroma .nf { color: #0090f5 } /* Name.Function */
.chroma .nl { color: #93a1a1 } /* Name.Label */
.chroma .nn { color: #93a1a1 } /* Name.Namespace */
.chroma .nx { color: #93a1a1 } /* Name.Other */
.chroma .py { color: #93a1a1 } /* Name.Property */
.chroma .nt { color: #0090f5 } /* Name.Tag */
.chroma .nv { color: #0090f5 } /* Name.Variable */
.chroma .ow { color: #76a507 } /* Operator.Word */
.chroma .w { color: #93a1a1 } /* Text.Whitespace */
.chroma .mf { color: #09a598 } /* Literal.Number.Float */
.chroma .mh { color: #09a598 } /* Literal.Number.Hex */
.chroma .mi { color: #09a598 } /* Literal.Number.Integer */
.chroma .mo { color: #09a598 } /* Literal.Number.Oct */
.chroma .sb { color: #586e75 } /* Literal.String.Backtick */
.chroma .sc { color: #09a598 } /* Literal.String.Char */
.chroma .sd { color: #93a1a1 } /* Literal.String.Doc */
.chroma .s2 { color: #09a598 } /* Literal.String.Double */
.chroma .se { color: #ec662e } /* Literal.String.Escape */
.chroma .sh { color: #93a1a1 } /* Literal.String.Heredoc */
.chroma .si { color: #09a598 } /* Literal.String.Interpol */
.chroma .sx { color: #09a598 } /* Literal.String.Other */
.chroma .sr { color: #dc322f } /* Literal.String.Regex */
.chroma .s1 { color: #09a598 } /* Literal.String.Single */
.chroma .ss { color: #09a598 } /* Literal.String.Symbol */
.chroma .bp { color: #0090f5 } /* Name.Builtin.Pseudo */
.chroma .vc { color: #0090f5 } /* Name.Variable.Class */
.chroma .vg { color: #0090f5 } /* Name.Variable.Global */
.chroma .vi { color: #0090f5 } /* Name.Variable.Instance */
.chroma .il { color: #09a598 } /* Literal.Number.Integer.Long */
}

View file

@ -0,0 +1,373 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Maven Pro, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
tab-size: 4;
-moz-tab-size: 4;
}
#v1-banner {
display: block;
background: #5ea9a2;
color: #fff;
text-align: center;
padding: 15px 25px;
font-size: 18px;
text-decoration: none;
}
#v1-banner:hover {
background: #4e968f;
}
.wrapper {
max-width: 1400px;
margin-left: auto;
margin-right: auto;
padding-left: 40px;
padding-right: 40px;
}
.text-center {
text-align: center;
}
a {
color: #0694f1;
text-decoration: none;
}
a:hover {
color: #ff3f2c;
}
header {
display: flex;
justify-content: space-between;
padding: 25px 0;
}
#logo {
height: 40px;
}
header nav {
text-align: right;
line-height: 40px;
}
header nav a {
display: inline-block;
padding-left: 10px;
padding-right: 10px;
text-decoration: none;
color: inherit;
}
header nav a:hover {
color: #ff3f2c;
}
header nav a.current {
font-weight: bold;
}
header nav .button {
margin: 0 0 0 10px;
padding-top: 2px;
padding-bottom: 2px;
}
.button {
border-radius: 2em;
padding: 10px 20px;
margin: 15px 30px 15px 0;
height: auto;
transition: all .2s;
text-decoration: none;
display: inline-block;
}
.button:hover {
transform: scale(1.05);
}
.button:active {
transform: translateY(2px);
}
.button.red {
background-color: #d9552b;
color: white;
}
.button.red:hover {
background-color: #fd511a;
}
.button.blue {
background-color: #009ae6;
color: white;
}
.button.blue:hover {
background-color: #00aaff;
}
.button.gray {
background-color: #4c6a79;
color: white;
}
.button.gray:hover {
background-color: #4f8098;
}
.button.big {
font-size: 125%;
text-transform: uppercase;
font-weight: bold;
padding: 20px 50px;
margin-right: 20px;
}
p .button {
font-size: 18px;
padding: 12px 30px;
}
article a:hover {
text-decoration: underline;
}
footer {
display: flex;
justify-content: space-between;
margin-top: 100px;
border-top: 1px solid #CCC;
padding-top: 50px;
padding-bottom: 100px;
line-height: 125%;
}
footer > div {
width: 50%;
}
#footer-logo {
float: left;
max-width: 175px;
margin-right: 35px;
vertical-align: middle;
margin-top: -4px;
}
.copyright {
text-align: right;
font-size: 14px;
color: #999;
}
@media (max-width: 900px) {
footer {
flex-direction: column;
margin-top: 0;
padding: 20px 0;
}
footer > div {
width: initial;
text-align: center;
margin: 10px 0;
}
#footer-logo {
float: none;
display: block;
margin: 0 auto 25px;
}
.copyright {
text-align: center;
}
}
/* font resources */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("/resources/fonts/Inter-Thin-BETA.woff2") format("woff2"),
url("/resources/fonts/Inter-Thin-BETA.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url("/resources/fonts/Inter-ThinItalic-BETA.woff2") format("woff2"),
url("/resources/fonts/Inter-ThinItalic-BETA.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url("/resources/fonts/Inter-ExtraLight-BETA.woff2") format("woff2"),
url("/resources/fonts/Inter-ExtraLight-BETA.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 200;
font-display: swap;
src: url("/resources/fonts/Inter-ExtraLightItalic-BETA.woff2") format("woff2"),
url("/resources/fonts/Inter-ExtraLightItalic-BETA.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url("/resources/fonts/Inter-Light-BETA.woff2") format("woff2"),
url("/resources/fonts/Inter-Light-BETA.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url("/resources/fonts/Inter-LightItalic-BETA.woff2") format("woff2"),
url("/resources/fonts/Inter-LightItalic-BETA.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("/resources/fonts/Inter-Regular.woff2") format("woff2"),
url("/resources/fonts/Inter-Regular.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url("/resources/fonts/Inter-Italic.woff2") format("woff2"),
url("/resources/fonts/Inter-Italic.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("/resources/fonts/Inter-Medium.woff2") format("woff2"),
url("/resources/fonts/Inter-Medium.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url("/resources/fonts/Inter-MediumItalic.woff2") format("woff2"),
url("/resources/fonts/Inter-MediumItalic.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("/resources/fonts/Inter-SemiBold.woff2") format("woff2"),
url("/resources/fonts/Inter-SemiBold.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url("/resources/fonts/Inter-SemiBoldItalic.woff2") format("woff2"),
url("/resources/fonts/Inter-SemiBoldItalic.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("/resources/fonts/Inter-Bold.woff2") format("woff2"),
url("/resources/fonts/Inter-Bold.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url("/resources/fonts/Inter-BoldItalic.woff2") format("woff2"),
url("/resources/fonts/Inter-BoldItalic.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url("/resources/fonts/Inter-ExtraBold.woff2") format("woff2"),
url("/resources/fonts/Inter-ExtraBold.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 800;
font-display: swap;
src: url("/resources/fonts/Inter-ExtraBoldItalic.woff2") format("woff2"),
url("/resources/fonts/Inter-ExtraBoldItalic.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("/resources/fonts/Inter-Black.woff2") format("woff2"),
url("/resources/fonts/Inter-Black.woff") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url("/resources/fonts/Inter-BlackItalic.woff2") format("woff2"),
url("/resources/fonts/Inter-BlackItalic.woff") format("woff");
}

View file

@ -0,0 +1,28 @@
pre > code.json {
background-color: #f0f9f8;
}
#renderbox {
border-radius: 0;
font-size: 20px;
line-height: 1.6em;
}
.toggle-obj {
padding: 0 .5em;
visibility: hidden;
}
.group:hover > .toggle-obj {
visibility: visible;
}
.collapsed {
display: none;
}
@media (prefers-color-scheme: dark) {
pre > code.json {
background-color: #07212b;
}
}

735
src/resources/css/docs.css Normal file
View file

@ -0,0 +1,735 @@
header {
border-bottom: 1px solid #f0f6f7;
padding: 10px 20px;
}
#logo-container {
display: flex;
align-items: center;
line-height: 0;
}
#logo {
height: 25px;
line-height: 0;
}
#logo-docs {
font-family: Montserrat, sans-serif;
text-transform: uppercase;
color: #196165;
margin-left: 10px;
font-size: 12px;
}
header nav {
font-size: 16px;
line-height: 2em;
}
header nav .button {
padding-top: 4px;
padding-bottom: 4px;
}
.breadcrumbs {
color: #196165;
border-bottom: 1px solid #f0f6f7;
font-size: 16px;
padding: 10px 20px;
font-weight: bold;
line-height: 1.75em;
}
.breadcrumbs a {
font-weight: normal;
text-decoration: none;
}
.breadcrumb-siblings-title {
padding: 10px;
font-weight: bold;
}
.breadcrumb-siblings a {
display: block;
padding: 0 10px;
text-decoration: none;
}
.breadcrumb-siblings a+a {
padding-top: 10px;
}
.breadcrumb-siblings a:last-child {
padding-bottom: 10px;
}
#top-breadcrumb {
font-weight: bold;
}
#top-breadcrumb:not(:hover) {
color: #196165;
}
main {
display: flex;
}
main > .sidebar,
article aside {
width: 20%;
}
main > .sidebar {
flex-shrink: 0;
padding: 20px 0;
border: 0px solid #f0f6f7;
}
main nav {
border-right-width: 1px;
position: relative;
font-size: 18px;
}
main nav ul {
list-style-type: none;
}
main nav li {
position: relative;
}
main nav li a {
padding: 8px 22px;
}
main nav li a {
display: block;
text-decoration: none;
color: inherit;
}
main nav li a:hover {
background-color: #f8fcff;
color: #196165;
}
main nav li a:before {
content: '\203A';
font-weight: bold;
font-size: 20px;
line-height: 1rem;
position: absolute;
opacity: 0;
left: 5px;
transition: left .15s, opacity .15s;
}
main nav li a:hover:before {
opacity: 1;
left: 10px;
}
main nav li li a:hover:before {
left: 1.25em;
}
main nav li a.current {
background-color: #f0f6f7;
}
main nav li.heading {
font-weight: bold;
font-size: 120%;
padding: 10px 20px 5px;
}
main nav li.heading:not(:first-child) {
margin-top: 20px;
}
main nav li li a {
padding-top: 6px;
padding-bottom: 4px;
padding-left: 2.5em;
font-size: 90%;
}
.article-container {
flex-grow: 1;
min-width: 0;
}
article,
.content {
margin: 0 auto;
max-width: 950px;
}
article {
padding: 40px;
font-size: 20px;
word-wrap: break-word;
}
article p,
article pre > code,
article pre.chroma,
article ul,
article ol {
margin-bottom: 1em;
}
article ul,
article ol,
#hovercard ul,
#hovercard ol {
margin-left: 2.5em;
}
article p,
article li {
line-height: 1.5em;
}
h1 {
font-size: 80px;
color: #196165;
margin-bottom: 25px;
}
h2 {
font-size: 46px;
padding-bottom: 15px;
border-bottom: 4px solid #a6d0da;
margin: 100px 0 40px;
}
h3 {
font-size: 34px;
margin: 50px 0 20px;
}
h4 {
font-size: 24px;
margin: 25px 0 15px;
}
h5 {
font-size: 22px;
margin: 2em 0 1em;
}
code,
pre.chroma {
font-family: 'PT Mono', 'Source Code Pro', monospace;
padding: 3px 6px;
border-radius: 5px;
font-size: 90%;
line-height: 1.4em;
}
code {
background-color: #f0f9fb;
}
code.cmd {
background-color: #333;
color: #eaeaea;
}
pre > code,
pre.chroma,
.group {
display: block;
white-space: pre;
}
pre > code,
pre.chroma {
padding: 1em;
border-radius: 10px;
overflow: auto;
}
pre > code.cmd {
border-radius: 5px;
tab-size: 2;
}
code.cmd.bash,
code.cmd .bash {
font-weight: bold;
}
code.cmd.bash::before,
code.cmd .bash::before {
content: '$';
margin-right: .5rem;
}
dt:hover .inline-link {
visibility: visible;
}
dd {
margin-left: 1em;
}
#field-list-header {
display: none;
}
.field-name {
display: block;
font-family: 'Source Code Pro', monospace;
margin: 0;
font-weight: bold;
margin-bottom: .5em;
}
.inline-link {
text-decoration: none;
position: absolute;
margin-left: -1.4em;
margin-top: -.1em;
padding-right: .2em;
padding-left: .2em;
visibility: hidden;
}
.inline-link:hover {
text-decoration: none;
}
hr {
border: none;
border-top: 5px solid #186165;
margin: 2em 0;
}
article img {
max-width: 100%;
}
iframe {
margin: 1em 0 2em;
}
main > .sidebar:not(:last-child) {
border-right-width: 1px;
}
.json {
line-height: 1.5em;
}
.json .qu { color: #5c91bf; }
.json .key { color: #1c83dc; font-weight: bold; }
.json .str { color: #2f8598; }
.json .num { color: #038a3f; }
.json .bool { color: #9b5e14; }
.json .key a:not(:hover) { color: inherit; }
.json a {
text-decoration: none;
font-weight: bold;
}
.json .has-popup { border-bottom: 1px dashed #1c82dc; }
.json .has-popup.module { border-bottom: none; }
#hovercard {
max-width: 450px;
border-radius: 10px;
filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .25));
position: absolute;
font-size: 16px;
transition: transform .25s ease-in-out, opacity .25s ease-in-out;
}
#hovercard:not(.popup) {
opacity: 0;
display: none;
transform: translateY(0);
}
.popup {
display: block;
opacity: 1;
transform: translateY(-10px);
}
.arrow-box {
position: relative;
background: white;
}
.arrow-box:after {
bottom: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(255, 255, 255, 0);
border-bottom-color: white;
border-width: 10px;
margin-left: -10px;
}
#hovercard p {
padding: 1em;
line-height: 1.4em;
}
#hovercard p+p {
padding-top: 0;
}
#hovercard li {
margin: .25em;
}
#hovercard pre > code {
border-radius: 0;
}
#hovercard li {
padding-top: 0;
padding-bottom: 0;
}
#hovercard .module-link {
display: block;
text-decoration: none;
font-size: 18px;
line-height: 1em;
font-weight: bold;
padding: .5em 1em;
}
#hovercard .module-link:hover {
background: #f5f5f5;
}
#hovercard .module-link:last-child {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
#hovercard .module-link-description {
font-size: 14px;
color: #555;
margin-left: .5em;
font-weight: normal;
}
#hovercard-namespace-box,
#hovercard-inline-link {
border: 0px solid #f0f6f7;
}
#hovercard-namespace-box {
border-bottom-width: 1px;
}
#hovercard-inline-link {
border-top-width: 1px;
}
#hovercard-inline-link a {
display: block;
padding: 8px 10px;
text-decoration: none;
font-size: 85%;
font-weight: bold;
text-align: center;
}
#hovercard-namespace {
font-weight: bold;
}
.explain {
font-style: italic;
color: #777;
}
.beta-warning {
font-size: 14px;
padding: 10px;
border-bottom: 1px solid orange;
background: #fff5e2;
line-height: 1.4em;
}
article aside {
position: absolute;
right: 0;
font-size: 16px;
color: #146673;
line-height: 1.4em;
padding: 10px 3.5% 10px 20px;
border: 0px solid #dff9ff;
border-top-width: 1px;
border-left-width: 1px;
background: -webkit-radial-gradient(top left, #d6f0f3, transparent 65%);
background: -moz-radial-gradient(top left, #d6f0f3, transparent 65%);
background: radial-gradient(top left, #d6f0f3, transparent 65%);
}
article aside.complete::before,
article aside.tip::before {
text-transform: uppercase;
display: block;
line-height: 1em;
font-weight: 900;
}
article aside.complete::before {
content: 'complete';
font-size: 14px;
letter-spacing: 2px;
color: #3ea78a;
margin-bottom: 10px;
}
article aside.tip::before {
content: 'tip';
color: #d0efef;
position: absolute;
top: -30px;
font-size: 35px;
}
article aside.warning {
border-top-color: #ffd6a4;
color: #bd6800;
background: -webkit-radial-gradient(top left, #ffd6a4, transparent 65%);
background: -moz-radial-gradient(top left, #ffd6a4, transparent 65%);
background: radial-gradient(top left, #ffd6a4, transparent 65%);
}
article aside.warning::before {
content: 'warning';
color: #ffd6a4;
position: absolute;
top: -30px;
font-size: 35px;
}
table {
table-layout: fixed;
border-collapse: collapse;
font-size: 16px;
margin: 25px 0;
}
th, td {
border-bottom: 1px solid #ddd;
padding: 10px;
line-height: 1.4em;
vertical-align: top;
word-wrap: break-word;
}
th {
text-align: left;
background: #eee;
}
td code {
font-size: 14px;
word-wrap: break-word;
}
@media (max-width: 1400px) {
article aside {
font-size: 14px;
}
table {
font-size: 14px;
}
h1 {
font-size: 60px;
}
h2 {
font-size: 38px;
margin-top: 65px;
}
h3 {
font-size: 28px;
margin-top: 40px;
}
}
@media (max-width: 1000px) {
main > .sidebar:last-child,
article aside {
display: none;
}
main > .sidebar {
width: 30%;
padding: 10px 0;
}
article {
padding: 20px;
}
}
@media (max-width: 1000px) and (min-width: 600px) {
main nav li a {
padding: 8px 12px;
}
main nav li li a {
padding-left: 1.5em;
}
main nav li a:before {
font-size: 18px;
left: -5px;
}
main nav li a:hover:before {
left: 2px;
}
main nav li li a:hover:before {
left: .5em;
}
}
@media (max-width: 600px) {
#logo-docs {
display: none;
}
main {
flex-direction: column-reverse;
}
main > .sidebar {
width: 100%;
border-width: 0;
border-top-width: 2px;
}
}
@media (prefers-color-scheme: dark) {
body {
background-color: #060e17;
color: #bdd6f7;
}
header,
main > .sidebar,
footer {
border-color: #061b35;
}
#logo {
/* TODO: Add some color */
filter: invert(1) opacity(.35);
}
#logo-docs {
color: #5aa3dc;
}
.breadcrumbs {
color: #5aa3dc;
}
main nav ul li a:hover {
background-color: #13243a;
color: #5aa3dc;
}
main nav ul li a.current {
background-color: #061b35;
}
.breadcrumbs,
main nav {
border-color: #061b35;
}
h1 {
color: #5aa3dc;
}
code {
background-color: #122844;
}
code.cmd {
background-color: #000;
color: #ccc;
}
#hovercard,
.arrow-box {
background-color: #0a192b;
}
.arrow-box:after {
border-bottom-color: #0a192b;
}
#hovercard .module-link:hover {
background: #0f2c50;
}
#hovercard .module-link-description {
color: rgb(167, 167, 167);
}
#hovercard-namespace-box,
#hovercard-inline-link {
border-color: #0a2b53;
}
.beta-warning {
background-color: #462e00;
color: #ffa500;
}
article aside {
background: -webkit-radial-gradient(top left, #00515a, transparent 65%);
background: -moz-radial-gradient(top left, #00515a, transparent 65%);
background: radial-gradient(top left, #00515a, transparent 65%);
color: #37c3a9;
border-color: #08575a;
}
article aside.tip:before {
color: #185f5b;
}
th {
background-color: #142638;
}
th,
td {
border-bottom-color: #233444;
}
}

350
src/resources/css/home.css Normal file
View file

@ -0,0 +1,350 @@
body {
font-family: 'Inter', sans-serif;
}
.hero {
background-image: url('/resources/images/bg-teal.jpg');
background-repeat: no-repeat;
background-size: cover;
padding-bottom: 100px;
}
h1 {
text-transform: uppercase;
font-size: 70px;
font-family: Montserrat, sans-serif;
text-align: center;
margin: 70px 0 20px;
}
h2 {
font-size: 28px;
font-weight: normal;
text-align: center;
max-width: 60rem;
margin: 0 auto 50px;
line-height: 1.5em;
}
h3 {
font-family: Montserrat, sans-serif;
font-weight: 400;
font-size: 55px;
}
p {
font-size: 20px;
max-width: 600px;
margin-top: 20px;
line-height: 1.5em;
}
.download-container {
text-align: center;
margin-top: 50px;
}
.download-container .button.big {
margin-bottom: 15px;
}
section {
padding: 100px 0;
}
section.alternate:nth-child(even) {
background-color: #f5f8f9;
}
section.alternate:nth-child(odd) .side-by-side {
flex-direction: row-reverse;
}
.side-by-side {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.side-by-side > * {
width: 48%;
}
.side-by-side img {
max-height: 400px;
}
.code-caption {
font-size: 24px;
font-weight: bold;
margin: 75px auto 20px;
}
code {
font-family: 'PT Mono', monospace;
}
code.block {
display: block;
background: #2f2f2f;
color: #eee;
font-size: 20px;
padding-top: 30px;
padding-bottom: 30px;
line-height: 1.25em;
white-space: pre-wrap;
}
.actions {
padding-top: 100px;
}
code.caddyfile {
background-color: #dbebf3;
color: black;
}
.cf-key {
color: #d22500;
font-weight: bold;
}
.cf-comment {
color: #7291a0;
}
.cf-dir {
color: #006c96;
font-weight: bold;
}
.cf-arg {
color: #008000;
}
.cf-subdir {
color: #835234;
}
code.rest {
background-color: #f0f5f4; /*#073d59;*/
color: #253a28;
}
.footnote {
font-size: 18px;
text-align: center;
}
iframe.github-stars {
margin-left: 20px;
vertical-align: middle;
}
@media (max-width: 1100px) {
.side-by-side,
section.alternate:nth-child(odd) .side-by-side {
flex-direction: column;
}
section.alternate:nth-child(odd) .side-by-side > img {
flex-direction: column-reverse;
margin-bottom: 50px;
}
.side-by-side-content {
margin-bottom: 50px;
}
.side-by-side > * {
width: initial;
}
p {
max-width: 900px;
}
}
@media (max-width: 900px) {
header {
flex-direction: column;
}
#logo-container {
text-align: center;
}
header nav {
text-align: center;
}
h1 {
font-size: 50px;
word-wrap: break-word;
}
h2 {
font-size: 24px;
}
}
/* TODO: */
/* TAKEN FROM features.css */
.features-start {
background: linear-gradient(0deg, #13a8f5 0%, #18b125 100%);
color: white;
padding: 35px 0;
}
.main-features {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding-top: 2rem;
}
.main-feature {
text-align: center;
padding: 0 2rem;
margin: 3rem 0;
width: 25%;
}
.main-feature img {
height: 130px;
margin-bottom: 15px;
}
.main-feature .title {
font-size: 24px;
font-weight: bold;
margin-bottom: 15px;
}
.main-feature p {
text-align: left;
font-size: 16px;
margin: 0;
}
.feature-points {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
font-size: 28px;
}
.feature-point {
width: 33.333%;
min-width: 300px;
padding: 1rem 3rem;
}
#features-title {
width: 80%;
max-width: 700px;
display: block;
margin: 50px auto 0;
position: relative;
top: 40px;
}
.features-area h3 {
border-bottom: 3px solid #2BABED;
}
.features-area h4 {
text-align: center;
padding-top: 80px;
padding-bottom: 40px;
font-family: Montserrat, sans-serif;
font-size: 40px;
}
.features-area h5 {
font-size: 18px;
text-transform: uppercase;
letter-spacing: 1px;
}
.section-heading {
font-style: italic;
font-size: 20px;
line-height: 2rem;
color: #000;
max-width: 550px;
text-align: center;
margin: 2rem auto 0;
}
.features {
display: flex;
flex-wrap: wrap;
}
.feature {
width: 33.333%;
padding: 25px;
}
.feature p {
margin-top: 5px;
color: #333;
font-size: 18px;
}
@media (max-width: 900px) {
.main-feature {
width: 50%;
margin: 3rem 0;
padding: 0 1rem;
}
.feature {
width: 50%;
}
}
@media (max-width: 700px) {
.pitch {
width: 100%;
border-right: none;
}
.feature-highlight {
padding: 1rem;
}
}
@media (max-width: 500px) {
.main-feature {
width: 100%;
}
.feature {
width: 100%;
}
}

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Left_Breast_Front" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 288 288" style="enable-background:new 0 0 288 288;" xml:space="preserve">
<g>
<g>
<g>
<path style="fill:#EFEFEF;" d="M260.018,146.793H27.982c-2.338,0-4.148,2.098-3.863,4.476l7.531,62.774
c0.24,2,1.897,3.502,3.863,3.502h217.592c1.98,0,3.645-1.524,3.867-3.541l6.914-62.774
C264.146,148.864,262.341,146.793,260.018,146.793z"/>
<path style="fill:#EFEFEF;" d="M73.89,137.309h140.582l8.71-40.634c0.13-0.547-0.079-1.119-0.53-1.455l-76.936-57.175
c-0.115-0.085-0.24-0.158-0.375-0.203c-0.372-0.125-0.764-0.19-1.159-0.19c-0.395,0-0.787,0.065-1.159,0.19
c-0.135,0.045-0.26,0.118-0.375,0.203L65.71,95.22c-0.452,0.336-0.66,0.908-0.531,1.455L73.89,137.309z"/>
</g>
<path style="fill:#F15825;" d="M64.921,137.309L54.577,93.607c-0.147-0.621,0.09-1.27,0.602-1.65l87.262-64.848
c0.13-0.097,0.272-0.179,0.425-0.23c0.422-0.142,0.867-0.215,1.315-0.215c0.448,0,0.893,0.073,1.315,0.215
c0.153,0.052,0.295,0.133,0.425,0.23c4.308,3.202,78.509,58.344,87.264,64.851c0.512,0.381,0.746,1.028,0.599,1.649
l-10.344,43.702h16.425l11.896-50.257c0.147-0.621-0.09-1.27-0.602-1.65l-96.835-71.963c-0.059-0.044-0.12-0.084-0.184-0.121
c-3.086-1.759-6.522-2.639-9.958-2.639s-6.872,0.88-9.958,2.639c-0.064,0.036-0.125,0.077-0.184,0.121L37.203,85.402
c-0.512,0.381-0.749,1.029-0.602,1.65l11.896,50.257H64.921z"/>
<path style="fill:#F15825;" d="M202.304,226.602l-2.16,9.124c-0.117,0.496-0.464,0.906-0.934,1.104l-54.409,22.947
c-0.397,0.167-0.845,0.167-1.242,0L89.15,236.83c-0.47-0.198-0.816-0.608-0.934-1.104l-2.16-9.124H69.632l4.899,20.699
c0.117,0.496,0.464,0.906,0.934,1.104l68.094,28.719c0.397,0.167,0.845,0.167,1.242,0l68.094-28.719
c0.47-0.198,0.816-0.608,0.934-1.104l4.899-20.699H202.304z"/>
<path style="fill:#EFEFEF;" d="M195.17,226.602l-1.648,5.682c-0.103,0.437-0.409,0.799-0.823,0.973l-47.971,19.593
c-0.35,0.148-0.745,0.148-1.095,0l-47.971-19.593c-0.414-0.175-0.72-0.536-0.823-0.973l-1.647-5.682H195.17z"/>
<g>
<path style="fill:#F15825;" d="M173.823,195.865l0.371,5.687h-2.763c-3.827,0-5.687-2.126-5.687-6.378v-31.995l4.731-1.222h0.903
v31.463c0,1.701,0.584,2.444,1.701,2.444H173.823z"/>
<path style="fill:#F15825;" d="M188.437,198.575c-1.063,2.232-2.126,2.71-4.73,2.71h-2.764c-3.561,0-5.314-2.073-5.314-6.431
v-3.88c0-3.986,1.754-6.059,5.314-6.059h7.016v-2.711c0-1.701-0.585-2.391-1.754-2.391h-2.764c-1.169,0-1.701,0.691-1.701,2.391
v0.478h-5.261v-2.232c0-4.146,1.754-6.325,5.314-6.325h6.112c3.827,0,5.687,2.126,5.687,6.378v20.781h-4.73L188.437,198.575z
M186.152,195.599c1.222,0,1.807-0.85,1.807-2.817v-2.604h-5.793c-0.797,0-1.329,0.903-1.329,2.445v0.903
c0,1.701,0.531,2.073,1.329,2.073H186.152z"/>
<path style="fill:#F15825;" d="M203.264,199.001v2.285h-5.687v-38.107l4.73-1.222h0.956v14.084
c1.222-1.435,2.71-1.914,4.624-1.914h2.338c3.88,0,5.74,2.286,5.74,6.697v13.34c0,4.73-1.967,7.122-6.165,7.122h-1.914
C205.337,201.286,204.008,200.648,203.264,199.001z M203.264,192.888c0.053,2.02,0.797,2.923,2.126,2.923h2.764
c1.435,0,2.179-0.903,2.179-3.135v-9.832c0-2.339-0.691-3.242-2.179-3.242h-2.764c-1.276,0-2.02,0.85-2.126,2.604V192.888z"/>
<path style="fill:#F15825;" d="M226.01,179.389c-0.85,0-1.276,0.638-1.276,2.02v0.585c0,1.382,0.478,1.701,1.754,2.126
l4.783,1.435c4.252,1.222,5.261,2.126,5.261,6.59v3.136c0,4.624-2.126,6.006-6.59,6.006h-4.252c-5.421,0-6.644-1.701-6.644-6.856
v-1.542h5.261v1.01c0,1.488,0.425,2.126,1.276,2.126h4.412c0.85,0,1.276-0.638,1.276-2.02v-0.584
c0-1.382-0.585-1.754-1.701-2.127l-4.783-1.435c-5.049-1.435-5.315-2.817-5.315-7.175v-2.073c0-4.57,1.116-6.484,6.644-6.484
h3.401c5.527,0,6.59,1.807,6.59,7.122v1.648h-5.261v-1.382c0-1.435-0.425-2.127-1.276-2.127H226.01z"/>
</g>
<g>
<path style="fill:#F15825;" d="M82.845,121.149l66.21-61.362c0.863-0.801,1.569-0.529,1.569,0.602v44.403
c0,1.131-0.706,2.71-1.569,3.511l-13.86,12.845c-0.863,0.8-2.568,1.454-3.789,1.454H83.495
C82.274,122.604,81.982,121.949,82.845,121.149z"/>
</g>
</g>
<path style="fill:#EFEFEF;" d="M260.526,80.746L156.464,3.724l-0.028-0.021l-0.03-0.019l-0.154-0.101l-0.031-0.021l-0.032-0.019
c-3.646-2.105-7.798-3.217-12.008-3.217c-4.169,0-8.287,1.093-11.907,3.16c-0.106,0.061-0.212,0.13-0.312,0.205L27.838,80.745
c-0.908,0.674-1.337,1.821-1.097,2.923l13.004,53.641h5.917L32.796,84.428c-0.02-0.092,0.028-0.22,0.128-0.294L135.158,8.469
c0.02-0.015,0.038-0.027,0.057-0.038c2.731-1.539,5.831-2.352,8.965-2.352s6.234,0.813,8.965,2.352
c0.019,0.011,0.037,0.023,0.037,0.023l102.256,75.68c0.098,0.073,0.146,0.2,0.119,0.322l-12.251,52.851h5.913l12.393-53.612
C261.861,82.567,261.431,81.419,260.526,80.746z"/>
<g>
<path style="fill:#EFEFEF;" d="M222.394,226.602l-5.436,23.208c-0.015,0.068-0.083,0.151-0.174,0.192l-72.464,31.575
c-0.05,0.022-0.094,0.032-0.14,0.032c-0.046,0-0.09-0.009-0.131-0.028l-72.033-31.582c-0.083-0.038-0.151-0.121-0.172-0.219
l-5.396-23.178h-5.926l6.037,25.946c0.199,0.913,0.806,1.663,1.632,2.036l74.813,32.838c0.367,0.166,0.765,0.252,1.176,0.252
s0.81-0.086,1.184-0.255l75.246-32.831c0.833-0.376,1.441-1.127,1.634-2.011l6.079-25.975H222.394z"/>
</g>
<g>
<path style="fill:#35495C;" d="M105.532,163.179v13.127c-0.956-1.648-1.967-2.179-4.252-2.179h-2.339
c-4.145,0-6.112,2.551-6.112,7.547v12.915c0,4.412,1.807,6.697,5.687,6.697h2.339c2.976,0,4.358-1.01,5.049-3.082l0.531,3.082
h4.73v-39.329h-0.903L105.532,163.179z M105.532,193.048c-0.159,1.913-0.903,2.763-2.179,2.763h-2.711
c-1.488,0-2.179-0.903-2.179-3.135v-9.939c0-2.232,0.691-3.135,2.126-3.135h2.764c1.382,0,2.073,0.956,2.179,2.87V193.048z"/>
<path style="fill:#35495C;" d="M60.094,163.551l-9.939,37.735h6.431l1.542-6.697h10.045l1.541,6.697h6.378l-9.885-37.735H60.094z
M59.562,188.477l3.614-15.519l3.561,15.519H59.562z"/>
<path style="fill:#35495C;" d="M90.013,173.543l-4.464,1.594c-1.169,0.426-1.86,1.329-2.392,2.498v-3.189h-0.85l-4.411,1.222
v25.617h5.687v-17.06c0-2.02,0.585-2.87,2.179-3.401l5.049-1.701l-0.425-5.58H90.013z"/>
<path style="fill:#35495C;" d="M126.737,174.127h-6.112c-3.561,0-5.314,2.179-5.314,6.325v2.232h5.261v-0.478
c0-1.701,0.531-2.391,1.701-2.391h2.764c1.169,0,1.754,0.691,1.754,2.391v2.711h-7.016c-3.561,0-5.314,2.072-5.314,6.059v3.88
c0,4.358,1.754,6.431,5.314,6.431h2.764c2.604,0,3.667-0.478,4.73-2.71l0.425,2.71h4.73v-20.781
C132.424,176.253,130.564,174.127,126.737,174.127z M126.79,192.782c0,1.967-0.585,2.817-1.807,2.817h-3.986
c-0.797,0-1.329-0.372-1.329-2.073v-0.903c0-1.542,0.531-2.445,1.329-2.445h5.793V192.782z"/>
</g>
<path style="fill:#35495C;" d="M148.579,174.127h-2.285c-2.392,0-3.72,0.638-4.677,2.498v-2.179h-0.85l-4.412,1.222v25.617h5.687
v-19.292c0.053-1.595,0.85-2.605,2.126-2.605h2.339c1.488,0,2.125,0.904,2.125,3.136v18.761h5.687v-20.515
C154.319,176.359,152.46,174.127,148.579,174.127z"/>
<path style="fill:#35495C;" d="M171.902,121.139c0.868,0.805,2.584,1.464,3.813,1.464h20.578c1.229,0,1.523-0.659,0.655-1.464
l-39.053-36.216c-0.868-0.805-1.579-0.533-1.579,0.607v19.083c0,1.139,0.711,2.729,1.579,3.536L171.902,121.139z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 129 155" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g><clipPath id="_clip1"><path d="M89.967,66.518c0.007,-0.504 -0.232,-0.981 -0.639,-1.278l-57.409,-41.945c-0.536,-0.392 -1.261,-0.401 -1.806,-0.024l-25.777,17.795c-0.421,0.291 -0.673,0.77 -0.673,1.281c0,0.512 0.252,0.991 0.673,1.282l59.083,40.788c0.267,0.184 0.577,0.276 0.886,0.276c0.31,0 0.62,-0.092 0.886,-0.276l24.102,-16.639c0.417,-0.286 0.667,-0.755 0.674,-1.26Z" clip-rule="nonzero"/></clipPath><g clip-path="url(#_clip1)"><rect x="-1.337" y="17.995" width="96.304" height="71.698" style="fill:#fff;"/></g><clipPath id="_clip2"><path d="M127.777,50.16c-0.513,-0.268 -1.134,-0.231 -1.611,0.098l-57.921,39.988c-0.421,0.29 -0.673,0.77 -0.673,1.282l0,61.346c0,0.578 0.321,1.111 0.835,1.379c0.227,0.12 0.476,0.178 0.723,0.178c0.312,0 0.622,-0.093 0.886,-0.276l57.921,-39.987c0.422,-0.29 0.673,-0.77 0.673,-1.281l0,-61.347c0.001,-0.579 -0.32,-1.11 -0.833,-1.38Z" clip-rule="nonzero"/></clipPath><g clip-path="url(#_clip2)"><rect x="62.572" y="44.982" width="71.039" height="114.449" style="fill:#fff;"/></g><clipPath id="_clip3"><path d="M60.367,90.246l-57.922,-39.987c-0.476,-0.329 -1.096,-0.367 -1.61,-0.098c-0.513,0.269 -0.835,0.8 -0.835,1.379l0,61.347c0,0.511 0.252,0.991 0.673,1.281l57.921,39.987c0.266,0.183 0.576,0.276 0.886,0.276c0.248,0 0.497,-0.058 0.725,-0.178c0.512,-0.268 0.834,-0.801 0.834,-1.379l0,-61.346c0.001,-0.512 -0.25,-0.992 -0.672,-1.282Z" clip-rule="nonzero"/></clipPath><g clip-path="url(#_clip3)"><rect x="-5" y="44.983" width="71.039" height="114.448" style="fill:#fff;"/></g><clipPath id="_clip4"><path d="M39.257,19.474l57.41,41.945c0.274,0.2 0.596,0.3 0.919,0.3c0.309,0 0.62,-0.092 0.886,-0.276l25.803,-17.814c0.422,-0.291 0.673,-0.77 0.673,-1.282c0,-0.512 -0.251,-0.991 -0.673,-1.282l-59.084,-40.789c-0.532,-0.368 -1.239,-0.368 -1.771,0l-24.129,16.659c-0.416,0.286 -0.666,0.756 -0.673,1.26c-0.007,0.505 0.232,0.982 0.639,1.279Z" clip-rule="nonzero"/></clipPath><g clip-path="url(#_clip4)"><rect x="33.618" y="-5" width="96.33" height="71.719" style="fill:#fff;"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 1603 209" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="M0,3.507l162.493,0l0,48.222l-97.905,0l0,34.486l84.169,0l0,46.175l-84.169,0l0,72.187l-64.588,0l0,-201.07Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M180.32,3.507l173.89,0l0,48.222l-109.302,0l0,27.764l93.521,0l0,46.176l-93.521,0l0,30.686l111.348,0l0,48.222l-175.936,0l0,-201.07Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M511.442,204.577l-8.475,-28.349l-70.433,0l-8.475,28.349l-66.049,0l73.355,-201.07l75.109,0l73.355,201.07l-68.387,0Zm-65.464,-73.356l43.545,0l-21.042,-71.601l-1.169,0l-21.334,71.601Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M705.206,54.944l0,149.633l-64.588,0l0,-149.633l-66.049,0l0,-51.437l196.394,0l0,51.437l-65.757,0Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M986.061,123.623c0,27.472 -8.67,48.416 -26.011,62.834c-17.34,14.418 -41.987,21.627 -73.94,21.627c-31.953,0 -56.648,-7.209 -74.086,-21.627c-17.437,-14.418 -26.156,-35.362 -26.156,-62.834l0,-120.116l64.587,0l0,119.239c0,11.301 3.02,20.312 9.06,27.034c6.04,6.721 14.808,10.082 26.303,10.082c11.495,0 20.312,-3.409 26.449,-10.229c6.137,-6.819 9.206,-15.781 9.206,-26.887l0,-119.239l64.588,0l0,120.116Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M1205.54,65.172c0,12.275 -3.313,23.381 -9.937,33.317c-6.624,9.937 -16.269,17.243 -28.933,21.919l44.715,84.169l-72.479,0l-35.655,-73.356l-23.965,0l0,73.356l-64.587,0l0,-201.07l123.038,0c14.418,0 26.741,2.776 36.97,8.329c10.229,5.553 17.925,13.054 23.088,22.504c5.163,9.449 7.745,19.727 7.745,30.832Zm-65.757,2.631c0,-5.261 -1.754,-9.645 -5.261,-13.152c-3.507,-3.507 -7.793,-5.26 -12.859,-5.26l-42.377,0l0,37.116l42.377,0c5.066,0 9.352,-1.802 12.859,-5.407c3.507,-3.604 5.261,-8.037 5.261,-13.297Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M1227.46,3.507l173.89,0l0,48.222l-109.303,0l0,27.764l93.521,0l0,46.176l-93.521,0l0,30.686l111.349,0l0,48.222l-175.936,0l0,-201.07Z" style="fill:#fff;fill-rule:nonzero;"/><path d="M1508.32,0c25.719,0 46.858,5.212 63.419,15.636c16.561,10.423 25.037,25.864 25.426,46.322l0,3.507l-60.496,0l0,-1.169c0,-5.845 -2.143,-10.716 -6.43,-14.613c-4.286,-3.897 -10.813,-5.845 -19.581,-5.845c-8.572,0 -15.148,1.266 -19.727,3.799c-4.578,2.533 -6.868,5.65 -6.868,9.352c0,5.261 3.118,9.158 9.353,11.69c6.234,2.533 16.268,5.164 30.102,7.891c16.171,3.312 29.468,6.771 39.892,10.375c10.424,3.605 19.532,9.498 27.326,17.681c7.793,8.184 11.787,19.289 11.982,33.317c0,23.77 -8.037,41.403 -24.111,52.898c-16.074,11.495 -37.554,17.243 -64.442,17.243c-31.368,0 -55.771,-5.261 -73.209,-15.782c-17.438,-10.521 -26.156,-29.128 -26.156,-55.82l61.08,0c0,10.131 2.631,16.902 7.891,20.312c5.261,3.409 13.444,5.114 24.549,5.114c8.183,0 14.954,-0.877 20.312,-2.63c5.358,-1.754 8.037,-5.358 8.037,-10.814c0,-4.87 -2.971,-8.524 -8.914,-10.959c-5.942,-2.436 -15.635,-5.017 -29.079,-7.745c-16.366,-3.507 -29.907,-7.16 -40.623,-10.959c-10.716,-3.8 -20.068,-10.083 -28.056,-18.851c-7.989,-8.767 -11.983,-20.652 -11.983,-35.654c0,-22.017 8.524,-38.237 25.572,-48.66c17.049,-10.424 38.627,-15.636 64.734,-15.636Z" style="fill:#fff;fill-rule:nonzero;"/></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 110 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 105 145" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><clipPath id="_clip1"><path d="M52.299,0c-23.32,0 -42.293,19.001 -42.293,42.358l0,24.191c0,0.275 -0.338,0.738 -0.604,0.827c-2.287,0.764 -4.145,1.426 -5.845,2.082c-2.028,0.783 -3.557,3.033 -3.557,5.235l0,55.585c0,2.187 1.519,4.439 3.534,5.239c15.589,6.187 31.996,9.323 48.764,9.323c16.769,0 33.176,-3.137 48.765,-9.324c2.014,-0.799 3.533,-3.051 3.533,-5.238l0,-55.585c0,-2.202 -1.529,-4.452 -3.558,-5.236c-1.701,-0.656 -3.558,-1.318 -5.843,-2.082c-0.265,-0.089 -0.604,-0.552 -0.604,-0.827l0,-24.191c-0.001,-23.356 -18.973,-42.357 -42.292,-42.357Zm-11.52,91.622c0,-6.376 5.158,-11.536 11.519,-11.536c6.361,0 11.518,5.16 11.518,11.536c0,4.225 -2.379,7.763 -5.759,9.768l0,19.073c0,3.189 -2.576,5.768 -5.759,5.768c-3.184,0 -5.76,-2.579 -5.76,-5.768l0,-19.073c-3.38,-2.005 -5.759,-5.543 -5.759,-9.768Zm39.27,-49.265l0,20.873c-9.101,-1.962 -18.437,-2.955 -27.747,-2.956c-9.305,0 -18.639,0.994 -27.754,2.953l0,-20.87c0,-15.325 12.449,-27.793 27.75,-27.793c15.301,0 27.751,12.468 27.751,27.793Z" clip-rule="nonzero"/></clipPath><g clip-path="url(#_clip1)"><rect x="-5" y="-5" width="114.596" height="154.84" style="fill:#fff;"/></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 152 152" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="M111.723,0.024c-1.334,0.191 -2.562,0.837 -3.475,1.828l-17.005,17.371c-4.848,-4.269 -9.328,-8.066 -12.982,-10.605c-2.337,-1.624 -4.364,-2.963 -6.4,-3.84c-1.018,-0.438 -2.04,-0.77 -3.474,-0.914c-1.434,-0.145 -3.966,0.125 -5.852,2.011l-28.707,29.256l0.182,0.183c-0.986,1.053 -1.565,2.233 -1.828,3.291l-0.183,0.732c-0.005,0.052 0.003,0.132 0,0.183c-0.004,0.068 0.002,0.116 0,0.183l-6.765,39.313c-0.288,1.15 1.804,4.406 5.485,8.96l-3.84,3.839c-5.12,5.12 -5.668,12.606 -1.828,18.286l-25.051,25.05l16.457,16.457l25.05,-25.234l0.183,0c5.652,3.354 12.801,2.701 17.371,-2.377l3.292,-3.291c5.071,4.196 9.018,6.522 10.239,6.217l39.131,-6.765c0.136,0.013 0.223,-0.009 0.365,0c1.111,0.065 2.737,-0.041 4.389,-1.28l0.365,-0.366l0.183,-0.183l28.708,-28.708c1.582,-1.581 1.804,-3.383 1.829,-4.388c0.024,-1.006 -0.041,-1.645 -0.183,-2.194c-0.284,-1.1 -0.687,-1.882 -1.097,-2.743c-0.821,-1.724 -1.927,-3.451 -3.109,-5.303c-1.182,-1.852 -2.456,-3.725 -3.657,-5.303c-1.201,-1.577 -1.761,-2.783 -3.657,-4.205l-7.131,9.508c0.268,0.305 0.865,1.043 1.463,1.829c0.956,1.256 2.096,2.802 3.108,4.388c0.67,1.049 1.169,1.875 1.646,2.743l-23.588,23.405c-1.973,-1.225 -4.879,-3.377 -8.411,-6.217c-7.238,-5.819 -16.998,-14.362 -27.428,-24.502c-10.379,-10.091 -19.274,-19.807 -25.051,-27.062c-2.888,-3.628 -4.931,-6.66 -6.034,-8.594l24.137,-24.503c0.839,0.466 1.618,0.738 2.925,1.646c2.968,2.062 7.085,5.46 11.52,9.326l-10.423,10.605c-1.377,1.11 -2.18,2.787 -2.18,4.556c0,3.211 2.642,5.852 5.852,5.852c1.769,0 3.446,-0.802 4.557,-2.18l35.656,-36.387c1.042,-1.089 1.624,-2.539 1.624,-4.046c0,-3.21 -2.642,-5.852 -5.852,-5.852c-0.176,0 -0.351,0.008 -0.526,0.024Zm-7.497,30.902l-8.229,8.411l8.229,8.045l0,0.183l0.183,0c4.539,4.127 8.445,8.223 12.068,12.251l-11.154,10.971c-1.378,1.111 -2.18,2.788 -2.18,4.557c0,3.21 2.641,5.852 5.852,5.852c1.769,0 3.446,-0.803 4.556,-2.18l36.205,-35.656c1.168,-1.105 1.83,-2.644 1.83,-4.251c0,-3.211 -2.641,-5.852 -5.852,-5.852c-0.245,0 -0.489,0.015 -0.732,0.046c-1.269,0.23 -2.426,0.873 -3.292,1.828l-16.822,16.457c-3.653,-3.991 -7.716,-8.128 -12.434,-12.434l-0.183,-0.183l-8.045,-8.045Z" style="fill:#fff;fill-rule:nonzero;"/></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 147 129" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><clipPath id="_clip1"><path d="M147,36.836l-73.5,-36.836l-73.5,36.836l73.5,36.835l73.5,-36.835Zm-73.5,-24.613l49.11,24.613l-49.11,24.597l-49.11,-24.597l49.11,-24.613Zm58.785,44.85l14.715,7.382l-73.5,36.836l-73.5,-36.836l14.715,-7.382l58.785,29.468l58.785,-29.468Zm0,27.634l14.715,7.382l-73.5,36.836l-73.5,-36.836l14.715,-7.382l58.785,29.453l58.785,-29.453Z" clip-rule="nonzero"/></clipPath><g clip-path="url(#_clip1)"><rect x="-5" y="-5" width="157" height="138.925" style="fill:#fff;"/></g></svg>

After

Width:  |  Height:  |  Size: 939 B

View file

@ -0,0 +1,359 @@
// TODO: sanitize all HTML renderings, especially markdown: https://github.com/cure53/DOMPurify
function markdown(input) {
if (!input) {
return "";
}
return marked(input);
}
$(function() {
var $renderbox = $('#renderbox');
var $hovercard = $('#hovercard');
var pageDocs = {}, pageData = {};
const jsonDocsPathPrefix = "/docs/json/";
var configPath = window.location.pathname.substr(jsonDocsPathPrefix.length-1); // keep trailing slash
// set the page title with something useful
var parts = configPath.split("/");
if (parts.length > 1) {
if (!parts[0]) {
parts.shift();
}
if (!parts[parts.length-1]) {
parts.pop();
}
var titlePrefix = parts.slice(-2).join("/");
if (parts.length > 4) {
titlePrefix = parts.slice(0, 2).join("/")+"/.../"+titlePrefix;
}
if (titlePrefix) {
document.title = titlePrefix + " - " + document.title;
}
}
var hoverTimeout;
$hovercard.hover(function() {
clearTimeout(hoverTimeout);
}, function() {
clearTimeout(hoverTimeout);
$hovercard.removeClass('popup');
});
$('body').on({
mouseenter: function() {
// don't allow hoverbox to close anymore, we're re-opening it
clearTimeout(hoverTimeout);
var pos = $(this).position();
// there is a gap between the hoverbox and the link that originated it;
// there may be a different link in this gap; if the hover box is visible,
// then we should ignore the hover on this link to allow cursor to visit
// the hoverbox if that is where it is going; this makes it possible to
// visit the hoverbox while it is over a list of links that are tightly
// stacked vertically; if user wants to visit hoverbox for link in this
// gap, they can just move the cursor slow enough to fire the timeout
if ($hovercard.is(':visible') && $hovercard.position().top - 10 < pos.top) {
return;
}
// fill out hovercard
var elemPath = $(this).data('path');
var modNamespace = $(this).data('namespace');
$('.hovercard-elem').hide();
if ($(this).hasClass('module')) {
// module
var $list =$('<div/>');
if (pageData.namespaces && pageData.namespaces[modNamespace]) {
for (var i = 0; i < pageData.namespaces[modNamespace].length; i++) {
var modInfo = pageData.namespaces[modNamespace][i];
$list.append('<a href=".'+elemPath+'/'+modInfo.name+'/" class="module-link">'+modInfo.name+'<span class="module-link-description">'+truncate(modInfo.docs, 115)+'</span></a>');
}
}
$('#hovercard-module-list').html($list);
$('#hovercard-namespace').text(modNamespace)
$('#hovercard-module').show();
} else if ($(this).hasClass('module-inline-key')) {
// inline key
$('#hovercard-inline-key').show();
} else if ($(this).hasClass('breadcrumb')) {
// breadcrumb siblings
var siblingPath = $(this).data('sibling-path');
var bcVal = pageData.breadcrumb[siblingPath];
var bcSiblings = [];
// drill down to the true underlying type
while (bcVal.elems) {
bcVal = bcVal.elems;
}
switch (bcVal.type) {
case "struct":
for (var j = 0; j < bcVal.struct_fields.length; j++) {
var sf = bcVal.struct_fields[j];
bcSiblings.push({name: sf.key, path: siblingPath})
}
break;
case "module":
case "module_map":
for (var j = 0; j < pageData.namespaces[bcVal.module_namespace].length; j++) {
var mod = pageData.namespaces[bcVal.module_namespace][j];
bcSiblings.push({name: mod.name, path: siblingPath})
}
}
var $siblings = $('<div class="breadcrumb-siblings"/>').append('<div class="breadcrumb-siblings-title">Siblings:</div>');
for (var j = 0; j < bcSiblings.length; j++) {
var sib = bcSiblings[j];
var sibPath = sib.path;
if (sibPath) {
sibPath += "/";
}
sibPath += sib.name+"/";
$siblings.append('<a href="'+jsonDocsPathPrefix+sibPath+'">'+sib.name+'</a>');
}
$('#hovercard-breadcrumb-siblings').html($siblings).show();
} else if ($(this).hasClass('documented')) {
// docs
var elemDocs = truncate(pageDocs[elemPath], 500);
if (!elemDocs) {
elemDocs = '<p class="explain">There are no docs for this property.</p>';
return;
}
$('#hovercard-docs').html(markdown(elemDocs)).show();
$('#hovercard-inline-link').html('<a href="#'+elemPath.substr(1)+'">View docs below &#8595;</a>').show();
}
// show hoverbox for this link
var height = $(this).height();
var linkWidth = $(this).width();
var boxWidth = $hovercard.width();
$hovercard.css({
'top': pos.top + height*1.5 + 10, // '+10' counters 'translateY(-10px)'
'left': pos.left + (linkWidth/2) - (boxWidth/2)
}).addClass('popup');
},
mouseleave: function() {
// don't hide the hoverbox right away; user might need a
// few milliseconds to get the cursor over the hovercard
hoverTimeout = setTimeout(function() {
$hovercard.removeClass('popup');
}, 200);
}
}, '.has-popup');
var pathComponents = configPath.split('/');
// load the docs for this path
$.get("/api/docs/config"+configPath, function(json) {
pageData = json;
if (pageData.structure.doc) {
// for most types, just render their docs
$('#top-doc').html(markdown(pageData.structure.doc));
} else if (pageData.structure.elems) {
// for maps or arrays, fall through to the underlying type
$('#top-doc').html(markdown(pageData.structure.elems.doc));
}
$('#top-doc').append(makeSubmoduleList("", pageData.structure));
console.log("DATA:", pageData);
renderData(pageData.structure, 0, "", $('<div class="group"/>'));
console.log("DOCS:", pageDocs);
if ($('#field-list').html().trim()) {
$('#field-list-header').show();
}
// establish the breadcrumb
var $bc = $('.breadcrumbs');
$('<a href="'+jsonDocsPathPrefix+'" id="top-breadcrumb">JSON Config Structure</a> &rsaquo;').appendTo($bc);
for (var i = 1; i < pathComponents.length-1; i++) {
var bcPath = pathComponents.slice(0, i+1).join('/');
var bcSiblingPath = pathComponents.slice(1, i).join('/');
// prefixing with <span/> is a hack so jQuery treats this as a HTML DOM object
$('<span/> &rsaquo; <a href="'+jsonDocsPathPrefix+bcPath.substr(1)+'/" class="breadcrumb has-popup" data-sibling-path="'+bcSiblingPath+'">'+pathComponents[i]+'</a>').appendTo($bc);
}
});
function renderData(data, nesting, path, $group) {
switch (data.type) {
case "struct":
$group.append('{<a href="javascript:" class="toggle-obj expanded" title="Collapse/expand">&#9662;</a>');
nesting++;
var $fieldGroup = $('<div class="group"/>');
renderModuleInlineKey(data, nesting, $fieldGroup);
$group.append($fieldGroup);
if (data.struct_fields) {
// TODO: Not sure if sorting the struct fields is a good idea...
// data.struct_fields.sort(function(a, b) {
// if (a.key > b.key) return 1;
// if (b.key > a.key) return -1;
// return 0;
// });
for (var i = 0; i < data.struct_fields.length; i++) {
var field = data.struct_fields[i];
var fieldPath = path+"/"+field.key;
var cleanFieldPath = fieldPath.slice(1); // trim leading slash
// store the docs for this path
let linkClass = "documented";
if (field.doc) {
pageDocs[fieldPath] = field.doc;
linkClass += " has-popup";
}
// render the docs to the page
var fieldDoc = markdown(field.doc) || '<p class="explain">There are no docs for this property.</p>';
fieldDoc += makeSubmoduleList(fieldPath, field.value);
appendToFieldDocs(cleanFieldPath, fieldDoc);
// render the field to the JSON box
var $fieldGroup = $('<div class="group"/>');
indent(nesting, $fieldGroup);
$fieldGroup.append('<span class="qu">"</span><span class="key"><a href=".'+fieldPath+'/" data-path="'+fieldPath+'" class="'+linkClass+'">'+field.key+'</a></span><span class="qu">"</span>: ');
renderData(field.value, nesting, fieldPath, $fieldGroup);
if (i < data.struct_fields.length-1) {
$fieldGroup.append(',');
}
$group.append($fieldGroup);
}
}
nesting--;
indent(nesting, $group);
$group.append('<span class="end-obj">}</span>');
break;
case "bool":
$group.append('<span class="bool">false</span>'); // TODO: default value?
break;
case "int":
case "uint":
case "float":
case "complex":
$group.append('<span class="num">0</span>'); // TODO: default value?
break;
case "string":
$group.append('<span class="qu">"</span><span class="str"></span><span class="qu">"</span>'); // TODO: default value?
break;
case "array":
$group.append('[');
if (data.elems.type == "module_map") {
$group.append('{<a href=".'+path+'/" class="module has-popup" data-namespace="'+(data.elems.module_namespace || '')+'" data-path="'+path+'">&bull;&bull;&bull;</a>}');
} else {
renderData(data.elems, nesting, path, $group);
}
$group.append(']');
break;
case "map":
$group.append('{\n')
nesting++;
renderModuleInlineKey(data, nesting, $group);
indent(nesting, $group);
renderData(data.map_keys, nesting, path, $group);
$group.append(': ');
renderData(data.elems, nesting, path, $group);
$group.append('\n');
nesting--;
indent(nesting, $group);
$group.append('}');
break;
case "module":
// TODO:
$group.append('{<a href=".'+path+'/" class="module has-popup" data-namespace="'+(data.module_namespace || '')+'" data-path="'+path+'">&bull;&bull;&bull;</a>}');
break;
case "module_map":
// TODO:
$group.append('{<a href=".'+path+'/" class="module has-popup" data-namespace="'+(data.module_namespace || '')+'" data-path="'+path+'">&bull;&bull;&bull;</a>}');
break;
}
$renderbox.append($group);
}
function renderModuleInlineKey(data, nesting, $group) {
if (!data.module_inline_key) {
return
}
var moduleName = pathComponents[pathComponents.length-2];
indent(nesting, $group);
$group.append('<span class="qu">"</span><span class="key module-inline-key has-popup">'+data.module_inline_key+'</span><span class="qu">"</span>: <span class="qu">"</span><span class="str"><b>'+moduleName+'</b></span><span class="qu">"</span>');
if (data.struct_fields && data.struct_fields.length > 0) {
$group.append(',');
}
$group.append('\n');
appendToFieldDocs(data.module_inline_key, $('#hovercard-inline-key').html());
}
function appendToFieldDocs(cleanFieldPath, fieldDoc) {
$('#field-list').append('<dt class="field-name" id="'+cleanFieldPath+'"><a href="#'+cleanFieldPath+'" class="inline-link">&#128279;</a><a href="./'+cleanFieldPath+'/">'+cleanFieldPath+'</a></dt> <dd>'+fieldDoc+'</dd>');
}
// toggle an object as expanded or collapsed
$('#renderbox').on('click', '.toggle-obj', function() {
if ($(this).hasClass('expanded')) {
// collapse
$(this).html('&#9656;');
} else {
// expand
$(this).html('&#9662;');
}
$(this).nextUntil('.end-obj').toggleClass('collapsed');
$(this).toggleClass('expanded');
});
function makeSubmoduleList(path, value) {
while (value.elems) {
value = value.elems;
}
if (value.type != "module" && value.type != "module_map") {
return '';
}
var submodList = '<ul>';
if (pageData.namespaces && pageData.namespaces[value.module_namespace]) {
for (var j = 0; j < pageData.namespaces[value.module_namespace].length; j++) {
var submod = pageData.namespaces[value.module_namespace][j];
submodList += '<li><a href=".'+path+'/'+submod.name+'/">'+submod.name+'</li>';
}
}
submodList += '</ul>';
return '<div><p>Fulfilled by modules in namespace: <b>'+value.module_namespace+'</b></p>'+submodList+'</div>';
}
function indent(nesting, $group) {
var $span = $('<span class="indent"></span>');
$span.append('\t'.repeat(nesting));
$group.append($span);
}
function truncate(str, len) {
if (!str) return "";
var startLen = str.length;
str = str.substring(0, len);
if (startLen > len) {
str += "...";
}
return str;
}
});

15
src/resources/js/docs.js Normal file
View file

@ -0,0 +1,15 @@
$(function() {
function hasPrefix(str, prefix) {
if (!prefix) return true;
if (!str) return false;
return str.indexOf(prefix) === 0;
}
// highlight current page in left nav
var $currentPageLink = $('main nav a[href="'+window.location.pathname+'"]');
if (hasPrefix(window.location.pathname, "/docs/json/")) {
// as a special case, highlight the JSON structure link anywhere within it
$currentPageLink = $('main nav a[href="/docs/json/"]');
}
$currentPageLink.addClass('current');
});

2
src/resources/js/jquery-3.4.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
src/resources/js/marked-0.8.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long