Skip to content

Commit

Permalink
Update assets and gitignore for SDK docs builds (#15207)
Browse files Browse the repository at this point in the history
  • Loading branch information
discdiver authored Sep 4, 2024
1 parent 0f0aa85 commit 522c254
Show file tree
Hide file tree
Showing 12 changed files with 949 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,4 @@ libcairo.2.dylib

# setuptools-scm generated files
src/integrations/*/**/_version.py
*.log

# mkdocs generated Markdown docs
docs/mkdocs/
*.log
1 change: 1 addition & 0 deletions docs/mkdocs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/prefect*
11 changes: 11 additions & 0 deletions docs/mkdocs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Prefect SDK documentation
hide:
- toc
---

# Prefect SDK

Explore the SDK documentation for Prefect and the Prefect integration libraries using the sidebar navigation.

Go to the [Prefect 3 main documentation site](https://docs-3.prefect.io/).
3 changes: 3 additions & 0 deletions docs/mkdocs/logo-word-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/mkdocs/stylesheets/admonitions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* styling that applies to Admonitions */
/* see https://python-markdown.github.io/extensions/admonition/ */

/* note admonition */
/*.admonition.note { font-size: 1em; }*/
271 changes: 271 additions & 0 deletions docs/mkdocs/stylesheets/api_ref.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
/* styling that applies only to the Python API reference documentation */

:root {
--default-code: #4d606e;
--blue: #3b8dff;
--blue-transparent: rgba(59, 141, 255, 0.3);
--gray-1: #EBEEF7;
--gray-2: #cfd0d1;
--gray-3: #8EA0AE;
--pink-transparent: rgba(254, 81, 150, 0.3);
--pink: #fe5196;
--default-font-size: .7rem;
--code-font-size: .8rem;
--nav-size: .6rem;
--text-code-font-size: 1em;
--table-font-size: 1em;
--anchor-font-size: 1em;
--header-prefix-font-size: .7em;
--content-relative-size: 1rem;
--h1-font-size: 1.3rem;
--h2-font-size: 1.0em;
--h3-font-size: 1.0em;
}

.prefect-container {
padding-left: 28px;
padding-bottom: 8px;
}

.prefect-heading {
margin-top: 44px;
font-family: Inter;
white-space: nowrap;
overflow-x: auto;
vertical-align: bottom;
margin: 0;
}

.prefect-heading:before {
content: "#";
display: inline-block;
opacity: 0;
color: var(--blue);
position: absolute;
font-size: var(--anchor-font-size);
margin-left: -.8em;
}

.prefect-heading:hover::before {
opacity: 1;
}

.doc.doc-method .prefect-heading:before,
.doc.doc-attribute .prefect-heading:before {
margin-top: 2px;
}

a.prefect-heading,
a.prefect-heading:hover {
color: var(--default-code);
}

.prefect-heading h1,
.prefect-heading h2 {
border-bottom: 2px solid var(--gray-3);
}

.prefect-heading h3,
.prefect-heading h4 {
border-bottom: 2px solid var(--gray-2);
}

.prefect-heading > h1:target,
.prefect-heading > h2:target,
.prefect-heading > h3:target,
.prefect-heading > h4:target {
scroll-margin-top: 50px !important;
}

@media (min-width:1220px) {
.prefect-heading > h1:target,
.prefect-heading > h2:target,
.prefect-heading > h3:target,
.prefect-heading > h4:target {
scroll-margin-top: 105px !important;
}
}

@media (min-width:2000px) {
.prefect-heading > h1:target,
.prefect-heading > h2:target,
.prefect-heading > h3:target,
.prefect-heading > h4:target {
scroll-margin-top: 120px !important;
}
}

.doc.doc-module > h1 {
font-size: var(--h1-font-size);
font-weight: bold;
}

.doc.doc-heading h2 {
font-size: var(--h2-font-size);
}

.prefect-heading h3 {
font-size: var(--h3-font-size);
}

.prefect-heading > h1:before,
.prefect-heading > h2:before,
.prefect-heading > h3:before,
.prefect-heading > h4:before {
color: var(--gray-3);
font-size: var(--default-font-size);
font-weight: 900;
text-transform: lowercase;
white-space: nowrap;
display: inline-block;
}

.prefect-heading > h1:target:before,
.prefect-heading > h2:target:before,
.prefect-heading > h3:target:before,
.prefect-heading > h4:target:before {
display: inline-block;
}

.prefect-table {
width: 100%;
border-collapse: collapse;
border-left: .2rem solid var(--gray-3);
margin-bottom: 18px;
}

.prefect-table code {
font-size: var(--default-font-size);
}

.prefect-table tr {
border-bottom: 1px solid var(--gray-1);
}

.prefect-table tr:last-child {
border: 0;
}

.prefect-table th {
text-align: left;
padding: 4px 10px;
background-color: var(--gray-1);
}

.prefect-table td {
padding: 2px 10px;
}

.prefect-table td, .prefect-table th {
font-size: var(--default-font-size);
vertical-align: text-top;
}

.doc.doc-class > .prefect-heading > h2:before {
content: "class";
font-size: var(--header-prefix-font-size);
}

.doc.doc-function > .prefect-heading > h2:before {
content: "function";
font-size: var(--header-prefix-font-size);
}

.doc.doc-method > .prefect-heading > h3:before {
content: "method";
font-size: var(--header-prefix-font-size);
}

.doc.doc-attribute > .prefect-heading > h3:before {
content: "attribute";
font-size: var(--header-prefix-font-size);
}

.md-nav {
font-size: var(--nav-size);
}

.md-typeset .admonition {
font-size: 1em;
}

.md-typeset h2 code {
font-size: 1.1em;
}

.md-typeset h3 code {
font-size: 1.1em;
}

.md-typeset code {
font-size: var(--code-font-size);
}

.doc p, .doc em, .doc li {
font-size: var(--default-font-size);
margin-top: 4px;
}

.doc.doc-heading code {
font-size: var(--text-code-font-size);
}

.doc p code {
font-size: var(--text-code-font-size);
}

.doc.doc-contents {
font-size: var(--content-relative-size);
}

.highlight code {
font-size: var(--code-font-size);
}

div.linenodiv {
margin-top: 0.45em;
}

.linenodiv span {
font-size: var(--code-font-size);
line-height: 1.4;
}

details.quote:not([open]),
details.quote[open] {
border-color: var(--pink);
border: none;
}

details.quote:not([open]) > summary,
details.quote[open] > summary {
background-color: var(--pink-transparent);
border-color: var(--pink);
border-radius: 0;
}

details.quote:not([open]) > summary:before,
details.quote:not([open]) > summary:after,
details.quote[open] > summary:before,
details.quote[open] > summary:after {
background-color: var(--pink);
}

details.quote:not([open]) > summary > code,
details.quote[open] > summary > code {
background: transparent;
}

.admonition.note{
border-radius: 0;
}

/* special, private, property, and read-only tags */
.doc-property { display: none; }

/* arguments & returns tables */
.doc-contents table td { font-size: var(--table-font-size); }

/* bold the argument name column */
.doc-contents table td:nth-child(1) { font-weight: bold; }

Loading

0 comments on commit 522c254

Please sign in to comment.