' -%}
2 | {%- if site.mermaid.custom -%}
3 |
4 | {%- else -%}
5 |
6 | {%- endif %}
7 |
10 | {%- endif %}
11 |
--------------------------------------------------------------------------------
/_includes/common/metadata.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {%- for meta in site.meta -%}
9 |
10 | {%- endfor -%}
11 |
12 |
13 |
--------------------------------------------------------------------------------
/_includes/common/opengraph.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/_includes/common/rest/content.liquid:
--------------------------------------------------------------------------------
1 | {%- assign content = content
2 | | replace: "’", "'"
3 | | replace: "“", '"'
4 | | replace: "”", '"'
5 | | replace: "
28 |
--------------------------------------------------------------------------------
/_includes/common/script.liquid:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/_includes/common/title.liquid:
--------------------------------------------------------------------------------
1 | {{ title }}
2 |
--------------------------------------------------------------------------------
/_includes/common/twitter_cards.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/_includes/extra/body.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZzzzHeJ/WonderTrader-Learning-Notes/c433a18ad70dbce25ca86a57a6f75ea95c5a65df/_includes/extra/body.html
--------------------------------------------------------------------------------
/_includes/extra/head.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZzzzHeJ/WonderTrader-Learning-Notes/c433a18ad70dbce25ca86a57a6f75ea95c5a65df/_includes/extra/head.html
--------------------------------------------------------------------------------
/_includes/extra/script.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZzzzHeJ/WonderTrader-Learning-Notes/c433a18ad70dbce25ca86a57a6f75ea95c5a65df/_includes/extra/script.js
--------------------------------------------------------------------------------
/_includes/extra/styles.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ZzzzHeJ/WonderTrader-Learning-Notes/c433a18ad70dbce25ca86a57a6f75ea95c5a65df/_includes/extra/styles.scss
--------------------------------------------------------------------------------
/_includes/list.liquid:
--------------------------------------------------------------------------------
1 | {%- include common/core/list.liquid -%}
2 |
--------------------------------------------------------------------------------
/_includes/rest/defaults.liquid:
--------------------------------------------------------------------------------
1 | {%- assign theme_alias = "rundocs/jekyll-rtd-theme@2.0.10" -%}
2 | {%- assign theme_color = "#2980b9" -%}
3 |
--------------------------------------------------------------------------------
/_includes/rest/script.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 | {%- if extra_script.size > 0 -%}
4 |
5 | {%- endif -%}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/_includes/rest/styles.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 | {%- if extra_scss.size > 0 -%}
4 |
5 | {%- endif -%}
6 |
--------------------------------------------------------------------------------
/_includes/shortcodes/danger.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __.danger | default: "Danger" }}
5 |
6 |
7 | {{ codes | markdownify | strip_newlines -}}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/_includes/shortcodes/mermaid.liquid:
--------------------------------------------------------------------------------
1 |
2 | {{ codes }}
3 |
4 |
--------------------------------------------------------------------------------
/_includes/shortcodes/note.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __.note | default: "Note" }}
5 |
6 |
7 | {{ codes | markdownify | strip_newlines -}}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/_includes/shortcodes/tip.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __.tip | default: "Tip" }}
5 |
6 |
7 | {{ codes | markdownify | strip_newlines -}}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/_includes/shortcodes/warning.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ __.warning | default: "Warning" }}
5 |
6 |
7 | {{ codes | markdownify | strip_newlines -}}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/_includes/templates/_toctree.liquid:
--------------------------------------------------------------------------------
1 | {%- include common/rest/workdir.liquid %}
2 |
3 | {% comment %} display the directory name {% endcomment %}
4 | {%- assign dir = site_pages | where: "url", workdir | first -%}
5 |
6 | {%- if workdir_level == 2 %}
7 | {% comment %} display the root sub-directory as "p.caption" {% endcomment %}
8 |
9 | {{ dir.title | default: dir.url }}
10 |
11 | {%- else %}
12 |
13 | {{ dir.title | default: dir.url }}
14 |
15 | {%- endif -%}
16 |
17 |
18 | {% comment %} list file {% endcomment %}
19 | {%- for item in workdir_files -%}
20 | {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 1 -%}
21 | {%- capture current -%}
22 | {%- if page.url == item.url %}current{% endif -%}
23 | {%- endcapture %}
24 |
25 | -
26 |
27 | {%- if item.sort -%}
28 | {{ item.sort }}. {{ item.title | default: item.name }}
29 | {%- else -%}
30 | {{ item.title | default: item.name }}
31 | {%- endif -%}
32 |
33 |
34 | {%- endfor -%}
35 |
36 | {% comment %} list dirs {% endcomment %}
37 | {%- for workdir in workdir_dirs -%}
38 | {%- assign level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size | minus: 2 %}
39 | - {% include templates/_toctree.liquid %}
40 | {%- endfor -%}
41 |
42 |
--------------------------------------------------------------------------------
/_includes/templates/addons.liquid:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ site.title }}
5 |
6 |
7 |
8 | {{ docs.source.branch }}
9 |
10 |
11 |
12 |
13 |
14 |
15 | - {{ __.github | default: "GitHub" }}
16 | -
17 |
18 |
19 | {{ __.homepage | default: "Homepage" }}
20 |
21 |
22 | -
23 |
24 |
25 | {{ __.issues | default: "Issues" }}
26 |
27 |
28 | -
29 |
30 |
31 | {{ __.download | default: "Download" }}
32 |
33 |
34 |
35 |
36 |
37 | This
38 | Software
39 | is under the terms of
40 | {{ docs.license.name | default: "The Unlicense" }}.
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/_includes/templates/breadcrumbs.liquid:
--------------------------------------------------------------------------------
1 |
34 |
--------------------------------------------------------------------------------
/_includes/templates/content.liquid:
--------------------------------------------------------------------------------
1 |
2 |
11 | {% include templates/breadcrumbs.liquid %}
12 |
13 |
14 |
15 | {{ content }}
16 |
17 |
18 | {% include templates/footer.liquid %}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/_includes/templates/footer.liquid:
--------------------------------------------------------------------------------
1 | {% comment %} prev and next {% endcomment %}
2 | {%- if page.url != "/search.html" and page.url != "/404.html" -%}
3 | {%- if next or prev -%}
4 |
20 | {%- endif -%}
21 | {%- endif -%}
22 |
23 |
10 |
24 |
25 |
26 |
27 |
28 | {%- assign created_time = rest_created_at | date: "%Y" -%}
29 | {%- assign updated_time = rest_updated_at | date: "%Y" -%}
30 | {%- if created_time == updated_time -%}
31 | {{- created_time -}},
32 | {%- else -%}
33 | {{- created_time }}-{{ updated_time -}},
34 | {%- endif -%}
35 |
36 |
37 | {{- author -}}
38 |
39 | {{ __.revision | default: "Revision" }}
40 |
41 | {{- docs.build_revision | slice: 0, 7 -}}
42 |
43 | {% unless site.url contains "rundocs.io" %}
44 |
45 |
53 | {% endunless %}
54 |
55 |
--------------------------------------------------------------------------------
/_includes/templates/sidebar.liquid:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/_includes/templates/toctree.liquid:
--------------------------------------------------------------------------------
1 | {%- include common/rest/workdir.liquid %}
2 |
3 | {% comment %} list the root files {% endcomment %}
4 |
5 | {%- for item in workdir_files -%}
6 | {%- assign level = item.dir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
7 | {%- capture current -%}
8 | {%- if page.url == item.url %}current{% endif -%}
9 | {%- endcapture %}
10 | -
11 |
12 | {%- if item.sort -%}
13 | {{ item.sort }}. {{ item.title | default: item.name }}
14 | {%- else -%}
15 | {{ item.title | default: item.name }}
16 | {%- endif -%}
17 |
18 |
19 | {%- endfor %}
20 |
21 |
22 | {% comment %} list the root dirs {% endcomment %}
23 | {%- for workdir in workdir_dirs %}{% include templates/_toctree.liquid %}{% endfor -%}
24 |
--------------------------------------------------------------------------------
/_layouts/default.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: tasks/compress
3 | ---
4 |
5 | {%- include rest/defaults.liquid -%}
6 | {%- include common/rest/defaults.liquid -%}
7 |
8 |
9 |
10 |
11 | {%- include common/metadata.liquid -%}
12 | {%- include common/title.liquid -%}
13 | {%- include common/twitter_cards.liquid -%}
14 | {%- include common/opengraph.liquid -%}
15 | {%- include common/schema.liquid -%}
16 | {%- include common/links.liquid -%}
17 | {%- include rest/styles.liquid -%}
18 | {%- include common/script.liquid -%}
19 | {%- include extra/head.html -%}
20 |
21 |
22 | {%- include templates/sidebar.liquid -%}
23 | {%- include templates/content.liquid -%}
24 | {%- include templates/addons.liquid -%}
25 | {%- include extra/body.html -%}
26 | {%- include rest/script.liquid -%}
27 | {%- include common/mermaid.liquid-%}
28 | {%- include common/mathjax.liquid-%}
29 | {%- include common/google_gtag.liquid-%}
30 | {%- include common/google_adsense.liquid-%}
31 |
32 |
33 |
--------------------------------------------------------------------------------
/_layouts/tasks/compress.liquid:
--------------------------------------------------------------------------------
1 | ---
2 | layout: tasks/shortcodes
3 | ---
4 |
5 | {%- if site.debug.compress == false -%}
6 | {{ content }}
7 | {%- else -%}
8 | {%- if content contains "" -%}
12 | {%- assign pre_blocks = content_block | split: "
" -%}
13 | {{ pre_blocks.last | split: " " | join: " " -}}
14 | {%- else -%}
15 | {{- content_block | split: " " | join: " " -}}
16 | {%- endif -%}
17 | {%- endfor -%}
18 | {%- else -%}
19 | {{- content | split: " " | join: " " -}}
20 | {%- endif -%}
21 | {%- endif -%}
22 |
--------------------------------------------------------------------------------
/_layouts/tasks/shortcodes.liquid:
--------------------------------------------------------------------------------
1 | {%- include common/rest/i18n.liquid -%}
2 |
3 | {%- assign shortcodes = "mermaid, warning, note, tip, danger" | split: ", " -%}
4 |
5 | {%- if site.debug.shortcodes == false -%}
6 | {{ content }}
7 | {%- else -%}
8 | {%- if content contains "" -%}
12 | {%- assign pre_blocks = content_block | split: "
" -%}
13 | {%- if content_block contains '> {% endcomment -%}
15 | {%- assign custom = content_block | replace_first: '>', " " | split: " " -%}
16 | {%- assign lang = custom.first -%}
17 | {%- assign codes = custom.last | split: "
" | first -%}
18 | {%- if shortcodes contains lang -%}
19 | {%- include shortcodes/{{ lang }}.liquid -%} {{- pre_blocks.last -}}
20 | {%- else -%}
21 | {{ pre_blocks.last }}
22 | {%- endif -%}
23 | {%- else -%}
24 | {{ pre_blocks.last -}}
25 | {%- endif -%}
26 | {%- else -%}
27 | {{- content_block -}}
28 | {%- endif -%}
29 | {%- endfor -%}
30 | {%- else -%}
31 | {{- content -}}
32 | {%- endif -%}
33 | {%- endif -%}
34 |
--------------------------------------------------------------------------------
/_sass/_direction.scss:
--------------------------------------------------------------------------------
1 | html[dir="rtl"] {
2 | // @primer/css/base/typography-base
3 | ul,
4 | ol {
5 | padding-right: 0;
6 | }
7 |
8 | dd {
9 | margin-right: 0;
10 | }
11 |
12 | // layout
13 | .menu-sm {
14 | left: unset;
15 | right: -$theme-menu-width-sm;
16 |
17 | &.shift {
18 | left: unset;
19 | right: 0;
20 | }
21 | }
22 | .content-wrap {
23 | &.shift {
24 | left: unset;
25 | right: $theme-menu-width-sm;
26 | }
27 | }
28 |
29 | @include breakpoint(md) {
30 | .menu-md {
31 | left: unset;
32 | right: 0;
33 | }
34 |
35 | .content-wrap {
36 | margin-left: unset;
37 | margin-right: $theme-menu-width;
38 |
39 | &.shift {
40 | left: unset;
41 | right: 0;
42 | }
43 | }
44 | }
45 |
46 | // toctree
47 | .toctree {
48 | .fa {
49 | margin-right: unset;
50 | margin-left: 2px;
51 | }
52 | > ul {
53 | // the first level links
54 | > .toc > a {
55 | padding-left: unset;
56 | padding-right: $spacer-4 / 2;
57 | }
58 | }
59 | }
60 |
61 | // toc layout
62 | .toc {
63 | @for $level from 1 through 11 {
64 | &.level-#{$level}.current {
65 | > a {
66 | padding-left: unset;
67 | padding-right: $spacer-4 * ($level - 1 + 0.5);
68 | }
69 |
70 | .level-#{$level + 1} > a {
71 | padding-left: unset;
72 | padding-right: $spacer-4 * ($level + 0.5);
73 | }
74 | }
75 | }
76 | }
77 | // markdown-body
78 | .markdown-body {
79 | .highlight {
80 | direction: ltr;
81 | }
82 | blockquote {
83 | border-left: none;
84 | border-right: 0.25em $border-style lighten($gray-300, 5%);
85 | }
86 |
87 | ul,
88 | ol {
89 | padding-left: 0;
90 | padding-right: 2em;
91 | }
92 |
93 | // improved checkbox
94 | .task-list-item-checkbox {
95 | margin-right: unset;
96 | margin-left: 3px;
97 | }
98 | }
99 |
100 | // font
101 | .#{$fa-css-prefix}-arrow-circle-left:before {
102 | content: $fa-var-arrow-circle-right;
103 | }
104 | .#{$fa-css-prefix}-arrow-circle-right:before {
105 | content: $fa-var-arrow-circle-left;
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/_sass/_font-face.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Lato";
3 | font-weight: $font-weight-normal;
4 | font-style: normal;
5 | font-display: block;
6 | src: url("fonts/lato-normal.woff2") format("woff2"),
7 | url("fonts/lato-normal.woff") format("woff");
8 | }
9 |
10 | @font-face {
11 | font-family: "Lato";
12 | font-weight: $font-weight-normal;
13 | font-style: italic;
14 | font-display: block;
15 | src: url("fonts/lato-normal-italic.woff2") format("woff2"),
16 | url("fonts/lato-normal-italic.woff") format("woff");
17 | }
18 |
19 | @font-face {
20 | font-family: "Lato";
21 | font-weight: $font-weight-bold;
22 | font-style: normal;
23 | font-display: block;
24 | src: url("fonts/lato-bold.woff2") format("woff2"),
25 | url("fonts/lato-bold.woff") format("woff");
26 | }
27 |
28 | @font-face {
29 | font-family: "Lato";
30 | font-weight: $font-weight-bold;
31 | font-style: italic;
32 | font-display: block;
33 | src: url("fonts/lato-bold-italic.woff2") format("woff2"),
34 | url("fonts/lato-bold-italic.woff") format("woff");
35 | }
36 |
37 | @font-face {
38 | font-family: "Roboto-Slab";
39 | font-weight: $font-weight-normal;
40 | font-style: normal;
41 | font-display: block;
42 | src: url("fonts/Roboto-Slab-Regular.woff2") format("woff2"),
43 | url("fonts/Roboto-Slab-Regular.woff") format("woff");
44 | }
45 |
46 | @font-face {
47 | font-family: "Roboto-Slab";
48 | font-weight: $font-weight-bold;
49 | font-style: normal;
50 | font-display: block;
51 | src: url("fonts/Roboto-Slab-Bold.woff2") format("woff2"),
52 | url("fonts/Roboto-Slab-Bold.woff") format("woff");
53 | }
54 |
55 | @font-face {
56 | font-family: "FontAwesome";
57 | font-weight: normal;
58 | font-style: normal;
59 | font-display: block;
60 | src: url("fonts/fontawesome-webfont.eot");
61 | src: url("fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),
62 | url("fonts/fontawesome-webfont.woff2") format("woff2"),
63 | url("fonts/fontawesome-webfont.woff") format("woff"),
64 | url("fonts/fontawesome-webfont.ttf") format("truetype"),
65 | url("fonts/fontawesome-webfont.svg#fontawesomeregular") format("svg");
66 | }
67 |
--------------------------------------------------------------------------------
/_sass/_layout.scss:
--------------------------------------------------------------------------------
1 | .menu-sm {
2 | position: fixed;
3 | bottom: 0;
4 | left: -$theme-menu-width-sm;
5 | width: $theme-menu-width-sm;
6 | max-height: 100%;
7 |
8 | &.shift {
9 | left: 0;
10 | }
11 | }
12 |
13 | .sidebar-wrap {
14 | top: 0;
15 |
16 | @extend .menu-sm;
17 |
18 | .sidebar > :last-child {
19 | margin-bottom: 5em;
20 | }
21 | }
22 |
23 | .addons-wrap {
24 | @extend .menu-sm;
25 | }
26 |
27 | .content-wrap {
28 | &.shift {
29 | position: fixed;
30 | top: 0;
31 | bottom: 0;
32 | left: $theme-menu-width-sm;
33 | min-width: 100%;
34 | }
35 | }
36 |
37 | @include breakpoint(md) {
38 | .menu-md {
39 | left: 0;
40 | width: $theme-menu-width;
41 | }
42 |
43 | .sidebar-wrap {
44 | @extend .menu-md;
45 |
46 | .sidebar {
47 | // 20px for scroll
48 | width: $theme-menu-width + 20px;
49 |
50 | .header,
51 | .toctree {
52 | width: $theme-menu-width;
53 | }
54 | }
55 | }
56 |
57 | .addons-wrap {
58 | @extend .menu-md;
59 | }
60 |
61 | .content-wrap {
62 | margin-left: $theme-menu-width;
63 |
64 | &.shift {
65 | position: relative;
66 | left: 0;
67 | min-width: 0;
68 | }
69 | }
70 | }
71 |
72 | @include breakpoint(xl) {
73 | .content-wrap {
74 | max-width: $width-xl - $theme-menu-width;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/_sass/_rest.scss:
--------------------------------------------------------------------------------
1 | // font
2 | .font-body {
3 | font-family: $body-font;
4 | font-weight: $font-weight-normal;
5 | }
6 | .font-head {
7 | font-family: $head-font;
8 | font-weight: $font-weight-bold;
9 | }
10 | .font-mono {
11 | font-family: $mono-font;
12 | }
13 |
14 | .fa {
15 | display: inline-block;
16 | font: normal normal normal 14px/1 "FontAwesome";
17 | }
18 |
19 | .breadcrumb-item {
20 | margin: 0;
21 |
22 | &::after {
23 | padding-right: 3px;
24 | padding-left: 3px;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/_sass/_root.scss:
--------------------------------------------------------------------------------
1 | :root {
2 | @for $level from 1 through 12 {
3 | @if $level % 4 == 0 {
4 | --toc-#{$level}: #{darken($theme-white, 4 * 8.8%)};
5 | } @else {
6 | --toc-#{$level}: #{darken($theme-white, $level % 4 * 8.8%)};
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/_sass/_variables.scss:
--------------------------------------------------------------------------------
1 | // fonts
2 | $body-font: "Lato", BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
3 | $head-font: "Roboto-Slab", sans-serif;
4 | $mono-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
5 |
6 | // theme color
7 | $theme-blue: #2980b9;
8 | $theme-red: #e74c3c;
9 | $theme-green: #1abc9c;
10 | $theme-orange: #e67e22;
11 |
12 | $theme-white: lighten($black, 99%);
13 | $theme-black: lighten($black, 15%);
14 |
15 | // theme link
16 | $theme-link: $blue;
17 | $theme-link-hover: lighten($blue, 10%);
18 | $theme-link-visited: lighten($purple, 10%);
19 |
20 | // theme code
21 | $theme-code: $theme-black;
22 | $theme-code-background: $bg-gray;
23 | $theme-code-inline: $theme-red;
24 | $theme-code-inline-background: darken($theme-white, 2%);
25 |
26 | // theme mask
27 | $theme-mask-white: transparentize($theme-white, 0.9);
28 | $theme-mask-black: transparentize($theme-black, 0.9);
29 |
30 | // theme menu
31 | $theme-menu-width-sm: 85%;
32 | $theme-menu-width: 300px;
33 | $theme-menu-background: darken($theme-black, 10%);
34 | $theme-menu-active-background: darken($theme-blue, 15%);
35 |
--------------------------------------------------------------------------------
/_sass/core/addons.scss:
--------------------------------------------------------------------------------
1 | .addons-wrap {
2 | background-color: darken($theme-menu-background, 8%);
3 |
4 | .status {
5 | cursor: pointer;
6 | background-color: darken($theme-menu-background, 5%);
7 |
8 | .branch {
9 | .fa {
10 | color: $theme-white;
11 | }
12 |
13 | .name {
14 | color: $green;
15 | }
16 | }
17 | &:active {
18 | background: $theme-menu-active-background;
19 | }
20 | }
21 |
22 | .addons {
23 | color: grey;
24 |
25 | dl {
26 | margin: 0;
27 | }
28 |
29 | dd {
30 | display: inline-block;
31 |
32 | a {
33 | display: inline-block;
34 | padding: 6px;
35 | color: $theme-white;
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/_sass/core/container.scss:
--------------------------------------------------------------------------------
1 | .container {
2 | font-weight: $font-weight-normal;
3 | color: $theme-black;
4 | background: $theme-white;
5 | }
6 |
7 | @include breakpoint(xl) {
8 | .container {
9 | background: $theme-mask-black;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/_sass/core/content.scss:
--------------------------------------------------------------------------------
1 | .content-wrap {
2 | font-size: $h4-size;
3 | background: $theme-white;
4 | }
5 |
--------------------------------------------------------------------------------
/_sass/core/header.scss:
--------------------------------------------------------------------------------
1 | .header {
2 | color: $theme-white;
3 | background: $theme-blue;
4 |
5 | input {
6 | border-radius: 50px;
7 | border: 1px solid #2472a4;
8 | font-size: 80%;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/_sass/core/markdown.scss:
--------------------------------------------------------------------------------
1 | .markdown-body {
2 | .d-lang {
3 | position: relative;
4 |
5 | &:after {
6 | position: absolute;
7 | right: 0px;
8 | top: 0px;
9 | font-family: $mono-font;
10 | font-size: $font-size-small;
11 | content: attr(data-lang);
12 | padding: 0 5px;
13 | color: lighten($text-gray-light, 30%);
14 | }
15 | }
16 |
17 | // 400
18 | font-weight: $font-weight-normal;
19 |
20 | a {
21 | color: $theme-link;
22 |
23 | &:hover {
24 | color: $theme-link-hover;
25 | }
26 |
27 | code,
28 | tt {
29 | color: $theme-link;
30 | }
31 | }
32 |
33 | h1,
34 | h2,
35 | h3,
36 | h4,
37 | h5,
38 | h6,
39 | dt {
40 | font-family: $head-font;
41 | }
42 |
43 | table {
44 | // 14px
45 | font-size: $body-font-size;
46 | }
47 |
48 | // ruby highlight fixed, TODO: line number display
49 | figure {
50 | margin: 0;
51 | }
52 |
53 | .anchor {
54 | // overwrite to right
55 | float: none;
56 | padding-right: 0;
57 | margin-left: 3px;
58 | // rtl
59 | margin-right: 3px;
60 | }
61 |
62 | // improved
63 | code,
64 | tt {
65 | font-size: $font-size-small;
66 | border: $border;
67 | color: $theme-code-inline;
68 | background-color: $theme-code-inline-background;
69 | }
70 |
71 | pre {
72 | > code {
73 | color: $theme-code;
74 | }
75 | }
76 |
77 | .highlight pre,
78 | pre {
79 | font-size: $font-size-small;
80 | border: $border;
81 | background-color: $theme-code-background;
82 | }
83 |
84 | div.highlighter-rouge {
85 | @extend .d-lang;
86 | }
87 |
88 | // search
89 | .search-results {
90 | li {
91 | list-style: none;
92 | }
93 | }
94 |
95 | // improved checkbox
96 | .task-list-item-checkbox {
97 | margin-right: 3px;
98 | }
99 |
100 | // mermaid improved
101 | .mermaid-wrap {
102 | @extend .d-lang;
103 | // mdl
104 | @include shadow-2dp();
105 |
106 | // .mermaid:not([data-processed="true"])
107 | .mermaid {
108 | font-size: $font-size-small;
109 | font-family: $mono-font;
110 | white-space: pre;
111 | }
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/_sass/core/sidebar.scss:
--------------------------------------------------------------------------------
1 | .sidebar {
2 | color: $theme-white;
3 | background: $theme-menu-background;
4 |
5 | a {
6 | text-decoration: none;
7 | }
8 |
9 | li {
10 | list-style: none;
11 | }
12 | .version {
13 | color: rgba(255, 255, 255, 0.3);
14 | }
15 | }
16 |
17 | .toctree {
18 | a {
19 | color: $theme-white;
20 | padding: 0.5em;
21 | }
22 |
23 | .caption {
24 | color: lighten($theme-blue, 15%);
25 | font-weight: $font-weight-bold;
26 | line-height: 32px;
27 | }
28 |
29 | .fa {
30 | margin-right: 2px;
31 | }
32 |
33 | > ul {
34 | // the first level links
35 | > .toc > a {
36 | padding-left: $spacer-4 / 2;
37 | }
38 |
39 | // the first level links not current
40 | > .toc:not(.current) > a {
41 | &:hover {
42 | background: $theme-mask-white;
43 | }
44 | &:active {
45 | background: $theme-menu-active-background;
46 | }
47 | }
48 |
49 | .toc.current {
50 | // all expanded links
51 | a {
52 | color: #404040;
53 |
54 | &:hover {
55 | background: $theme-mask-white;
56 | }
57 | &.current {
58 | font-weight: bold;
59 | background: $theme-white;
60 | border-top: 1px solid var(--toc-2);
61 | border-bottom: 1px solid var(--toc-2);
62 | }
63 | }
64 | // parent links
65 | > a {
66 | .fa-plus-square-o {
67 | @extend .fa-minus-square-o;
68 | }
69 | }
70 | }
71 | // fixed level-1's hover mask
72 | > .toc.current {
73 | background: var(--toc-1);
74 | }
75 | }
76 | }
77 |
78 | // toc layout
79 | .toc {
80 | > ul {
81 | @extend .d-none;
82 | }
83 | @for $level from 1 through 11 {
84 | &.level-#{$level}.current {
85 | > a {
86 | padding-left: $spacer-4 * ($level - 1 + 0.5);
87 | background: var(--toc-#{$level});
88 | }
89 |
90 | > ul {
91 | @extend .d-block;
92 | background: var(--toc-#{$level + 1});
93 | }
94 |
95 | .level-#{$level + 1} > a {
96 | padding-left: $spacer-4 * ($level + 0.5);
97 | }
98 | }
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/_sass/core/title.scss:
--------------------------------------------------------------------------------
1 | .title {
2 | // 600
3 | font-weight: $font-weight-bold;
4 | color: $theme-white;
5 |
6 | a {
7 | color: $theme-white;
8 | &:hover {
9 | background: $theme-mask-white;
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/_sass/core/toasts.scss:
--------------------------------------------------------------------------------
1 | .toasts {
2 | // fixed note
3 | font-size: $h4-size;
4 | // mdl
5 | @include shadow-2dp();
6 |
7 | .title {
8 | box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.14);
9 | }
10 |
11 | // fixed
12 | .content {
13 | :first-child {
14 | margin-top: 0;
15 | }
16 |
17 | :last-child {
18 | margin-bottom: 0;
19 | }
20 | }
21 |
22 | &.note {
23 | background-color: lighten($theme-blue, 50%);
24 |
25 | .title {
26 | background: lighten($theme-blue, 20%);
27 | }
28 | }
29 |
30 | &.tip {
31 | background-color: lighten($theme-green, 50%);
32 |
33 | .title {
34 | background: lighten($theme-green, 0%);
35 | }
36 | }
37 |
38 | &.warning {
39 | background-color: lighten($theme-orange, 40%);
40 |
41 | .title {
42 | background: lighten($theme-orange, 20%);
43 | }
44 | }
45 |
46 | &.danger {
47 | background-color: lighten($theme-red, 40%);
48 |
49 | .title {
50 | background: lighten($theme-red, 20%);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/base/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | bundle: "base"
3 | generated: true
4 | ---
5 |
6 | # Primer CSS: `base` bundle
7 |
8 | ## Usage
9 |
10 | Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11 |
12 | ```scss
13 | @import "@primer/css/base/index.scss";
14 | ```
15 |
16 | ## Build
17 |
18 | The `@primer/css` npm package includes a standalone CSS build of this module in `dist/base.css`.
19 |
20 | ## License
21 |
22 | [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
23 |
24 | [scss]: https://sass-lang.com/documentation/syntax#scss
25 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/base/base.scss:
--------------------------------------------------------------------------------
1 | // stylelint-disable selector-max-type
2 | * {
3 | box-sizing: border-box;
4 | }
5 |
6 | input,
7 | select,
8 | textarea,
9 | button {
10 | font-family: inherit;
11 | font-size: inherit;
12 | line-height: inherit;
13 | }
14 |
15 | body {
16 | font-family: $body-font;
17 | font-size: $body-font-size;
18 | line-height: $body-line-height;
19 | color: $text-gray-dark;
20 | background-color: $bg-white;
21 | }
22 |
23 | a {
24 | color: $text-blue;
25 | text-decoration: none;
26 |
27 | &:hover {
28 | text-decoration: underline;
29 | }
30 | }
31 |
32 | b,
33 | strong {
34 | font-weight: $font-weight-bold;
35 | }
36 |
37 | // Horizontal lines
38 | //
39 | // TODO-MDO: Remove `.rule` from everywhere and replace with `
`s
40 | hr,
41 | .rule {
42 | height: 0;
43 | // stylelint-disable-next-line primer/spacing
44 | margin: 15px 0;
45 | overflow: hidden;
46 | background: transparent;
47 | border: 0;
48 | // stylelint-disable-next-line primer/borders
49 | border-bottom: $border-width $border-style lighten($gray-300, 5%);
50 | @include clearfix();
51 | }
52 |
53 | //
54 | // Remove most spacing between table cells.
55 | //
56 |
57 | table {
58 | border-spacing: 0;
59 | border-collapse: collapse;
60 | }
61 |
62 | td,
63 | th {
64 | padding: 0;
65 | }
66 |
67 | button {
68 | cursor: pointer;
69 | // Remove border radius added by Chrome macOS
70 | border-radius: 0;
71 | }
72 |
73 | // increase the selector specificity for [hidden]
74 | // so that it always overrides utility classes (.d-block, etc.)
75 | [hidden][hidden] {
76 | display: none !important;
77 | }
78 |
79 | details {
80 | summary {
81 | cursor: pointer;
82 | }
83 |
84 | &:not([open]) {
85 | // Set details content hidden by default for browsers that don't do this
86 | > *:not(summary) {
87 | display: none !important;
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/base/index.scss:
--------------------------------------------------------------------------------
1 | @import "../support/index.scss";
2 |
3 | @import "./normalize.scss";
4 | @import "./base.scss";
5 | @import "./kbd.scss";
6 | @import "./typography-base.scss";
7 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/base/kbd.scss:
--------------------------------------------------------------------------------
1 | // Keyboard shortcuts
2 | // stylelint-disable selector-max-type
3 |
4 | kbd {
5 | display: inline-block;
6 | // stylelint-disable-next-line primer/spacing
7 | padding: ($spacer-1 - 1) ($spacer-1 + 1);
8 | font: 11px $mono-font;
9 | // stylelint-disable-next-line primer/typography
10 | line-height: 10px;
11 | // stylelint-disable-next-line primer/colors
12 | color: $gray-700;
13 | vertical-align: middle;
14 | background-color: $bg-gray-light;
15 | // stylelint-disable-next-line primer/borders
16 | border: $border-style $border-width $border-gray-dark;
17 | border-bottom-color: $border-gray-dark;
18 | border-radius: $border-radius;
19 | // stylelint-disable-next-line primer/box-shadow
20 | box-shadow: inset 0 -1px 0 $border-gray-dark;
21 | }
22 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/base/typography-base.scss:
--------------------------------------------------------------------------------
1 | // Headings
2 | // --------------------------------------------------
3 | // stylelint-disable selector-max-type
4 | h1,
5 | h2,
6 | h3,
7 | h4,
8 | h5,
9 | h6 {
10 | margin-top: 0;
11 | margin-bottom: 0;
12 | }
13 |
14 | h1 {
15 | @include h1;
16 | }
17 | h2 {
18 | @include h2;
19 | }
20 | h3 {
21 | @include h3;
22 | }
23 | h4 {
24 | @include h4;
25 | }
26 | h5 {
27 | @include h5;
28 | }
29 | h6 {
30 | @include h6;
31 | }
32 |
33 | // Body text
34 | // --------------------------------------------------
35 |
36 | p {
37 | margin-top: 0;
38 | // stylelint-disable-next-line primer/spacing
39 | margin-bottom: 10px;
40 | }
41 |
42 | small {
43 | // stylelint-disable-next-line primer/typography
44 | font-size: 90%;
45 | }
46 |
47 | blockquote {
48 | margin: 0;
49 | }
50 |
51 | // Lists
52 | // --------------------------------------------------
53 |
54 | ul,
55 | ol {
56 | padding-left: 0;
57 | margin-top: 0;
58 | margin-bottom: 0;
59 | }
60 |
61 | ol ol,
62 | ul ol {
63 | list-style-type: lower-roman;
64 | }
65 |
66 | ul ul ol,
67 | ul ol ol,
68 | ol ul ol,
69 | ol ol ol {
70 | list-style-type: lower-alpha;
71 | }
72 |
73 | dd {
74 | margin-left: 0;
75 | }
76 |
77 | // Code
78 | // --------------------------------------------------
79 |
80 | tt,
81 | code {
82 | font-family: $mono-font;
83 | font-size: $font-size-small;
84 | }
85 |
86 | pre {
87 | margin-top: 0;
88 | margin-bottom: 0;
89 | font-family: $mono-font;
90 | font-size: $font-size-small;
91 | }
92 |
93 | // Octicons
94 | // --------------------------------------------------
95 |
96 | // Move this over here as a temporary override to the octicons source repo
97 | // instead of updating that upstream.
98 | .octicon {
99 | vertical-align: text-bottom;
100 | }
101 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/breadcrumb/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | bundle: "breadcrumb"
3 | generated: true
4 | ---
5 |
6 | # Primer CSS: `breadcrumb` bundle
7 |
8 | ## Usage
9 |
10 | Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11 |
12 | ```scss
13 | @import "@primer/css/breadcrumb/index.scss";
14 | ```
15 |
16 | ## Build
17 |
18 | The `@primer/css` npm package includes a standalone CSS build of this module in `dist/breadcrumb.css`.
19 |
20 | ## License
21 |
22 | [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
23 |
24 | [scss]: https://sass-lang.com/documentation/syntax#scss
25 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/breadcrumb/breadcrumb.scss:
--------------------------------------------------------------------------------
1 | .breadcrumb-item {
2 | display: inline-block;
3 | // stylelint-disable-next-line primer/spacing
4 | margin-left: -0.35em;
5 | white-space: nowrap;
6 | list-style: none;
7 |
8 | &::after {
9 | padding-right: $em-spacer-5;
10 | padding-left: $em-spacer-5;
11 | // stylelint-disable-next-line primer/colors
12 | color: $border-gray;
13 | content: "/";
14 | }
15 |
16 | &:first-child {
17 | margin-left: 0;
18 | }
19 | }
20 |
21 | .breadcrumb-item-selected,
22 | .breadcrumb-item[aria-current]:not([aria-current="false"]) {
23 | color: $text-gray;
24 |
25 | &::after {
26 | content: none;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/breadcrumb/index.scss:
--------------------------------------------------------------------------------
1 | // support files
2 | @import "../support/index.scss";
3 | @import "./breadcrumb.scss";
4 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/buttons/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | bundle: "buttons"
3 | generated: true
4 | ---
5 |
6 | # Primer CSS: `buttons` bundle
7 |
8 | ## Usage
9 |
10 | Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11 |
12 | ```scss
13 | @import "@primer/css/buttons/index.scss";
14 | ```
15 |
16 | ## Build
17 |
18 | The `@primer/css` npm package includes a standalone CSS build of this module in `dist/buttons.css`.
19 |
20 | ## License
21 |
22 | [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
23 |
24 | [scss]: https://sass-lang.com/documentation/syntax#scss
25 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/buttons/button-group.scss:
--------------------------------------------------------------------------------
1 | // Button group
2 | //
3 | // A button group is a series of buttons laid out next to each other, all part
4 | // of one visual button, but separated by rules to be separate.
5 |
6 | .BtnGroup {
7 | display: inline-block;
8 | vertical-align: middle;
9 | @include clearfix();
10 |
11 | // Proper spacing for multiple button groups (a la, gollum editor)
12 | + .BtnGroup,
13 | + .btn {
14 | margin-left: $spacer-1;
15 | }
16 | }
17 |
18 | .BtnGroup-item {
19 | position: relative;
20 | float: left;
21 | border-right-width: 0;
22 | border-radius: 0;
23 |
24 | &:first-child {
25 | border-top-left-radius: $border-radius;
26 | border-bottom-left-radius: $border-radius;
27 | }
28 |
29 | &:last-child {
30 | border-right-width: $border-width;
31 | border-top-right-radius: $border-radius;
32 | border-bottom-right-radius: $border-radius;
33 | }
34 |
35 | &.selected,
36 | &[aria-selected="true"],
37 | &:focus,
38 | &:active,
39 | &:hover {
40 | border-right-width: $border-width;
41 |
42 | + .BtnGroup-item,
43 | + .BtnGroup-parent .BtnGroup-item {
44 | border-left-width: 0;
45 | }
46 | }
47 | }
48 |
49 | .BtnGroup-parent {
50 | float: left;
51 |
52 | &:first-child .BtnGroup-item {
53 | border-top-left-radius: $border-radius;
54 | border-bottom-left-radius: $border-radius;
55 | }
56 |
57 | &:last-child .BtnGroup-item {
58 | border-right-width: $border-width;
59 | border-top-right-radius: $border-radius;
60 | border-bottom-right-radius: $border-radius;
61 | }
62 |
63 | .BtnGroup-item {
64 | border-right-width: 0;
65 | border-radius: 0;
66 | }
67 |
68 | &.selected,
69 | &[aria-selected="true"],
70 | &:focus,
71 | &:active,
72 | &:hover {
73 | .BtnGroup-item {
74 | border-right-width: $border-width;
75 | }
76 |
77 | + .BtnGroup-item,
78 | + .BtnGroup-parent .BtnGroup-item {
79 | border-left-width: 0;
80 | }
81 | }
82 | }
83 |
84 | // ensure that the focus ring sits above the adjacent buttons
85 | .BtnGroup-item,
86 | .BtnGroup-parent {
87 | &:focus,
88 | &:active {
89 | z-index: 1;
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/buttons/index.scss:
--------------------------------------------------------------------------------
1 | @import "../support/index.scss";
2 | @import "./button.scss";
3 | @import "./button-group.scss";
4 | @import "./misc.scss";
5 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/forms/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | bundle: "forms"
3 | generated: true
4 | ---
5 |
6 | # Primer CSS: `forms` bundle
7 |
8 | ## Usage
9 |
10 | Primer CSS source files are written in [SCSS]. To include this Primer CSS module in your own build, ensure that your `node_modules` directory is listed in your Sass include paths, then import it with:
11 |
12 | ```scss
13 | @import "@primer/css/forms/index.scss";
14 | ```
15 |
16 | ## Build
17 |
18 | The `@primer/css` npm package includes a standalone CSS build of this module in `dist/forms.css`.
19 |
20 | ## License
21 |
22 | [MIT](https://github.com/primer/css/blob/master/LICENSE) © [GitHub](https://github.com/)
23 |
24 | [scss]: https://sass-lang.com/documentation/syntax#scss
25 |
--------------------------------------------------------------------------------
/_sass/lib/@primer/css/forms/form-select.scss:
--------------------------------------------------------------------------------
1 | // Custom select
2 | //
3 | // Apply `.select` to any `