Fix styling of docs site
Pin version of just-the-docs so it doesn't change itself again!
This commit is contained in:
parent
755368fc3a
commit
b8c548136a
6 changed files with 54 additions and 187 deletions
|
@ -18,7 +18,11 @@ You can add attributes to your types to customize Schemars's derived `JsonSchema
|
||||||
|
|
||||||
Serde also allows setting `#[serde(...)]` attributes which change how types are serialized, and Schemars will generally respect these attributes to ensure that generated schemas will match how the type is serialized by serde_json. `#[serde(...)]` attributes can be overriden using `#[schemars(...)]` attributes, which behave identically (e.g. `#[schemars(rename_all = "camelCase")]`). You may find this useful if you want to change the generated schema without affecting Serde's behaviour, or if you're just not using Serde.
|
Serde also allows setting `#[serde(...)]` attributes which change how types are serialized, and Schemars will generally respect these attributes to ensure that generated schemas will match how the type is serialized by serde_json. `#[serde(...)]` attributes can be overriden using `#[schemars(...)]` attributes, which behave identically (e.g. `#[schemars(rename_all = "camelCase")]`). You may find this useful if you want to change the generated schema without affecting Serde's behaviour, or if you're just not using Serde.
|
||||||
|
|
||||||
## Table of Contents
|
<details open>
|
||||||
|
<summary style="font-weight: bold">
|
||||||
|
TABLE OF CONTENTS
|
||||||
|
</summary>
|
||||||
|
|
||||||
1. [Supported Serde Attributes](#supported-serde-attributes)
|
1. [Supported Serde Attributes](#supported-serde-attributes)
|
||||||
- [`rename`](#rename)
|
- [`rename`](#rename)
|
||||||
- [`rename_all`](#rename_all)
|
- [`rename_all`](#rename_all)
|
||||||
|
@ -35,6 +39,7 @@ Serde also allows setting `#[serde(...)]` attributes which change how types are
|
||||||
- [`example`](#example)
|
- [`example`](#example)
|
||||||
- [`deprecated`](#deprecated)
|
- [`deprecated`](#deprecated)
|
||||||
- [Doc Comments (`doc`)](#doc)
|
- [Doc Comments (`doc`)](#doc)
|
||||||
|
</details>
|
||||||
|
|
||||||
## Supported Serde Attributes
|
## Supported Serde Attributes
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ source "https://rubygems.org"
|
||||||
# gem "jekyll", "~> 4.0.0"
|
# gem "jekyll", "~> 4.0.0"
|
||||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||||
# gem "minima", "~> 2.5"
|
# gem "minima", "~> 2.5"
|
||||||
gem "just-the-docs", "= 0.2.6"
|
gem "just-the-docs", "= 0.3.2"
|
||||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||||
gem "github-pages", group: :jekyll_plugins
|
gem "github-pages", group: :jekyll_plugins
|
||||||
|
|
|
@ -27,9 +27,10 @@ url: "https://graham.cool" # the base hostname & protocol for your site, e.g. ht
|
||||||
permalink: pretty
|
permalink: pretty
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
remote_theme: pmarsceill/just-the-docs
|
remote_theme: pmarsceill/just-the-docs@v0.3.2
|
||||||
markdown: CommonMarkGhPages
|
markdown: CommonMarkGhPages
|
||||||
|
|
||||||
|
color_scheme: default
|
||||||
aux_links:
|
aux_links:
|
||||||
'<img src="https://img.shields.io/badge/GitHub--lightgrey?style=social&logo=github" alt="Schemars on GitHub" title="Schemars on GitHub">':
|
'<img src="https://img.shields.io/badge/GitHub--lightgrey?style=social&logo=github" alt="Schemars on GitHub" title="Schemars on GitHub">':
|
||||||
- "https://github.com/GREsau/schemars"
|
- "https://github.com/GREsau/schemars"
|
||||||
|
|
15
docs/_sass/color_schemes/default.scss
Normal file
15
docs/_sass/color_schemes/default.scss
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
// Overridable variables at https://github.com/pmarsceill/just-the-docs/blob/master/_sass/support/_variables.scss
|
||||||
|
|
||||||
|
$body-text-color: $grey-dk-200;
|
||||||
|
|
||||||
|
$nav-child-link-color: $link-color;
|
||||||
|
|
||||||
|
$content-width: 900px;
|
||||||
|
|
||||||
|
$media-queries: (
|
||||||
|
xs: 320px,
|
||||||
|
sm: 500px,
|
||||||
|
md: $content-width,
|
||||||
|
lg: $content-width + $nav-width,
|
||||||
|
xl: 1400px
|
||||||
|
);
|
|
@ -1,129 +1,34 @@
|
||||||
////
|
// Reposition/resize top-right nav buttons
|
||||||
//// Typography
|
.aux-nav a, .aux-nav a:hover {
|
||||||
////
|
background: none;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.aux-nav a img {
|
||||||
|
height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
//$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif;
|
// Enlarge and compress embedded code
|
||||||
//$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace;
|
pre.highlight, figure.highlight {
|
||||||
//$root-font-size: 16px; // Base font-size for rems
|
line-height: 1.2em;
|
||||||
//$body-line-height: 1.4;
|
}
|
||||||
//$content-line-height: 1.5;
|
code {
|
||||||
//$body-heading-line-height: 1.15;
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
////
|
// Always expand nav menu items
|
||||||
//// Colors
|
.nav-list .nav-list-item > .nav-list {
|
||||||
////
|
display: block;
|
||||||
|
}
|
||||||
|
.nav-list-expander {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
//$white: #fff;
|
// Indent text on attributes page
|
||||||
|
.indented > p {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
//$grey-dk-000: #959396;
|
// Hide ugly summary outline that chrome adds
|
||||||
//$grey-dk-100: #5c5962;
|
.main-content summary:focus {
|
||||||
//$grey-dk-200: #44434d;
|
outline: none;
|
||||||
//$grey-dk-250: #302d36;
|
}
|
||||||
//$grey-dk-300: #27262b;
|
|
||||||
|
|
||||||
//$grey-lt-000: #f5f6fa;
|
|
||||||
//$grey-lt-100: #eeebee;
|
|
||||||
//$grey-lt-200: #ecebed;
|
|
||||||
//$grey-lt-300: #e6e1e8;
|
|
||||||
|
|
||||||
//$purple-000: #7253ed;
|
|
||||||
//$purple-100: #5e41d0;
|
|
||||||
//$purple-200: #4e26af;
|
|
||||||
//$purple-300: #381885;
|
|
||||||
|
|
||||||
//$blue-000: #2c84fa;
|
|
||||||
//$blue-100: #2869e6;
|
|
||||||
//$blue-200: #264caf;
|
|
||||||
//$blue-300: #183385;
|
|
||||||
|
|
||||||
//$green-000: #41d693;
|
|
||||||
//$green-100: #11b584;
|
|
||||||
//$green-200: #009c7b;
|
|
||||||
//$green-300: #026e57;
|
|
||||||
|
|
||||||
//$yellow-000: #ffeb82;
|
|
||||||
//$yellow-100: #fadf50;
|
|
||||||
//$yellow-200: #f7d12e;
|
|
||||||
//$yellow-300: #e7af06;
|
|
||||||
|
|
||||||
//$red-000: #f77e7e;
|
|
||||||
//$red-100: #f96e65;
|
|
||||||
//$red-200: #e94c4c;
|
|
||||||
//$red-300: #dd2e2e;
|
|
||||||
|
|
||||||
//$body-background-color: $white;
|
|
||||||
//$sidebar-color: $grey-lt-000;
|
|
||||||
//$search-background-color: $white;
|
|
||||||
//$table-background-color: $white;
|
|
||||||
//$code-background-color: $grey-lt-000;
|
|
||||||
|
|
||||||
//$body-text-color: $grey-dk-100;
|
|
||||||
//$body-heading-color: $grey-dk-300;
|
|
||||||
//$search-result-preview-color: $grey-dk-000;
|
|
||||||
//$link-color: $purple-000;
|
|
||||||
$nav-child-link-color: $link-color;
|
|
||||||
//$btn-primary-color: $purple-100;
|
|
||||||
//$base-button-color: #f7f7f7;
|
|
||||||
|
|
||||||
////
|
|
||||||
//// Spacing
|
|
||||||
////
|
|
||||||
|
|
||||||
//$spacing-unit: 1rem; // 1rem == 16px
|
|
||||||
|
|
||||||
//$spacers: (
|
|
||||||
//sp-0: 0,
|
|
||||||
//sp-1: $spacing-unit * 0.25,
|
|
||||||
//sp-2: $spacing-unit * 0.5,
|
|
||||||
//sp-3: $spacing-unit * 0.75,
|
|
||||||
//sp-4: $spacing-unit,
|
|
||||||
//sp-5: $spacing-unit * 1.5,
|
|
||||||
//sp-6: $spacing-unit * 2,
|
|
||||||
//sp-7: $spacing-unit * 2.5,
|
|
||||||
//sp-8: $spacing-unit * 3,
|
|
||||||
//sp-9: $spacing-unit * 3.5,
|
|
||||||
//sp-10: $spacing-unit * 4
|
|
||||||
//);
|
|
||||||
|
|
||||||
//$sp-1: map-get($spacers, sp-1); // 0.25 rem == 4px
|
|
||||||
//$sp-2: map-get($spacers, sp-2); // 0.5 rem == 8px
|
|
||||||
//$sp-3: map-get($spacers, sp-3); // 0.75 rem == 12px
|
|
||||||
//$sp-4: map-get($spacers, sp-4); // 1 rem == 16px
|
|
||||||
//$sp-5: map-get($spacers, sp-5); // 1.5 rem == 24px
|
|
||||||
//$sp-6: map-get($spacers, sp-6); // 2 rem == 32px
|
|
||||||
//$sp-7: map-get($spacers, sp-7); // 2.5 rem == 40px
|
|
||||||
//$sp-8: map-get($spacers, sp-8); // 3 rem == 48px
|
|
||||||
//$sp-9: map-get($spacers, sp-9); // 4 rem == 48px
|
|
||||||
//$sp-10: map-get($spacers, sp-10); // 4.5 rem == 48px
|
|
||||||
|
|
||||||
////
|
|
||||||
//// Borders
|
|
||||||
////
|
|
||||||
|
|
||||||
//$border: 1px solid;
|
|
||||||
//$border-radius: 4px;
|
|
||||||
//$border-color: $grey-lt-100;
|
|
||||||
|
|
||||||
////
|
|
||||||
//// Grid system
|
|
||||||
////
|
|
||||||
|
|
||||||
//$gutter-spacing: $sp-6;
|
|
||||||
//$gutter-spacing-sm: $sp-4;
|
|
||||||
//$nav-width: 264px;
|
|
||||||
//$nav-width-md: 248px;
|
|
||||||
$content-width: 1000px;
|
|
||||||
//$header-height: 60px;
|
|
||||||
//$search-results-width: 500px;
|
|
||||||
|
|
||||||
////
|
|
||||||
//// Media queries in pixels
|
|
||||||
////
|
|
||||||
|
|
||||||
$media-queries: (
|
|
||||||
xs: 320px,
|
|
||||||
sm: 500px,
|
|
||||||
md: $content-width,
|
|
||||||
lg: $content-width + $nav-width,
|
|
||||||
xl: 1400px
|
|
||||||
);
|
|
|
@ -1,59 +0,0 @@
|
||||||
.aux-nav a:not([class]), .aux-nav a:not([class]):hover {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aux-nav .mr-2 {
|
|
||||||
margin-right: 0.1rem !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aux-nav a img {
|
|
||||||
height: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.highlight, figure.highlight {
|
|
||||||
line-height: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list-item .navigation-list-child-list {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list-item .navigation-list-link {
|
|
||||||
padding-top: .35rem;
|
|
||||||
padding-bottom: .45rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list-item > .navigation-list-link:not(:only-child) {
|
|
||||||
padding-bottom: .3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list-child-list .navigation-list-item .navigation-list-link {
|
|
||||||
padding-top: .25rem;
|
|
||||||
padding-bottom: .3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navigation-list-link:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
text-decoration-color: rgba($link-color, 0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
.indented {
|
|
||||||
margin-left: 20px;
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
|
||||||
margin-left: -20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
details summary {
|
|
||||||
display: list-item;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
details {
|
|
||||||
margin-bottom: 0.8rem;
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue