diff --git a/_config.yml b/_config.yml index bbdb44e0..45f0450a 100644 --- a/_config.yml +++ b/_config.yml @@ -1,23 +1,28 @@ title: EVM Networks description: >- # this means to ignore newlines until "baseurl:" - A site to share information about EVM powered networks. + A site to share information about EVM powered networks, especially their ChainID and NetworkID. baseurl: "" # the subpath of your site, e.g. /blog -url: "" # the base hostname & protocol for your site, e.g. http://example.com +url: "https://chainid.network" # the base hostname & protocol for your site, e.g. http://example.com # Build settings markdown: kramdown -theme: just-the-docs + +kramdown: + parse_block_html: true + +# theme: just-the-docs plugins: - jekyll-feed -# Exclude from processing. -# The following items will not be processed, by default. Create a custom list -# to override the default setting. -# exclude: -# - Gemfile -# - Gemfile.lock -# - node_modules -# - vendor/bundle/ -# - vendor/cache/ -# - vendor/gems/ -# - vendor/ruby/ +# --- just-the-docs theme --- + +# Enable or disable the site search +search_enabled: false + +# Aux links for the upper right navigation +aux_links: + "GitHub: ethereum-lists/chains": + - "//github.com/ethereum-lists/chains" + +# Color scheme currently only supports "dark" or nil (default) +color_scheme: nil diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 00000000..bf37f610 --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,16 @@ + + + + {% if page.description %} + + {% endif %} + + {{ page.title }} - {{ site.title }} + + {% if site.search_enabled %} + + {% endif %} + + + + diff --git a/_includes/nav.html b/_includes/nav.html new file mode 100644 index 00000000..2c4bf1ea --- /dev/null +++ b/_includes/nav.html @@ -0,0 +1,44 @@ + diff --git a/_layouts/about.html b/_layouts/about.html new file mode 100644 index 00000000..5e711268 --- /dev/null +++ b/_layouts/about.html @@ -0,0 +1,5 @@ +--- +layout: default +--- + +{{ content }} diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 00000000..a8cf2312 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,78 @@ + + + +{% include head.html %} + + +
+ +
+ +
+ {% unless page.url == "/" %} + {% if page.parent %} + + {% endif %} + {% endunless %} +
+ {{ content }} + + {% if page.has_children == true and page.has_toc != false %} +
+

Table of contents

+ {% assign children_list = site.pages | sort:"nav_order" %} +
    + {% for child in children_list %} + {% if child.parent == page.title and child.title != page.title %} +
  • + {{ child.title }} +
  • + {% endif %} + {% endfor %} +
+ {% endif %} +
+
+
+
+ + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 00000000..5e711268 --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,5 @@ +--- +layout: default +--- + +{{ content }} diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 00000000..5e711268 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,5 @@ +--- +layout: default +--- + +{{ content }} diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 00000000..5e711268 --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,5 @@ +--- +layout: default +--- + +{{ content }} diff --git a/_sass/base.scss b/_sass/base.scss new file mode 100644 index 00000000..1ea39036 --- /dev/null +++ b/_sass/base.scss @@ -0,0 +1,110 @@ +// +// Base element style overrides +// +// stylelint-disable selector-no-type, selector-max-type + +* { + box-sizing: border-box; +} + +::selection { + color: $white; + background: $link-color; +} + +html { + @include fs-4; +} + +body { + font-family: $body-font-family; + font-size: inherit; + line-height: $body-line-height; + color: $body-text-color; + background-color: $body-background-color; +} + +p, +h1, +h2, +h3, +h4, +h5, +h6, +ol, +ul, +pre, +address, +blockquote, +dl, +div, +fieldset, +form, +hr, +noscript, +table { + margin-top: 0; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: 1.2em; + margin-bottom: 0.8em; + font-weight: 500; + line-height: $body-heading-line-height; + color: $body-heading-color; +} + +p { + margin-bottom: 1em; +} + +a { + color: $link-color; + text-decoration: none; +} + +a:not([class]) { + text-decoration: none; + background-image: linear-gradient($border-color 0%, $border-color 100%); + background-repeat: repeat-x; + background-position: 0 100%; + background-size: 1px 1px; + + &:hover { + background-image: linear-gradient(rgba($link-color, 0.45) 0%, rgba($link-color, 0.45) 100%); + background-size: 1px 1px; + + } +} + +code { + font-family: $mono-font-family; + font-size: 12px; + line-height: $body-line-height; +} + +figure { + margin: 0; +} + +li { + margin: 0.25em 0; +} + +img { + max-width: 100%; + height: auto; +} + +hr { + height: 1px; + padding: 0; + margin: $sp-6 0; + background-color: $border-color; + border: 0; +} diff --git a/_sass/buttons.scss b/_sass/buttons.scss new file mode 100644 index 00000000..05db0ed9 --- /dev/null +++ b/_sass/buttons.scss @@ -0,0 +1,118 @@ +// +// Buttons and things that look like buttons +// +// stylelint-disable color-named + +.btn { + display: inline-block; + box-sizing: border-box; + padding-top: 0.3em; + padding-right: 1em; + padding-bottom: 0.3em; + padding-left: 1em; + margin: 0; + font-family: inherit; + font-size: inherit; + font-weight: 500; + line-height: 1.5; + color: $link-color; + text-decoration: none; + vertical-align: baseline; + cursor: pointer; + background-color: $base-button-color; + border-width: 0; + border-radius: 3px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.08); + appearance: none; + + &:focus { + text-decoration: none; + outline: none; + box-shadow: 0 0 0 3px rgba(blue, 0.25); + } + + &:focus:hover, + &.selected:focus { + box-shadow: 0 0 0 3px rgba(blue, 0.25); + } + + &:hover, + &.zeroclipboard-is-hover { + color: darken($link-color, 2%); + } + + &:hover, + &:active, + &.zeroclipboard-is-hover, + &.zeroclipboard-is-active { + text-decoration: none; + background-color: darken($base-button-color, 1%); + } + + &:active, + &.selected, + &.zeroclipboard-is-active { + background-color: darken($base-button-color, 3%); + background-image: none; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); + } + + &.selected:hover { + background-color: darken(#dcdcdc, 5%); + } + + &:disabled, + &.disabled { + &, + &:hover { + color: rgba(102, 102, 102, 0.5); + cursor: default; + background-color: rgba(229, 229, 229, 0.5); + background-image: none; + box-shadow: none; + } + } +} + +.btn-outline { + color: $link-color; + background: transparent; + box-shadow: inset 0 0 0 2px $grey-lt-300; + + &:hover, + &:active, + &.zeroclipboard-is-hover, + &.zeroclipboard-is-active { + color: darken($link-color, 4%); + text-decoration: none; + background-color: transparent; + box-shadow: inset 0 0 0 3px $grey-lt-300; + } + + &:focus { + text-decoration: none; + outline: none; + box-shadow: inset 0 0 0 2px $grey-dk-100, 0 0 0 3px rgba(blue, 0.25); + } + + &:focus:hover, + &.selected:focus { + box-shadow: inset 0 0 0 2px $grey-dk-100; + } +} + +.btn-primary { + @include btn-color($white, $btn-primary-color); +} + +.btn-purple { + @include btn-color($white, $purple-100); +} + +.btn-blue { + @include btn-color($white, $blue-000); +} + +.btn-green { + @include btn-color($white, $green-100); +} diff --git a/_sass/code.scss b/_sass/code.scss new file mode 100644 index 00000000..e8989f31 --- /dev/null +++ b/_sass/code.scss @@ -0,0 +1,122 @@ +// +// Code and syntax highlighting +// +// stylelint-disable selector-no-qualifying-type, declaration-block-semicolon-newline-after,declaration-block-single-line-max-declarations, selector-no-type, selector-max-type + +code { + padding: 0.2em 0.15em; + font-weight: 400; + background-color: $code-background-color; + border: $border $border-color; + border-radius: $border-radius; +} + +pre.highlight { + padding: $sp-3; + margin-bottom: 0; + -webkit-overflow-scrolling: touch; + background-color: $code-background-color; + + code { + padding: 0; + border: 0; + } +} + +.highlighter-rouge { + margin-bottom: $sp-3; + overflow: hidden; + border-radius: $border-radius; +} + +.highlight .c { color: #586e75; } // comment // +.highlight .err { color: #93a1a1; } // error // +.highlight .g { color: #93a1a1; } // generic // +.highlight .k { color: #859900; } // keyword // +.highlight .l { color: #93a1a1; } // literal // +.highlight .n { color: #93a1a1; } // name // +.highlight .o { color: #859900; } // operator // +.highlight .x { color: #cb4b16; } // other // +.highlight .p { color: #93a1a1; } // punctuation // +.highlight .cm { color: #586e75; } // comment.multiline // +.highlight .cp { color: #859900; } // comment.preproc // +.highlight .c1 { color: #586e75; } // comment.single // +.highlight .cs { color: #859900; } // comment.special // +.highlight .gd { color: #2aa198; } // generic.deleted // +.highlight .ge { font-style: italic; color: #93a1a1; } // generic.emph // +.highlight .gr { color: #dc322f; } // generic.error // +.highlight .gh { color: #cb4b16; } // generic.heading // +.highlight .gi { color: #859900; } // generic.inserted // +.highlight .go { color: #93a1a1; } // generic.output // +.highlight .gp { color: #93a1a1; } // generic.prompt // +.highlight .gs { font-weight: bold; color: #93a1a1; } // generic.strong // +.highlight .gu { color: #cb4b16; } // generic.subheading // +.highlight .gt { color: #93a1a1; } // generic.traceback // +.highlight .kc { color: #cb4b16; } // keyword.constant // +.highlight .kd { color: #268bd2; } // keyword.declaration // +.highlight .kn { color: #859900; } // keyword.namespace // +.highlight .kp { color: #859900; } // keyword.pseudo // +.highlight .kr { color: #268bd2; } // keyword.reserved // +.highlight .kt { color: #dc322f; } // keyword.type // +.highlight .ld { color: #93a1a1; } // literal.date // +.highlight .m { color: #2aa198; } // literal.number // +.highlight .s { color: #2aa198; } // literal.string // +.highlight .na { color: #93a1a1; } // name.attribute // +.highlight .nb { color: #b58900; } // name.builtin // +.highlight .nc { color: #268bd2; } // name.class // +.highlight .no { color: #cb4b16; } // name.constant // +.highlight .nd { color: #268bd2; } // name.decorator // +.highlight .ni { color: #cb4b16; } // name.entity // +.highlight .ne { color: #cb4b16; } // name.exception // +.highlight .nf { color: #268bd2; } // name.function // +.highlight .nl { color: #93a1a1; } // name.label // +.highlight .nn { color: #93a1a1; } // name.namespace // +.highlight .nx { color: #555; } // name.other // +.highlight .py { color: #93a1a1; } // name.property // +.highlight .nt { color: #268bd2; } // name.tag // +.highlight .nv { color: #268bd2; } // name.variable // +.highlight .ow { color: #859900; } // operator.word // +.highlight .w { color: #93a1a1; } // text.whitespace // +.highlight .mf { color: #2aa198; } // literal.number.float // +.highlight .mh { color: #2aa198; } // literal.number.hex // +.highlight .mi { color: #2aa198; } // literal.number.integer // +.highlight .mo { color: #2aa198; } // literal.number.oct // +.highlight .sb { color: #586e75; } // literal.string.backtick // +.highlight .sc { color: #2aa198; } // literal.string.char // +.highlight .sd { color: #93a1a1; } // literal.string.doc // +.highlight .s2 { color: #2aa198; } // literal.string.double // +.highlight .se { color: #cb4b16; } // literal.string.escape // +.highlight .sh { color: #93a1a1; } // literal.string.heredoc // +.highlight .si { color: #2aa198; } // literal.string.interpol // +.highlight .sx { color: #2aa198; } // literal.string.other // +.highlight .sr { color: #dc322f; } // literal.string.regex // +.highlight .s1 { color: #2aa198; } // literal.string.single // +.highlight .ss { color: #2aa198; } // literal.string.symbol // +.highlight .bp { color: #268bd2; } // name.builtin.pseudo // +.highlight .vc { color: #268bd2; } // name.variable.class // +.highlight .vg { color: #268bd2; } // name.variable.global // +.highlight .vi { color: #268bd2; } // name.variable.instance // +.highlight .il { color: #2aa198; } // literal.number.integer.long // + +// +// Code examples (rendered) +// + +.code-example { + padding: $sp-3; + margin-bottom: $sp-3; + overflow: auto; + border: 1px solid $border-color; + border-radius: $border-radius; + + + .highlighter-rouge, + + figure.highlight { + position: relative; + margin-top: -$sp-4; + border-right: 1px solid $border-color; + border-bottom: 1px solid $border-color; + border-left: 1px solid $border-color; + border-top-left-radius: 0; + border-top-right-radius: 0; + } +} diff --git a/_sass/color_schemes/dark.scss b/_sass/color_schemes/dark.scss new file mode 100644 index 00000000..6c2e8a9c --- /dev/null +++ b/_sass/color_schemes/dark.scss @@ -0,0 +1,14 @@ + +$body-background-color: $grey-dk-300; +$sidebar-color: $grey-dk-300; +$border-color: $grey-dk-200; + +$body-text-color: $grey-lt-300; +$body-heading-color: $grey-lt-000; +$nav-child-link-color: $grey-dk-000; + +$link-color: $blue-000; +$btn-primary-color: $blue-200; +$base-button-color: $grey-dk-250; + +$code-background-color: $grey-dk-250; diff --git a/_sass/content.scss b/_sass/content.scss new file mode 100644 index 00000000..1d47c9db --- /dev/null +++ b/_sass/content.scss @@ -0,0 +1,114 @@ +@charset "UTF-8"; + +// +// Styles for rendered markdown in the .main-content container +// +// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type + +.page-content { + a { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + ul, + ol { + padding-left: 1.5em; + } + + ol { + list-style-type: none; + counter-reset: step-counter; + + li { + position: relative; + + &::before { + position: absolute; + top: 0.2em; + left: -1.5em; + color: $grey-dk-000; + content: counter(step-counter); + counter-increment: step-counter; + @include fs-3; + + @include mq(sm) { + top: 0.11em; + } + } + + ol { + counter-reset: sub-counter; + + li { + &::before { + content: counter(sub-counter, lower-alpha); + counter-increment: sub-counter; + } + } + } + } + } + + ul { + list-style: none; + + li { + &::before { + position: absolute; + margin-left: -1.5em; + color: $grey-dk-000; + content: "•"; + } + } + } + + .task-list { + padding-left: 0; + } + + .task-list-item { + display: flex; + align-items: center; + + &::before { + content: ""; + } + } + + .task-list-item-checkbox { + margin-right: 0.6em; + } + + hr + * { + margin-top: 0; + } + + h1:first-of-type { + margin-top: 0.5em; + } + + dl { + display: grid; + grid-template-columns: max-content 1fr; + } + + dt, + dd { + margin: 0.25em 0; + } + + dt { + text-align: right; + + &::after { + content: ":"; + } + } + + dd { + margin-left: 1em; + font-weight: 500; + } +} diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss new file mode 100644 index 00000000..82064a55 --- /dev/null +++ b/_sass/custom/custom.scss @@ -0,0 +1,120 @@ +// // +// // Typography +// // +// +// $body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif; +// $mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace; +// $root-font-size: 16px; // Base font-size for rems +// $body-line-height: 1.4; +// $body-heading-line-height: 1.15; +// +// // +// // Colors +// // +// +// $white: #fff; +// +// $grey-dk-000: #959396; +// $grey-dk-100: #5c5962; +// $grey-dk-200: #44434d; +// $grey-dk-250: #302d36 !default; +// $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; +// +// $body-background-color: $white !default; +// $sidebar-color: $grey-lt-000 !default; +// $code-background-color: $grey-lt-000 !default; + +// $body-text-color: $grey-dk-100 !default; +// $body-heading-color: $grey-dk-300 !default; +// $nav-child-link-color: $grey-dk-100 !default; +// $link-color: $purple-000 !default; +// $btn-primary-color: $purple-100 !default; +// $base-button-color: #f7f7f7 !default; +// +// // +// // Media queries in pixels +// // +// +// $media-queries: ( +// xs: 320px, +// sm: 500px, +// md: 740px, +// lg: 1120px, +// xl: 1400px +// ); +// +// // +// // 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: 232px; +// $content-width: 800px; +// +// $media-queries: ( +// xs: 320px, +// sm: 500px, +// md: 740px, +// lg: 800px, +// xl: 1316px +// ); diff --git a/_sass/labels.scss b/_sass/labels.scss new file mode 100644 index 00000000..23cc5101 --- /dev/null +++ b/_sass/labels.scss @@ -0,0 +1,36 @@ +// +// Labels (not the form kind) +// + +.label, +.label-blue { + display: inline-block; + padding-top: 0.16em; + padding-right: 0.42em; + padding-bottom: 0.16em; + padding-left: 0.42em; + margin-right: $sp-1; + margin-left: $sp-1; + color: $white; + text-transform: uppercase; + vertical-align: middle; + background-color: $blue-100; + @include fs-2; +} + +.label-green { + background-color: $green-200; +} + +.label-purple { + background-color: $purple-100; +} + +.label-red { + background-color: $red-200; +} + +.label-yellow { + color: $grey-dk-200; + background-color: $yellow-200; +} diff --git a/_sass/layout.scss b/_sass/layout.scss new file mode 100644 index 00000000..11be435c --- /dev/null +++ b/_sass/layout.scss @@ -0,0 +1,147 @@ +// +// The basic two column layout +// + +.page-wrap { + @include mq(md) { + position: absolute; + top: 0; + left: 0; + display: flex; + width: 100%; + height: 100%; + overflow-x: hidden; + overflow-y: hidden; + } +} + +.side-bar { + z-index: 100; + display: flex; + flex-wrap: wrap; + padding-top: $gutter-spacing-sm; + padding-bottom: $gutter-spacing-sm; + background-color: $sidebar-color; + + @include mq(md) { + flex-wrap: nowrap; + position: absolute; + width: $nav-width + 16px; + height: 100%; + padding-top: $gutter-spacing * 2; + padding-bottom: 0; + flex-direction: column; + border-right: $border $border-color; + align-items: flex-end; + } + + @include mq(lg) { + width: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width}); + min-width: $nav-width; + } +} + +.main-content-wrap { + @include mq(md) { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + min-height: 600px; + -webkit-overflow-scrolling: touch; + overflow-x: hidden; + overflow-y: scroll; + } +} + +.main-content { + padding-top: $gutter-spacing-sm; + @include container; + + @include mq(md) { + position: relative; + max-width: $content-width; + padding-top: $gutter-spacing; + padding-bottom: $gutter-spacing; + padding-left: $gutter-spacing * 1.5; + margin-left: $nav-width; + } + + @include mq(lg) { + padding-left: $gutter-spacing; + margin-left: calc((100% - #{$nav-width + $content-width}) / 2 + #{$nav-width}); + } +} + +.js-main-content:focus { + outline: none; +} + +.page-header { + background-color: $sidebar-color; + + @include mq(md) { + background-color: $body-background-color; + } + + .main-content { + padding-top: 0; + + @include mq(md) { + display: flex; + justify-content: flex-end; + height: 60px; + padding-top: $sp-4; + padding-bottom: $sp-4; + border-bottom: $border $border-color; + } + } +} + +.navigation, +.site-title, +.site-footer { + + @include container; + + width: 100%; + + @include mq(lg) { + width: $nav-width + 32px; + } +} + +.navigation { + @include mq(md) { + padding-top: $sp-8; + overflow-y: auto; + flex: 1 1 auto; + } +} + +// stylelint-disable selector-no-type +body { + position: relative; + padding-bottom: $sp-10; + + @include mq(md) { + position: static; + padding-bottom: 0; + } +} +// stylelint-enable selector-no-type + +.site-footer { + position: absolute; + bottom: 0; + padding-top: $sp-4; + padding-bottom: $sp-4; + + @include mq(md) { + position: static; + align-self: flex-end; + justify-self: end; + background-color: $sidebar-color; + } +} diff --git a/_sass/navigation.scss b/_sass/navigation.scss new file mode 100644 index 00000000..364c569a --- /dev/null +++ b/_sass/navigation.scss @@ -0,0 +1,148 @@ +// +// Main nav, breadcrumb, etc... +// + +.site-title { + display: block; + flex: 1 1 auto; + color: $body-heading-color; + background-color: $sidebar-color; + + @include mq(md) { + position: absolute; + top: 0; + right: 0; + z-index: 101; + height: 60px; + padding-top: $sp-4; + border-bottom: $border $border-color; + } +} + +.navigation-list { + padding: 0; + margin-top: $sp-4; + margin-bottom: 0; + list-style: none; + + @include mq(md) { + margin-top: 0; + } +} + +.navigation-list-child-list { + padding-left: $sp-3; + list-style: none; + + .navigation-list-link { + color: $nav-child-link-color; + } + + .navigation-list-item { + position: relative; + + &::before { + position: absolute; + margin-top: 0.3em; + margin-left: -0.8em; + color: rgba($body-text-color, 0.3); + content: "- "; + } + + &.active { + &::before { + color: $body-text-color; + } + } + } +} + +.navigation-list-item { + @include fs-4; + margin: 0; + + @include mq(md) { + @include fs-3; + } + + .navigation-list-child-list { + display: none; + } + + &.active { + .navigation-list-child-list { + display: block; + } + } +} + +.navigation-list-link { + display: block; + padding-top: $sp-1; + padding-bottom: $sp-1; + + &.active { + font-weight: 600; + color: $body-heading-color; + text-decoration: none; + } +} + +// Small screen nav + +.main-nav, +.aux-nav { + display: none; + + &.nav-open { + display: block; + } + @include mq(md) { + display: block; + } +} + +.navigation-list-toggle { + position: absolute; + right: $sp-4; + + @include mq(md) { + display: none !important; + } +} + +// Breadcrumb nav +.breadcrumb-nav { + @include mq(md) { + margin-top: -$sp-4; + } +} + +.breadcrumb-nav-list { + padding-left: 0; + margin-bottom: $sp-3; + list-style: none; +} + +.breadcrumb-nav-list-item { + display: table-cell; + @include fs-2; + + &::before { + display: none; + } + + &::after { + display: inline-block; + margin-right: $sp-2; + margin-left: $sp-2; + color: $grey-dk-000; + content: "/"; + } + + &:last-child { + &::after { + content: ""; + } + } +} diff --git a/_sass/search.scss b/_sass/search.scss new file mode 100644 index 00000000..32ec1dbe --- /dev/null +++ b/_sass/search.scss @@ -0,0 +1,114 @@ +// +// Search input and autocomplete +// + +.search { + position: relative; + z-index: 99; + display: none; + flex-grow: 1; + padding: $sp-2; + margin-bottom: $sp-3; + background-color: $white; + border-radius: 3px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07), 0 3px 10px rgba(0, 0, 0, 0.05); + + @include mq(md) { + display: block; + padding-top: $sp-1; + padding-right: 0; + padding-bottom: 0; + padding-left: 0; + margin-bottom: 0; + background-color: transparent; + box-shadow: none; + } + + &.nav-open { + display: block; + } +} + +.search-results-wrap { + display: none; + + &.active { + position: absolute; + top: $sp-1; + z-index: 100; + display: block; + width: 300px; + margin-top: $gutter-spacing; + background: lighten($body-background-color, 1%); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05); + } +} + +.search-input-wrap { + display: flex; + background-color: $body-background-color; +} + +.search-input { + width: 100%; + padding-top: $sp-1; + padding-bottom: $sp-1; + background-color: $body-background-color; + border-top: 0; + border-right: 0; + border-bottom: 0; + border-left: 0; + order: 2; + + &:focus { + outline: 0; + box-shadow: none; + + + .search-icon { + fill: $link-color; + } + } + + @include fs-5; + + @include mq(sm) { + @include fs-3; + } + + @include mq(md) { + @include fs-2; + } +} + +.search-icon { + align-self: center; + margin-right: $sp-2; + fill: $grey-dk-000; + order: 1; +} + +.search-results-list { + padding-left: 0; + margin-top: $sp-1; + margin-bottom: $sp-1; + list-style: none; + @include fs-3; +} + +.search-results-list-item { + padding: 0; + margin: 0; +} + +.search-results-link { + display: block; + padding-top: $sp-1; + padding-right: $sp-3; + padding-bottom: $sp-1; + padding-left: $sp-3; + + &:hover { + color: $body-heading-color; + background-color: darken($body-background-color, 2%); + } +} diff --git a/_sass/support/_functions.scss b/_sass/support/_functions.scss new file mode 100644 index 00000000..e9885f62 --- /dev/null +++ b/_sass/support/_functions.scss @@ -0,0 +1,10 @@ +@function rem($size, $unit:"") { + $remSize: $size / $root-font-size; + + @if ($unit == false) { + @return #{$remSize}; + } + @else { + @return #{$remSize}rem; + } +} diff --git a/_sass/support/_variables.scss b/_sass/support/_variables.scss new file mode 100644 index 00000000..8a09eda3 --- /dev/null +++ b/_sass/support/_variables.scss @@ -0,0 +1,130 @@ +// +// Typography +// + +$body-font-family: -apple-system, BlinkMacSystemFont, "helvetica neue", helvetica, roboto, noto, "segoe ui", arial, sans-serif !default; +$mono-font-family: "SFMono-Regular", Menlo, Consolas, Monospace !default; +$root-font-size: 16px !default; // Base font-size for rems +$body-line-height: 1.4 !default; +$body-heading-line-height: 1.15 !default !default; + +// +// Colors +// + +$white: #fff !default; + +$grey-dk-000: #959396 !default; +$grey-dk-100: #5c5962 !default; +$grey-dk-200: #44434d !default; +$grey-dk-250: #302d36 !default; +$grey-dk-300: #27262b !default; + +$grey-lt-000: #f5f6fa !default; +$grey-lt-100: #eeebee !default; +$grey-lt-200: #ecebed !default; +$grey-lt-300: #e6e1e8 !default; + +$purple-000: #7253ed !default; +$purple-100: #5e41d0 !default; +$purple-200: #4e26af !default; +$purple-300: #381885 !default; + +$blue-000: #2c84fa !default; +$blue-100: #2869e6 !default; +$blue-200: #264caf !default; +$blue-300: #183385 !default; + +$green-000: #41d693 !default; +$green-100: #11b584 !default; +$green-200: #009c7b !default; +$green-300: #026e57 !default; + +$yellow-000: #ffeb82 !default; +$yellow-100: #fadf50 !default; +$yellow-200: #f7d12e !default; +$yellow-300: #e7af06 !default; + +$red-000: #f77e7e !default; +$red-100: #f96e65 !default; +$red-200: #e94c4c !default; +$red-300: #dd2e2e !default; + +$body-background-color: $white !default; +$sidebar-color: $grey-lt-000 !default; +$code-background-color: $grey-lt-000 !default; + +$body-text-color: $grey-dk-100 !default; +$body-heading-color: $grey-dk-300 !default; +$nav-child-link-color: $grey-dk-100 !default; +$link-color: $purple-000 !default; +$btn-primary-color: $purple-100 !default; +$base-button-color: #f7f7f7 !default; + +// +// Media queries in pixels +// + +$media-queries: ( + xs: 320px, + sm: 500px, + md: 740px, + lg: 1120px, + xl: 1400px +) !default; + +// +// 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 +) !default; + +$sp-1: map-get($spacers, sp-1) !default; // 0.25 rem == 4px +$sp-2: map-get($spacers, sp-2) !default; // 0.5 rem == 8px +$sp-3: map-get($spacers, sp-3) !default; // 0.75 rem == 12px +$sp-4: map-get($spacers, sp-4) !default; // 1 rem == 16px +$sp-5: map-get($spacers, sp-5) !default; // 1.5 rem == 24px +$sp-6: map-get($spacers, sp-6) !default; // 2 rem == 32px +$sp-7: map-get($spacers, sp-7) !default; // 2.5 rem == 40px +$sp-8: map-get($spacers, sp-8) !default; // 3 rem == 48px +$sp-9: map-get($spacers, sp-9) !default; // 4 rem == 48px +$sp-10: map-get($spacers, sp-10) !default; // 4.5 rem == 48px + +// +// Borders +// + +$border: 1px solid !default; +$border-radius: 4px !default; +$border-color: $grey-lt-100 !default; + +// +// Grid system +// + +$gutter-spacing: $sp-6 !default; +$gutter-spacing-sm: $sp-4 !default; +$nav-width: 232px !default; +$content-width: 800px !default; + +$media-queries: ( + xs: 320px, + sm: 500px, + md: 740px, + lg: 800px, + xl: 1316px +) !default; diff --git a/_sass/support/mixins/_buttons.scss b/_sass/support/mixins/_buttons.scss new file mode 100644 index 00000000..e3e6c4fb --- /dev/null +++ b/_sass/support/mixins/_buttons.scss @@ -0,0 +1,27 @@ +// Colored button + +@mixin btn-color($fg, $bg) { + color: $fg; + background-color: darken($bg, 2%); + background-image: linear-gradient(lighten($bg, 5%), darken($bg, 2%)); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.12); + + &:hover, + &.zeroclipboard-is-hover { + color: $fg; + background-color: darken($bg, 4%); + background-image: linear-gradient((lighten($bg, 2%), darken($bg, 4%))); + } + + &:active, + &.selected, + &.zeroclipboard-is-active { + background-color: darken($bg, 5%); + background-image: none; + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15); + } + + &.selected:hover { + background-color: darken($bg, 10%); + } +} diff --git a/_sass/support/mixins/_layout.scss b/_sass/support/mixins/_layout.scss new file mode 100644 index 00000000..7e7967e4 --- /dev/null +++ b/_sass/support/mixins/_layout.scss @@ -0,0 +1,36 @@ +// Media query + +// Media query mixin +// Usage: +// @include mq(md) { +// ..medium and up styles +// } +@mixin mq($name) { + // Retrieves the value from the key + $value: map-get($media-queries, $name); + + // If the key exists in the map + @if $value != null { + // Prints a media query based on the value + @media (min-width: rem($value)) { + @content; + } + } + + @else { + @warn "No value could be retrieved from `#{$media-query}`. " + + "Please make sure it is defined in `$media-queries` map."; + } +} + +// Responsive container + +@mixin container { + padding-right: $gutter-spacing-sm; + padding-left: $gutter-spacing-sm; + + @include mq(md) { + padding-right: $gutter-spacing; + padding-left: $gutter-spacing; + } +} diff --git a/_sass/support/mixins/_typography.scss b/_sass/support/mixins/_typography.scss new file mode 100644 index 00000000..e6d85bea --- /dev/null +++ b/_sass/support/mixins/_typography.scss @@ -0,0 +1,81 @@ +// Font size + +@mixin fs-1 { + font-size: 9px !important; + + @include mq(sm) { + font-size: 10px !important; + } +} + +@mixin fs-2 { + font-size: 11px !important; + + @include mq(sm) { + font-size: 12px !important; + } +} + +@mixin fs-3 { + font-size: 12px !important; + + @include mq(sm) { + font-size: 14px !important; + } +} + +@mixin fs-4 { + font-size: 14px !important; + + @include mq(sm) { + font-size: 16px !important; + } +} + +@mixin fs-5 { + font-size: 16px !important; + + @include mq(sm) { + font-size: 18px !important; + } +} + +@mixin fs-6 { + font-size: 18px !important; + + @include mq(sm) { + font-size: 24px !important; + } +} + +@mixin fs-7 { + font-size: 24px !important; + + @include mq(sm) { + font-size: 32px !important; + } +} + +@mixin fs-8 { + font-size: 32px !important; + + @include mq(sm) { + font-size: 36px !important; + } +} + +@mixin fs-9 { + font-size: 36px !important; + + @include mq(sm) { + font-size: 42px !important; + } +} + +@mixin fs-10 { + font-size: 42px !important; + + @include mq(sm) { + font-size: 48px !important; + } +} diff --git a/_sass/support/mixins/mixins.scss b/_sass/support/mixins/mixins.scss new file mode 100644 index 00000000..0506fbf5 --- /dev/null +++ b/_sass/support/mixins/mixins.scss @@ -0,0 +1,3 @@ +@import "./layout"; +@import "./buttons"; +@import "./typography"; diff --git a/_sass/support/support.scss b/_sass/support/support.scss new file mode 100644 index 00000000..8131a320 --- /dev/null +++ b/_sass/support/support.scss @@ -0,0 +1,3 @@ +@import "./variables"; +@import "./functions"; +@import "./mixins/mixins"; diff --git a/_sass/tables.scss b/_sass/tables.scss new file mode 100644 index 00000000..39bc0dc3 --- /dev/null +++ b/_sass/tables.scss @@ -0,0 +1,78 @@ +// +// Tables +// +// stylelint-disable max-nesting-depth, selector-no-type, selector-max-type + +table { + display: block; + width: 100%; + max-width: 100%; + margin-bottom: $sp-5; + overflow-x: auto; + border-collapse: separate; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 14px rgba(0, 0, 0, 0.05); + + @include mq(sm) { + display: table; + } +} + +th, +td { + @include fs-3; + min-width: 120px; + padding-top: $sp-2; + padding-right: $sp-3; + padding-bottom: $sp-2; + padding-left: $sp-3; + background-color: lighten($body-background-color, 2%); + border-bottom: $border rgba($border-color, 0.5); + border-left: $border $border-color; + + &:first-of-type { + border-left: 0; + } +} + +thead, +tbody:first-child { + tr { + &:first-of-type { + th, + td { + &:first-of-type { + border-top-left-radius: $border-radius; + } + + &:last-of-type { + border-top-right-radius: $border-radius; + } + } + } + } +} + +tbody { + tr { + &:last-of-type { + th, + td { + border-bottom: 0; + + &:first-of-type { + border-bottom-left-radius: $border-radius; + } + + &:last-of-type { + border-bottom-right-radius: $border-radius; + } + } + } + } +} + +thead { + th { + border-bottom: 1px solid $border-color; + } +} diff --git a/_sass/typography.scss b/_sass/typography.scss new file mode 100644 index 00000000..ac1eed98 --- /dev/null +++ b/_sass/typography.scss @@ -0,0 +1,58 @@ +// +// Typography +// +// stylelint-disable primer/selector-no-utility, selector-no-type, selector-max-type + +h1, +.text-alpha { + @include fs-8; + font-weight: 300; +} + +h2, +.text-beta { + @include fs-6; +} + +h3, +.text-gamma { + @include fs-5; +} + +h4, +.text-delta { + @include fs-2; + font-weight: 300; + text-transform: uppercase; + letter-spacing: 0.1em; +} + +h5, +.text-epsilon { + @include fs-3; + color: $grey-dk-200; +} + +h6, +.text-zeta { + @include fs-2; + color: $grey-dk-200; +} + +li { + .highlight { + margin-top: $sp-2; + } +} + +.text-small { + @include fs-2; +} + +.text-mono { + font-family: $mono-font-family !important; +} + +.text-center { + text-align: center !important; +} diff --git a/_sass/utilities/_colors.scss b/_sass/utilities/_colors.scss new file mode 100644 index 00000000..f3607ab8 --- /dev/null +++ b/_sass/utilities/_colors.scss @@ -0,0 +1,239 @@ +// +// Utility classes for colors +// + +// Text colors + +.text-grey-dk-000 { + color: $grey-dk-000 !important; +} + +.text-grey-dk-100 { + color: $grey-dk-100 !important; +} + +.text-grey-dk-200 { + color: $grey-dk-200 !important; +} + +.text-grey-dk-250 { + color: $grey-dk-250 !important; +} + +.text-grey-dk-300 { + color: $grey-dk-300 !important; +} + +.text-grey-lt-000 { + color: $grey-lt-000 !important; +} + +.text-grey-lt-100 { + color: $grey-lt-100 !important; +} + +.text-grey-lt-200 { + color: $grey-lt-200 !important; +} + +.text-grey-lt-300 { + color: $grey-lt-300 !important; +} + +.text-blue-000 { + color: $blue-000 !important; +} + +.text-blue-100 { + color: $blue-100 !important; +} + +.text-blue-200 { + color: $blue-200 !important; +} + +.text-blue-300 { + color: $blue-300 !important; +} + +.text-green-000 { + color: $green-000 !important; +} + +.text-green-100 { + color: $green-100 !important; +} + +.text-green-200 { + color: $green-200 !important; +} + +.text-green-300 { + color: $green-300 !important; +} + +.text-purple-000 { + color: $purple-000 !important; +} + +.text-purple-100 { + color: $purple-100 !important; +} + +.text-purple-200 { + color: $purple-200 !important; +} + +.text-purple-300 { + color: $purple-300 !important; +} + +.text-yellow-000 { + color: $yellow-000 !important; +} + +.text-yellow-100 { + color: $yellow-100 !important; +} + +.text-yellow-200 { + color: $yellow-200 !important; +} + +.text-yellow-300 { + color: $yellow-300 !important; +} + +.text-red-000 { + color: $red-000 !important; +} + +.text-red-100 { + color: $red-100 !important; +} + +.text-red-200 { + color: $red-200 !important; +} + +.text-red-300 { + color: $red-300 !important; +} + +// Background colors + +.bg-grey-dk-000 { + background-color: $grey-dk-000 !important; +} + +.bg-grey-dk-100 { + background-color: $grey-dk-100 !important; +} + +.bg-grey-dk-200 { + background-color: $grey-dk-200 !important; +} + +.bg-grey-dk-250 { + background-color: $grey-dk-250 !important; +} + +.bg-grey-dk-300 { + background-color: $grey-dk-300 !important; +} + +.bg-grey-lt-000 { + background-color: $grey-lt-000 !important; +} + +.bg-grey-lt-100 { + background-color: $grey-lt-100 !important; +} + +.bg-grey-lt-200 { + background-color: $grey-lt-200 !important; +} + +.bg-grey-lt-300 { + background-color: $grey-lt-300 !important; +} + +.bg-blue-000 { + background-color: $blue-000 !important; +} + +.bg-blue-100 { + background-color: $blue-100 !important; +} + +.bg-blue-200 { + background-color: $blue-200 !important; +} + +.bg-blue-300 { + background-color: $blue-300 !important; +} + +.bg-green-000 { + background-color: $green-000 !important; +} + +.bg-green-100 { + background-color: $green-100 !important; +} + +.bg-green-200 { + background-color: $green-200 !important; +} + +.bg-green-300 { + background-color: $green-300 !important; +} + +.bg-purple-000 { + background-color: $purple-000 !important; +} + +.bg-purple-100 { + background-color: $purple-100 !important; +} + +.bg-purple-200 { + background-color: $purple-200 !important; +} + +.bg-purple-300 { + background-color: $purple-300 !important; +} + +.bg-yellow-000 { + background-color: $yellow-000 !important; +} + +.bg-yellow-100 { + background-color: $yellow-100 !important; +} + +.bg-yellow-200 { + background-color: $yellow-200 !important; +} + +.bg-yellow-300 { + background-color: $yellow-300 !important; +} + +.bg-red-000 { + background-color: $red-000 !important; +} + +.bg-red-100 { + background-color: $red-100 !important; +} + +.bg-red-200 { + background-color: $red-200 !important; +} + +.bg-red-300 { + background-color: $red-300 !important; +} diff --git a/_sass/utilities/_layout.scss b/_sass/utilities/_layout.scss new file mode 100644 index 00000000..d16ed5a9 --- /dev/null +++ b/_sass/utilities/_layout.scss @@ -0,0 +1,38 @@ +// stylelint-disable primer/selector-no-utility +// +// Utility classes for layout +// + +// Display + +.d-block { display: block !important; } +.d-flex { display: flex !important; } +.d-inline { display: inline !important; } +.d-inline-block { display: inline-block !important; } +.d-none { display: none !important; } + +@each $media-query in map-keys($media-queries) { + @for $i from 1 through length($spacers) { + @include mq($media-query) { + $size: #{map-get($spacers, sp-#{$i - 1})}; + $scale: #{$i - 1}; + + // .d-sm-block, .d-md-none, .d-lg-inline + .d-#{$media-query}-block { display: block !important; } + .d-#{$media-query}-flex { display: flex !important; } + .d-#{$media-query}-inline { display: inline !important; } + .d-#{$media-query}-inline-block { display: inline-block !important; } + .d-#{$media-query}-none { display: none !important; } + + } + } +} + +// Vertical alignment + +.v-align-baseline { vertical-align: baseline !important; } +.v-align-bottom { vertical-align: bottom !important; } +.v-align-middle { vertical-align: middle !important; } +.v-align-text-bottom { vertical-align: text-bottom !important; } +.v-align-text-top { vertical-align: text-top !important; } +.v-align-top { vertical-align: top !important; } diff --git a/_sass/utilities/_lists.scss b/_sass/utilities/_lists.scss new file mode 100644 index 00000000..0c5bcad7 --- /dev/null +++ b/_sass/utilities/_lists.scss @@ -0,0 +1,11 @@ +// +// Utility classes for lists +// + +// stylelint-disable primer/selector-no-utility + +.list-style-none { + padding: 0 !important; + margin: 0 !important; + list-style: none !important; +} diff --git a/_sass/utilities/_spacing.scss b/_sass/utilities/_spacing.scss new file mode 100644 index 00000000..9b428169 --- /dev/null +++ b/_sass/utilities/_spacing.scss @@ -0,0 +1,121 @@ +// +// Utility classes for margins and padding +// + +// scss-lint:disable SpaceAfterPropertyName +// stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, primer/selector-no-utility + +// Margin spacer utilities + +@for $i from 1 through length($spacers) { + $size: #{map-get($spacers, sp-#{$i - 1})}; + $scale: #{$i - 1}; + + // .m-0, .m-1, .m-2... + .m-#{$scale} { margin: #{$size} !important; } + .mt-#{$scale} { margin-top: #{$size} !important; } + .mr-#{$scale} { margin-right: #{$size} !important; } + .mb-#{$scale} { margin-bottom: #{$size} !important; } + .ml-#{$scale} { margin-left: #{$size} !important; } + + .mx-#{$scale} { + margin-right: #{$size} !important; + margin-left: #{$size} !important; + } + + .my-#{$scale} { + margin-top: #{$size} !important; + margin-bottom: #{$size} !important; + } + + .mxn-#{$scale} { + margin-right: -#{$size} !important; + margin-left: -#{$size} !important; + } +} + +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +@each $media-query in map-keys($media-queries) { + @for $i from 1 through length($spacers) { + @include mq($media-query) { + $size: #{map-get($spacers, sp-#{$i - 1})}; + $scale: #{$i - 1}; + + // .m-sm-0, .m-md-1, .m-lg-2... + .m-#{$media-query}-#{$scale} { margin: #{$size} !important; } + .mt-#{$media-query}-#{$scale} { margin-top: #{$size} !important; } + .mr-#{$media-query}-#{$scale} { margin-right: #{$size} !important; } + .mb-#{$media-query}-#{$scale} { margin-bottom: #{$size} !important; } + .ml-#{$media-query}-#{$scale} { margin-left: #{$size} !important; } + + .mx-#{$media-query}-#{$scale} { + margin-right: #{$size} !important; + margin-left: #{$size} !important; + } + + .my-#{$media-query}-#{$scale} { + margin-top: #{$size} !important; + margin-bottom: #{$size} !important; + } + + .mxn-#{$media-query}-#{$scale} { + margin-right: -#{$size} !important; + margin-left: -#{$size} !important; + } + } + } +} + +// Padding spacer utilities + +@for $i from 1 through length($spacers) { + $size: #{map-get($spacers, sp-#{$i - 1})}; + $scale: #{$i - 1}; + + // .p-0, .p-1, .p-2... + .p-#{$scale} { padding: #{$size} !important; } + .pt-#{$scale} { padding-top: #{$size} !important; } + .pr-#{$scale} { padding-right: #{$size} !important; } + .pb-#{$scale} { padding-bottom: #{$size} !important; } + .pl-#{$scale} { padding-left: #{$size} !important; } + + .px-#{$scale} { + padding-right: #{$size} !important; + padding-left: #{$size} !important; + } + + .py-#{$scale} { + padding-top: #{$size} !important; + padding-bottom: #{$size} !important; + } +} + +@each $media-query in map-keys($media-queries) { + @include mq($media-query) { + @for $i from 1 through length($spacers) { + $size: #{map-get($spacers, sp-#{$i - 1})}; + $scale: #{$i - 1}; + + // .p-sm-0, .p-md-1, .p-lg-2... + .p-#{$media-query}-#{$scale} { padding: #{$size} !important; } + .pt-#{$media-query}-#{$scale} { padding-top: #{$size} !important; } + .pr-#{$media-query}-#{$scale} { padding-right: #{$size} !important; } + .pb-#{$media-query}-#{$scale} { padding-bottom: #{$size} !important; } + .pl-#{$media-query}-#{$scale} { padding-left: #{$size} !important; } + + .px-#{$media-query}-#{$scale} { + padding-right: #{$size} !important; + padding-left: #{$size} !important; + } + + .py-#{$media-query}-#{$scale} { + padding-top: #{$size} !important; + padding-bottom: #{$size} !important; + } + } + } +} diff --git a/_sass/utilities/_typography.scss b/_sass/utilities/_typography.scss new file mode 100644 index 00000000..7206deff --- /dev/null +++ b/_sass/utilities/_typography.scss @@ -0,0 +1,91 @@ +// +// Utility classes for typography +// + +// stylelint-disable primer/selector-no-utility + +.fs-1 { + @include fs-1; +} + +.fs-2 { + @include fs-2; +} + +.fs-3 { + @include fs-3; +} + +.fs-4 { + @include fs-4; +} + +.fs-5 { + @include fs-5; +} + +.fs-6 { + @include fs-6; +} + +.fs-7 { + @include fs-7; +} + +.fs-8 { + @include fs-8; +} + +.fs-9 { + @include fs-9; +} + +.fs-10 { + @include fs-10; +} + +.fw-300 { + font-weight: 300 !important; +} + +.fw-400 { + font-weight: 400 !important; +} + +.fw-500 { + font-weight: 500 !important; +} + +.fw-700 { + font-weight: 700 !important; +} + +.lh-0 { + line-height: 0 !important; +} + +.lh-default { + line-height: $body-line-height; +} + +.lh-tight { + line-height: $body-heading-line-height; +} + +.ls-5 { + letter-spacing: 0.05em !important; +} + +.ls-10 { + letter-spacing: 0.1em !important; +} + +.ls-0 { + letter-spacing: 0 !important; +} + +.text-uppercase { + text-transform: uppercase !important; +} + +// stylelint-enable primer/selector-no-utility diff --git a/_sass/utilities/utilities.scss b/_sass/utilities/utilities.scss new file mode 100644 index 00000000..6c25bdfa --- /dev/null +++ b/_sass/utilities/utilities.scss @@ -0,0 +1,5 @@ +@import "./colors"; +@import "./layout"; +@import "./typography"; +@import "./lists"; +@import "./spacing"; diff --git a/_sass/vendor/normalize.scss/README.md b/_sass/vendor/normalize.scss/README.md new file mode 100644 index 00000000..36cc1c6a --- /dev/null +++ b/_sass/vendor/normalize.scss/README.md @@ -0,0 +1,78 @@ +# normalize.scss v0.1.0 + +Normalize.scss is the SCSS version of [normalize.css](http://necolas.github.io/normalize.css), a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. + +[View the normalize.css test file](http://necolas.github.io/normalize.css/latest/test.html) + +## Install + +* [npm](http://npmjs.org/): `npm install --save normalize.scss` +* [Component(1)](https://github.com/component/component/): `component install guerrero/normalize.scss` +* [Bower](http://bower.io/): `bower install --save normalize.scss` +* Download: Go to [this link](https://raw.githubusercontent.com/guerrero/normalize.scss/master/normalize.scss), press right-click on the page and choose "Save as..." + +No other styles should come before Normalize.scss. + +It's recommendable to modify `normalize.scss` to suit it to your project + +## What does it do? + +* Preserves useful defaults, unlike many CSS resets. +* Normalizes styles for a wide range of elements. +* Corrects bugs and common browser inconsistencies. +* Improves usability with subtle improvements. +* Explains what code does using detailed comments. + +## Browser support + +* Google Chrome (latest) +* Mozilla Firefox (latest) +* Mozilla Firefox 4 +* Opera (latest) +* Apple Safari 6+ +* Internet Explorer 8+ + +[Normalize.css v1 provides legacy browser +support](https://github.com/necolas/normalize.css/tree/v1) (IE 6+, Safari 4+), +but is no longer actively developed. + +## Extended details + +Additional detail and explanation of the esoteric parts of normalize.css. + +#### `pre, code, kbd, samp` + +The `font-family: monospace, monospace` hack fixes the inheritance and scaling +of font-size for preformated text. The duplication of `monospace` is +intentional. [Source](http://en.wikipedia.org/wiki/User:Davidgothberg/Test59). + +#### `sub, sup` + +Normally, using `sub` or `sup` affects the line-box height of text in all +browsers. [Source](http://gist.github.com/413930). + +#### `svg:not(:root)` + +Adding `overflow: hidden` fixes IE9's SVG rendering. Earlier versions of IE +don't support SVG, so we can safely use the `:not()` and `:root` selectors that +modern browsers use in the default UA stylesheets to apply this style. [SVG +Mailing List discussion](http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0339.html) + +#### `input[type="search"]` + +The search input is not fully stylable by default. In Chrome and Safari on +OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In +Chrome and Safari on Windows you can't control `border` properly. It will apply +`border-width` but will only show a border color (which cannot be controlled) +for the outer 1px of that border. Applying `-webkit-appearance: textfield` +addresses these issues without removing the benefits of search inputs (e.g. +showing past searches). + +#### `legend` + +Adding `border: 0` corrects an IE 8–11 bug where `color` (yes, `color`) is not +inherited by `legend`. + +## Acknowledgements + +Normalize.scss is a project by [Alex Guerrero](https://github.com/guerrero) based on [normalize.css](http://necolas.github.io/normalize.css) from [Nicolas Gallagher](https://github.com/necolas), co-created with [Jonathan Neal](https://github.com/jonathantneal). diff --git a/_sass/vendor/normalize.scss/normalize.scss b/_sass/vendor/normalize.scss/normalize.scss new file mode 100644 index 00000000..ce38a4fa --- /dev/null +++ b/_sass/vendor/normalize.scss/normalize.scss @@ -0,0 +1,427 @@ +/*! normalize.scss v0.1.0 | MIT License | based on git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/_sass/vendor/normalize.scss/package.json b/_sass/vendor/normalize.scss/package.json new file mode 100644 index 00000000..2d051c27 --- /dev/null +++ b/_sass/vendor/normalize.scss/package.json @@ -0,0 +1,70 @@ +{ + "_args": [ + [ + "normalize.scss", + "/Users/pmarsceill/_projects/just-the-docs" + ] + ], + "_from": "normalize.scss@*", + "_id": "normalize.scss@0.1.0", + "_inCache": true, + "_installable": true, + "_location": "/normalize.scss", + "_nodeVersion": "0.10.32", + "_npmUser": { + "email": "alexguerrero1092@gmail.com", + "name": "alexguerrero" + }, + "_npmVersion": "2.0.2", + "_phantomChildren": {}, + "_requested": { + "name": "normalize.scss", + "raw": "normalize.scss", + "rawSpec": "", + "scope": null, + "spec": "*", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/normalize.scss/-/normalize.scss-0.1.0.tgz", + "_shasum": "4a21dc25bd4c019c857785f829b658aba2a8f9ab", + "_shrinkwrap": null, + "_spec": "normalize.scss", + "_where": "/Users/pmarsceill/_projects/just-the-docs", + "author": "", + "bugs": { + "url": "https://github.com/guerrero/normalize.scss/issues" + }, + "dependencies": {}, + "description": "Normalize.scss as a node packaged module", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "4a21dc25bd4c019c857785f829b658aba2a8f9ab", + "tarball": "https://registry.npmjs.org/normalize.scss/-/normalize.scss-0.1.0.tgz" + }, + "files": [ + "normalize.scss" + ], + "gitHead": "d67d517e28615a873066438af1d4845c157c9baf", + "homepage": "https://github.com/guerrero/normalize.scss", + "license": "MIT", + "maintainers": [ + { + "name": "alexguerrero", + "email": "alexguerrero1092@gmail.com" + } + ], + "name": "normalize.scss", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/guerrero/normalize.scss.git" + }, + "scripts": {}, + "style": "normalize.scss", + "version": "0.1.0" +} diff --git a/about.md b/about.md index ba9c7ec3..a3fa4869 100644 --- a/about.md +++ b/about.md @@ -2,8 +2,11 @@ layout: default title: About permalink: /about/ +nav_order: 20 --- Information about all of the EVM powered networks. -Get involved in the [Github repo](https://github.com/ethereum-lists/chains). +Get involved in the [Github repo](https://github.com/ethereum-lists/chains) to add your network info and improve this resource. + +We are propsing that a link get added to [EIP-155](https://eips.ethereum.org/EIPS/eip-155) to this site. See [PR 1703](https://github.com/ethereum/EIPs/pull/1703). diff --git a/assets/css/dark-mode-preview.scss b/assets/css/dark-mode-preview.scss new file mode 100644 index 00000000..8b77da6a --- /dev/null +++ b/assets/css/dark-mode-preview.scss @@ -0,0 +1,41 @@ +--- +# this ensures Jekyll reads the file to be transformed into CSS later +# only Main files contain this front matter, not partials. +--- + +// +// Import external dependencies +// + +@import "./vendor/normalize.scss/normalize.scss"; + +// +// Import Just the Docs scss +// + +// Support +@import "./support/support"; + +// +// Import custom color scheme scss +// + +@import "./color_schemes/dark.scss"; + +// Modules +@import "./base"; +@import "./layout"; +@import "./content"; +@import "./navigation"; +@import "./typography"; +@import "./labels"; +@import "./buttons"; +@import "./search"; +@import "./tables"; +@import "./code"; +@import "./utilities/utilities"; + +// +// Import custom overrides +// +@import "./custom/custom"; diff --git a/assets/css/just-the-docs.scss b/assets/css/just-the-docs.scss new file mode 100644 index 00000000..3431ae88 --- /dev/null +++ b/assets/css/just-the-docs.scss @@ -0,0 +1,43 @@ +--- +# this ensures Jekyll reads the file to be transformed into CSS later +# only Main files contain this front matter, not partials. +--- + +// +// Import external dependencies +// + +@import "./vendor/normalize.scss/normalize.scss"; + +// +// Import Just the Docs scss +// + +// Support +@import "./support/support"; + +// +// Import custom color scheme scss +// + +{% if site.color_scheme == "dark" %} +@import "./color_schemes/dark.scss"; +{% endif %} + +// Modules +@import "./base"; +@import "./layout"; +@import "./content"; +@import "./navigation"; +@import "./typography"; +@import "./labels"; +@import "./buttons"; +@import "./search"; +@import "./tables"; +@import "./code"; +@import "./utilities/utilities"; + +// +// Import custom overrides +// +@import "./custom/custom"; diff --git a/assets/images/just-the-docs.png b/assets/images/just-the-docs.png new file mode 100644 index 00000000..81c33065 Binary files /dev/null and b/assets/images/just-the-docs.png differ diff --git a/assets/images/search.svg b/assets/images/search.svg new file mode 100644 index 00000000..421ca4df --- /dev/null +++ b/assets/images/search.svg @@ -0,0 +1 @@ +Search diff --git a/assets/js/just-the-docs.js b/assets/js/just-the-docs.js new file mode 100644 index 00000000..bc1365d0 --- /dev/null +++ b/assets/js/just-the-docs.js @@ -0,0 +1,177 @@ +// Event handling + +function addEvent(el, type, handler) { + if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler); +} +function removeEvent(el, type, handler) { + if (el.detachEvent) el.detachEvent('on'+type, handler); else el.removeEventListener(type, handler); +} + +// Show/hide mobile menu + +function toggleNav(){ + const nav = document.querySelector('.js-main-nav'); + const auxNav = document.querySelector('.js-aux-nav'); + const navTrigger = document.querySelector('.js-main-nav-trigger'); + const search = document.querySelector('.js-search'); + + addEvent(navTrigger, 'click', function(){ + var text = navTrigger.innerText; + var textToggle = navTrigger.getAttribute('data-text-toggle'); + + nav.classList.toggle('nav-open'); + auxNav.classList.toggle('nav-open'); + navTrigger.classList.toggle('nav-open'); + search.classList.toggle('nav-open'); + navTrigger.innerText = textToggle; + navTrigger.setAttribute('data-text-toggle', text); + textToggle = text; + }) +} + +// Site search + +function initSearch() { + var index = lunr(function () { + this.ref('id'); + this.field('title', { boost: 20 }); + this.field('content', { boost: 10 }); + this.field('url'); + }); + + // Get the generated search_data.json file so lunr.js can search it locally. + + sc = document.getElementsByTagName("script"); + source = ''; + + for(idx = 0; idx < sc.length; idx++) + { + s = sc.item(idx); + + if(s.src && s.src.match(/just-the-docs\.js$/)) + { source = s.src; } + } + + jsPath = source.replace('just-the-docs.js', ''); + + jsonPath = jsPath + '/search-data.json'; + + var request = new XMLHttpRequest(); + request.open('GET', jsonPath, true); + + request.onload = function() { + if (request.status >= 200 && request.status < 400) { + // Success! + var data = JSON.parse(request.responseText); + var keys = Object.keys(data); + + for(var i in data) { + index.add({ + id: data[i].id, + title: data[i].title, + content: data[i].content, + url: data[i].url + }); + } + searchResults(data); + } else { + // We reached our target server, but it returned an error + console.log('Error loading ajax request. Request status:' + request.status); + } + }; + + request.onerror = function() { + // There was a connection error of some sort + console.log('There was a connection error'); + }; + + request.send(); + + function searchResults(dataStore) { + var searchInput = document.querySelector('.js-search-input'); + var searchResults = document.querySelector('.js-search-results'); + var store = dataStore; + + function hideResults() { + searchResults.innerHTML = ''; + searchResults.classList.remove('active'); + } + + addEvent(searchInput, 'keyup', function(e){ + var query = this.value; + + searchResults.innerHTML = ''; + searchResults.classList.remove('active'); + + if (query === '') { + hideResults(); + } else { + var results = index.search(query); + + if (results.length > 1) { + searchResults.classList.add('active'); + var resultsList = document.createElement('ul'); + searchResults.appendChild(resultsList); + + for (var i in results) { + var resultsListItem = document.createElement('li'); + var resultsLink = document.createElement('a'); + var resultsUrlDesc = document.createElement('span'); + var resultsUrl = store[results[i].ref].url; + var resultsRelUrl = store[results[i].ref].relUrl; + var resultsTitle = store[results[i].ref].title; + + resultsLink.setAttribute('href', resultsUrl); + resultsLink.innerText = resultsTitle; + resultsUrlDesc.innerText = resultsRelUrl; + + resultsList.classList.add('search-results-list'); + resultsListItem.classList.add('search-results-list-item'); + resultsLink.classList.add('search-results-link'); + resultsUrlDesc.classList.add('fs-2','text-grey-dk-000','d-block'); + + resultsList.appendChild(resultsListItem); + resultsListItem.appendChild(resultsLink); + resultsLink.appendChild(resultsUrlDesc); + } + } + + // When esc key is pressed, hide the results and clear the field + if (e.keyCode == 27) { + hideResults(); + searchInput.value = ''; + } + } + }); + + addEvent(searchInput, 'blur', function(){ + setTimeout(function(){ hideResults() }, 300); + }); + } +} + +function pageFocus() { + var mainContent = document.querySelector('.js-main-content'); + mainContent.focus(); + console.log(mainContent) +} + + +// Document ready + +function ready(){ + toggleNav(); + pageFocus(); + if (typeof lunr !== 'undefined') { + initSearch(); + } +} + +// in case the document is already rendered +if (document.readyState!='loading') ready(); +// modern browsers +else if (document.addEventListener) document.addEventListener('DOMContentLoaded', ready); +// IE <= 8 +else document.attachEvent('onreadystatechange', function(){ + if (document.readyState=='complete') ready(); +}); diff --git a/assets/js/search-data.json b/assets/js/search-data.json new file mode 100644 index 00000000..49cbc9dc --- /dev/null +++ b/assets/js/search-data.json @@ -0,0 +1,12 @@ +--- +--- +{ + {% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": { + "id": "{{ forloop.index0 }}", + "title": "{{ page.title | replace: '&', '&' }}", + "content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}", + "url": "{{ page.url | absolute_url }}", + "relUrl": "{{ page.url }}" + }{% unless forloop.last %},{% endunless %} + {% endif %}{% endfor %} +} diff --git a/assets/js/vendor/lunr.min.js b/assets/js/vendor/lunr.min.js new file mode 100644 index 00000000..9960ccd2 --- /dev/null +++ b/assets/js/vendor/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 1.0.0 + * Copyright (C) 2017 Oliver Nightingale + * @license MIT + */ +!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="1.0.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.separator):[]},t.tokenizer.separator=/[\s\-]+/,t.tokenizer.load=function(t){var e=this.registeredFunctions[t];if(!e)throw new Error("Cannot load un-registered function: "+t);return e},t.tokenizer.label="default",t.tokenizer.registeredFunctions={"default":t.tokenizer},t.tokenizer.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing tokenizer: "+n),e.label=n,this.registeredFunctions[n]=e},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,r=0;n>r;r++){for(var o=t[r],s=0;i>s&&(o=this._stack[s](o,r,t),void 0!==o&&""!==o);s++);void 0!==o&&""!==o&&e.push(o)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(o===t)return r;t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r]}return o===t?r:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,r=e+Math.floor(i/2),o=this.elements[r];i>1;)t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r];return o>t?r:t>o?r+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,r=0,o=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>o-1||r>s-1)break;a[i]!==h[r]?a[i]h[r]&&r++:(n.add(a[i]),i++,r++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone();for(var r=0,o=n.toArray();rp;p++)c[p]===a&&d++;h+=d/f*l.boost}}this.tokenStore.add(a,{ref:o,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),i=1;return n>0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(this.tokenizerFn(e)),i=new t.Vector,r=[],o=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*o,h=this,u=this.tokenStore.expand(e).reduce(function(n,r){var o=h.corpusTokens.indexOf(r),s=h.idf(r),u=1,l=new t.SortedSet;if(r!==e){var c=Math.max(3,r.length-e.length);u=1/Math.log(c)}o>-1&&i.insert(o,a*s*u);for(var f=h.tokenStore.get(r),d=Object.keys(f),p=d.length,v=0;p>v;v++)l.add(f[d[v]].ref);return n.union(l)},new t.SortedSet);r.push(u)},this);var a=r.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,r=new t.Vector,o=0;i>o;o++){var s=n.elements[o],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);r.insert(this.corpusTokens.indexOf(s),a*h)}return r},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,tokenizer:this.tokenizerFn.label,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",r=n+"[^aeiouy]*",o=i+"[aeiou]*",s="^("+r+")?"+o+r,a="^("+r+")?"+o+r+"("+o+")?$",h="^("+r+")?"+o+r+o+r,u="^("+r+")?"+i,l=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(u),p=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,m=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),k=new RegExp("^"+r+i+"[^aeiouwxy]$"),x=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,F=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,_=/^(.+?)(s|t)(ion)$/,z=/^(.+?)e$/,O=/ll$/,P=new RegExp("^"+r+i+"[^aeiouwxy]$"),T=function(n){var i,r,o,s,a,h,u;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=p,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=g,a=m,s.test(n)){var T=s.exec(n);s=l,s.test(T[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,u=k,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=x,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+t[r])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+e[r])}if(s=F,a=_,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=z,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=P,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=O,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t.charAt(0),r=t.slice(1);return i in n||(n[i]={docs:{}}),0===r.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(r,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n +

{{ chain.name }} ({{ chain.short_name }})

+
    +
  • Short Name: {{ chain.short_name }}
  • +
  • Chain: {{ chain.chain }}
  • +
  • Chain ID: {{ chain.chain_id }}
  • +
  • Network: {{ chain.network }}
  • +
  • Network ID: {{ chain.network_id }}
  • +
+
+{% endfor %} diff --git a/index.md b/index.md index 206250a3..2653cd73 100644 --- a/index.md +++ b/index.md @@ -1,5 +1,7 @@ --- layout: home +title: Home +nav_order: 1 --- # EVM Networks