jekyll-rtd-theme 2.0.0.pre.beta1 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +47 -14
  4. data/_includes/{class/addons → addons}/analytics.liquid +2 -2
  5. data/_includes/{class/addons → addons}/github.liquid +0 -0
  6. data/_includes/assets/custom.js +0 -0
  7. data/_includes/assets/custom.scss +0 -0
  8. data/_includes/assets/sw.caches.js +3 -7
  9. data/_includes/class/_breadcrumbs.liquid +3 -3
  10. data/_includes/class/_toctree.liquid +4 -4
  11. data/_includes/class/addons-wrap.liquid +1 -1
  12. data/_includes/class/content-wrap.liquid +3 -3
  13. data/_includes/class/sidebar-wrap.liquid +4 -4
  14. data/_includes/extend/list.liquid +15 -0
  15. data/_includes/{class/_toctree.extend.liquid → extend/toctree.liquid} +10 -6
  16. data/_includes/extra/footer.html +0 -0
  17. data/_includes/extra/head.html +0 -0
  18. data/_includes/list.liquid +4 -4
  19. data/_includes/{head → node}/links.liquid +8 -0
  20. data/_includes/{head → node}/metadata.liquid +0 -0
  21. data/_includes/{head → node}/script.extension.liquid +5 -0
  22. data/_includes/{head → node}/script.liquid +6 -3
  23. data/_includes/{head → node}/script.schema.liquid +0 -0
  24. data/_includes/{head → node}/title.liquid +0 -0
  25. data/_includes/reset/content.liquid +5 -0
  26. data/_includes/reset/defaults.liquid +11 -0
  27. data/_includes/reset/description.liquid +6 -0
  28. data/_includes/{assets → reset}/i18n.liquid +0 -0
  29. data/_includes/reset/navigation.liquid +20 -0
  30. data/_includes/{assets → reset}/site_pages.liquid +0 -0
  31. data/_includes/{assets → reset}/tabs.liquid +0 -0
  32. data/_includes/reset/title.liquid +18 -0
  33. data/_includes/reset/variables.liquid +31 -0
  34. data/_includes/reset/version.liquid +1 -0
  35. data/_includes/{assets → reset}/workdir.liquid +0 -1
  36. data/_includes/shortcodes/danger.liquid +1 -1
  37. data/_includes/shortcodes/note.liquid +1 -1
  38. data/_includes/shortcodes/tip.liquid +1 -1
  39. data/_includes/shortcodes/warning.liquid +1 -1
  40. data/_layouts/default.liquid +13 -9
  41. data/_layouts/plugins/extension.liquid +2 -3
  42. data/_sass/@primer/forms/form-control.scss +6 -3
  43. data/_sass/@primer/loaders/index.scss +2 -0
  44. data/_sass/@primer/loaders/loaders.scss +21 -0
  45. data/_sass/@primer/markdown/lists.scss +1 -0
  46. data/_sass/@primer/support/variables/misc.scss +1 -0
  47. data/_sass/@primer/utilities/borders.scss +6 -3
  48. data/_sass/@primer/utilities/flexbox.scss +3 -0
  49. data/_sass/@primer/utilities/layout.scss +42 -25
  50. data/_sass/_font-face.scss +7 -6
  51. data/_sass/_reset.scss +0 -8
  52. data/_sass/_variables.scss +1 -1
  53. data/_sass/class/markdown-body.scss +18 -7
  54. data/_sass/class/sidebar-wrap.scss +48 -36
  55. data/_sass/theme.scss +1 -0
  56. data/assets/404.liquid +1 -1
  57. data/assets/css/theme.min.css +1 -1
  58. data/assets/js/theme.js +234 -260
  59. data/assets/js/theme.min.js +1 -1
  60. data/assets/pages.liquid +1 -1
  61. data/assets/search.liquid +2 -2
  62. data/assets/sitemap.liquid +1 -1
  63. data/assets/sw.caches.liquid +1 -1
  64. metadata +33 -20
  65. data/_includes/assets/defaults.liquid +0 -69
  66. data/_includes/list.extend.liquid +0 -15
File without changes
@@ -0,0 +1,18 @@
1
+ {%- case page.url -%}
2
+ {%- when "/" -%}
3
+ {%- assign title = site.title
4
+ | append: " · "
5
+ | append: site.description | truncate: 110 -%}
6
+ {%- when "/search.html" -%}
7
+ {%- assign title = __.search | default: "Search"
8
+ | append: " · "
9
+ | append: site.title | truncate: 110 -%}
10
+ {%- when "/404.html" -%}
11
+ {%- assign title = "404"
12
+ | append: " · "
13
+ | append: site.title | truncate: 110 -%}
14
+ {%- else -%}
15
+ {%- assign title = page.title | default: page.name
16
+ | append: " · "
17
+ | append: site.title | truncate: 110 -%}
18
+ {%- endcase -%}
@@ -0,0 +1,31 @@
1
+ {%- comment %} variables {% endcomment -%}
2
+ {%- assign collect = "https://rundocs-analytics.glitch.me/collect" -%}
3
+ {%- assign docs = site.github -%}
4
+ {%- assign rest = docs.public_repositories | where: "html_url", docs.repository_url | first -%}
5
+
6
+ {%- assign rest_created_at = rest.created_at | default: site.time -%}
7
+ {%- assign rest_updated_at = rest.updated_at | default: site.time -%}
8
+
9
+ {%- assign lang = site.lang | default: "en" -%}
10
+ {%- assign author = docs.owner.name | default: docs.owner_name -%}
11
+
12
+ {%- comment %} schema {% endcomment -%}
13
+ {%- assign schema_date = page.date | default: rest_created_at | date_to_xmlschema -%}
14
+ {%- assign schema_modi = site.time | date_to_xmlschema -%}
15
+ {%- assign schema_surl = page.url | absolute_url | xml_escape -%}
16
+
17
+ {% comment %} debug {% endcomment %}
18
+ {%- if site.debug -%}
19
+ {%- assign cdn = site.baseurl -%}
20
+ {%- else -%}
21
+ {%- assign cdn = "https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@" | append: version -%}
22
+ {%- endif -%}
23
+
24
+ {% comment %} custom {% endcomment %}
25
+ {%- capture custom_scss -%}
26
+ {%- include assets/custom.scss -%} {{- site.scss -}}
27
+ {%- endcapture -%}
28
+
29
+ {%- capture custom_script -%}
30
+ {%- include assets/custom.js -%} {{- site.script -}}
31
+ {%- endcapture -%}
@@ -0,0 +1 @@
1
+ {%- assign version = "2.0.4" -%}
@@ -1,4 +1,3 @@
1
- {% comment %} Start from the language chapter(eg: en-us) or root(/) {% endcomment %}
2
1
  {%- assign workdir = include.workdir | default: "/" -%}
3
2
 
4
3
  {%- assign workdir_level = workdir | append: "temp" | replace_first: "/", "" | split: "/" | size -%}
@@ -1,4 +1,4 @@
1
- <div class="admonition danger box-shadow mb-3">
1
+ <div class="admonition danger mb-3">
2
2
  <div class="title px-2 py-1">
3
3
  <i class="fa fa-exclamation-circle"></i>
4
4
  {{ __.danger | default: "Danger" }}
@@ -1,4 +1,4 @@
1
- <div class="admonition note box-shadow mb-3">
1
+ <div class="admonition note mb-3">
2
2
  <div class="title px-2 py-1">
3
3
  <i class="fa fa-exclamation-circle"></i>
4
4
  {{ __.note | default: "Note" }}
@@ -1,4 +1,4 @@
1
- <div class="admonition tip box-shadow mb-3">
1
+ <div class="admonition tip mb-3">
2
2
  <div class="title px-2 py-1">
3
3
  <i class="fa fa-exclamation-circle"></i>
4
4
  {{ __.tip | default: "Tip" }}
@@ -1,4 +1,4 @@
1
- <div class="admonition warning box-shadow mb-3">
1
+ <div class="admonition warning mb-3">
2
2
  <div class="title px-2 py-1">
3
3
  <i class="fa fa-exclamation-circle"></i>
4
4
  {{ __.warning | default: "Warning" }}
@@ -2,23 +2,27 @@
2
2
  layout: plugins/compress
3
3
  ---
4
4
 
5
- {%- include assets/defaults.liquid -%}
5
+ {%- include reset/defaults.liquid -%}
6
6
 
7
7
  <!DOCTYPE html>
8
- <html lang="{{ site.lang }}">
8
+ <html lang="{{ lang }}">
9
9
  <head>
10
- {%- include head/metadata.liquid -%}
10
+ {%- include node/metadata.liquid -%}
11
11
 
12
- {%- include head/title.liquid -%}
13
- {%- include head/links.liquid -%}
12
+ {%- include node/title.liquid -%}
13
+ {%- include node/links.liquid -%}
14
+ {%- include node/script.schema.liquid -%}
14
15
 
15
- {%- include head/script.schema.liquid -%}
16
- {%- include head/script.liquid -%}
17
- {%- include head/script.extension.liquid -%}
16
+ {%- include extra/head.html -%}
18
17
  </head>
19
18
  <body class="container">
20
19
  {%- include class/sidebar-wrap.liquid -%}
21
- {%- include class/addons-wrap.liquid -%}
22
20
  {%- include class/content-wrap.liquid -%}
21
+ {%- include class/addons-wrap.liquid -%}
22
+
23
+ {%- include node/script.liquid -%}
24
+ {%- include node/script.extension.liquid -%}
25
+
26
+ {%- include extra/footer.html -%}
23
27
  </body>
24
28
  </html>
@@ -1,4 +1,4 @@
1
- {%- include assets/i18n.liquid -%}
1
+ {%- include reset/i18n.liquid -%}
2
2
 
3
3
  {%- assign shortcodes = "mermaid, warning, note, tip, danger" | split: ", " -%}
4
4
 
@@ -15,9 +15,8 @@
15
15
  {%- assign custom = content_block | replace_first: '><code class="language-', "" | replace_first: '">', "<temp/>" | split: "<temp/>" -%}
16
16
  {%- assign lang = custom.first -%}
17
17
  {%- assign codes = custom.last | split: "</code>" | first -%}
18
- {%- assign others = custom.last | split: "</code>" | last -%}
19
18
  {%- if shortcodes contains lang -%}
20
- {%- include shortcodes/{{ lang }}.liquid -%} {{- others -}}
19
+ {%- include shortcodes/{{ lang }}.liquid -%} {{- pre_blocks.last -}}
21
20
  {%- else -%}
22
21
  <pre{{ pre_blocks.first }}</pre> {{ pre_blocks.last }}
23
22
  {%- endif -%}
@@ -46,9 +46,12 @@ label {
46
46
  background-color: #f3f4f6; // custom gray
47
47
  }
48
48
 
49
- // Ensures inputs don't zoom on mobile but are body-font size on desktop
50
- @include breakpoint(md) {
51
- font-size: $body-font-size;
49
+ // Ensures inputs don't zoom on mobile iPhone but are body-font size on iPad
50
+ @supports (-webkit-touch-callout: none) {
51
+ font-size: $h4-size;
52
+ @include breakpoint(md) {
53
+ font-size: $body-font-size;
54
+ }
52
55
  }
53
56
  }
54
57
 
@@ -0,0 +1,2 @@
1
+ @import "../support/index.scss";
2
+ @import "./loaders.scss";
@@ -0,0 +1,21 @@
1
+ // Loaders
2
+
3
+ // Animated Ellipsis
4
+
5
+ .AnimatedEllipsis {
6
+ display: inline-block;
7
+ overflow: hidden;
8
+ vertical-align: bottom;
9
+
10
+ &::after {
11
+ display: inline-block;
12
+ content: "...";
13
+ animation: AnimatedEllipsis-keyframes 1.2s steps(4, jump-none) infinite;
14
+ }
15
+
16
+ @keyframes AnimatedEllipsis-keyframes {
17
+ 0% {
18
+ transform: translateX(-100%);
19
+ }
20
+ }
21
+ }
@@ -46,6 +46,7 @@
46
46
  }
47
47
 
48
48
  li {
49
+ // TODO@16.0.0: Remove this. See https://github.com/primer/css/pull/1137.
49
50
  word-wrap: break-all;
50
51
  }
51
52
 
@@ -9,6 +9,7 @@ $border: $border-width $border-color $border-style !default;
9
9
  // Border Radius
10
10
  $border-radius-1: 4px !default;
11
11
  $border-radius-2: 6px !default;
12
+ $border-radius-3: 8px !default;
12
13
  $border-radius: $border-radius-2 !default;
13
14
 
14
15
  // Box shadow
@@ -72,6 +72,9 @@
72
72
  .rounded#{$variant}-2 {
73
73
  border-radius: $border-radius-2 !important;
74
74
  }
75
+ .rounded#{$variant}-3 {
76
+ border-radius: $border-radius-3 !important;
77
+ }
75
78
 
76
79
  @each $edge, $corners in $edges {
77
80
  .rounded#{$variant}-#{$edge}-0 {
@@ -82,19 +85,19 @@
82
85
 
83
86
  .rounded#{$variant}-#{$edge}-1 {
84
87
  @each $corner in $corners {
85
- border-#{$corner}-radius: $border-radius / 2 !important;
88
+ border-#{$corner}-radius: $border-radius-1 !important;
86
89
  }
87
90
  }
88
91
 
89
92
  .rounded#{$variant}-#{$edge}-2 {
90
93
  @each $corner in $corners {
91
- border-#{$corner}-radius: $border-radius !important;
94
+ border-#{$corner}-radius: $border-radius-2 !important;
92
95
  }
93
96
  }
94
97
 
95
98
  .rounded#{$variant}-#{$edge}-3 {
96
99
  @each $corner in $corners {
97
- border-#{$corner}-radius: $border-radius * 2 !important;
100
+ border-#{$corner}-radius: $border-radius-3 !important;
98
101
  }
99
102
  }
100
103
  }
@@ -23,6 +23,9 @@
23
23
  .flex#{$variant}-nowrap {
24
24
  flex-wrap: nowrap !important;
25
25
  }
26
+ .flex#{$variant}-wrap-reverse {
27
+ flex-wrap: wrap-reverse !important;
28
+ }
26
29
 
27
30
  .flex#{$variant}-justify-start {
28
31
  justify-content: flex-start !important;
@@ -1,7 +1,7 @@
1
1
  // Layout
2
2
  // stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, comment-empty-line-before
3
3
 
4
- // Loop through the breakpoint values
4
+ /* Position */
5
5
  @each $breakpoint, $variant in $responsive-variants {
6
6
  @include breakpoint($breakpoint) {
7
7
  @each $position in $responsive-positions {
@@ -12,21 +12,34 @@
12
12
  }
13
13
  }
14
14
 
15
- /* Set top 0 */
16
- .top-0 {
17
- top: 0 !important;
18
- }
19
- /* Set right 0 */
20
- .right-0 {
21
- right: 0 !important;
22
- }
23
- /* Set bottom 0 */
24
- .bottom-0 {
25
- bottom: 0 !important;
26
- }
27
- /* Set left 0 */
28
- .left-0 {
29
- left: 0 !important;
15
+ /* Final position */
16
+ @each $breakpoint, $variant in $responsive-variants {
17
+ @include breakpoint($breakpoint) {
18
+ .top#{$variant}-0 {
19
+ top: 0 !important;
20
+ }
21
+ .right#{$variant}-0 {
22
+ right: 0 !important;
23
+ }
24
+ .bottom#{$variant}-0 {
25
+ bottom: 0 !important;
26
+ }
27
+ .left#{$variant}-0 {
28
+ left: 0 !important;
29
+ }
30
+ .top#{$variant}-auto {
31
+ top: auto !important;
32
+ }
33
+ .right#{$variant}-auto {
34
+ right: auto !important;
35
+ }
36
+ .bottom#{$variant}-auto {
37
+ bottom: auto !important;
38
+ }
39
+ .left#{$variant}-auto {
40
+ left: auto !important;
41
+ }
42
+ }
30
43
  }
31
44
 
32
45
  /* Vertical align middle */
@@ -55,15 +68,19 @@
55
68
  }
56
69
 
57
70
  // Overflow utilities
58
- @each $overflow in (visible, hidden, auto, scroll) {
59
- .overflow-#{$overflow} {
60
- overflow: $overflow !important;
61
- }
62
- .overflow-x-#{$overflow} {
63
- overflow-x: $overflow !important;
64
- }
65
- .overflow-y-#{$overflow} {
66
- overflow-y: $overflow !important;
71
+ @each $breakpoint, $variant in $responsive-variants {
72
+ @include breakpoint($breakpoint) {
73
+ @each $overflow in (visible, hidden, auto, scroll) {
74
+ .overflow#{$variant}-#{$overflow} {
75
+ overflow: $overflow !important;
76
+ }
77
+ .overflow#{$variant}-x-#{$overflow} {
78
+ overflow-x: $overflow !important;
79
+ }
80
+ .overflow#{$variant}-y-#{$overflow} {
81
+ overflow-y: $overflow !important;
82
+ }
83
+ }
67
84
  }
68
85
  }
69
86
 
@@ -36,30 +36,31 @@
36
36
 
37
37
  @font-face {
38
38
  font-family: "Roboto-Slab";
39
- src: url("fonts/Roboto-Slab-Regular.woff2") format("woff2"),
40
- url("fonts/Roboto-Slab-Regular.woff") format("woff");
41
39
  font-weight: $font-weight-normal;
42
40
  font-style: normal;
43
41
  font-display: block;
42
+ src: url("fonts/Roboto-Slab-Regular.woff2") format("woff2"),
43
+ url("fonts/Roboto-Slab-Regular.woff") format("woff");
44
44
  }
45
45
 
46
46
  @font-face {
47
47
  font-family: "Roboto-Slab";
48
- src: url("fonts/Roboto-Slab-Bold.woff2") format("woff2"),
49
- url("fonts/Roboto-Slab-Bold.woff") format("woff");
50
48
  font-weight: $font-weight-bold;
51
49
  font-style: normal;
52
50
  font-display: block;
51
+ src: url("fonts/Roboto-Slab-Bold.woff2") format("woff2"),
52
+ url("fonts/Roboto-Slab-Bold.woff") format("woff");
53
53
  }
54
54
 
55
55
  @font-face {
56
56
  font-family: "FontAwesome";
57
+ font-weight: normal;
58
+ font-style: normal;
59
+ font-display: block;
57
60
  src: url("fonts/fontawesome-webfont.eot");
58
61
  src: url("fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),
59
62
  url("fonts/fontawesome-webfont.woff2") format("woff2"),
60
63
  url("fonts/fontawesome-webfont.woff") format("woff"),
61
64
  url("fonts/fontawesome-webfont.ttf") format("truetype"),
62
65
  url("fonts/fontawesome-webfont.svg#fontawesomeregular") format("svg");
63
- font-weight: normal;
64
- font-style: normal;
65
66
  }
@@ -1,11 +1,3 @@
1
- a {
2
- color: $theme-link;
3
-
4
- &:hover {
5
- color: $theme-link-hover;
6
- }
7
- }
8
-
9
1
  .fa {
10
2
  display: inline-block;
11
3
  font: normal normal normal 14px/1 "FontAwesome";
@@ -8,7 +8,7 @@ $box-shadow-focus: none;
8
8
 
9
9
  // theme color
10
10
  $theme-blue: #2980b9;
11
- $theme-red: #e74c3c; // code
11
+ $theme-red: #e74c3c;
12
12
  $theme-offgreen: #1abc9c;
13
13
  $theme-orange: #e67e22;
14
14
 
@@ -2,6 +2,19 @@
2
2
  // 400
3
3
  font-weight: $font-weight-normal;
4
4
 
5
+ a {
6
+ color: $theme-link;
7
+
8
+ &:hover {
9
+ color: $theme-link-hover;
10
+ }
11
+
12
+ code,
13
+ tt {
14
+ color: $theme-link;
15
+ }
16
+ }
17
+
5
18
  h1,
6
19
  h2,
7
20
  h3,
@@ -27,13 +40,7 @@
27
40
  font-size: $font-size-small;
28
41
  border: $border;
29
42
  color: $theme-red;
30
- }
31
-
32
- a {
33
- code,
34
- tt {
35
- color: $text-blue;
36
- }
43
+ background-color: darken($theme-white, 2%);
37
44
  }
38
45
 
39
46
  pre {
@@ -48,6 +55,10 @@
48
55
  border: $border;
49
56
  }
50
57
 
58
+ .highlight pre {
59
+ background-color: transparent;
60
+ }
61
+
51
62
  // search
52
63
  .search-results {
53
64
  li {
@@ -9,24 +9,15 @@
9
9
  li {
10
10
  list-style: none;
11
11
  }
12
+ .version {
13
+ color: rgba(255, 255, 255, 0.3);
14
+ }
12
15
  }
13
16
 
14
17
  .toctree {
15
- color: #9b9b9b;
16
-
17
18
  a {
18
- color: #d9d9d9;
19
+ color: $theme-white;
19
20
  padding: 0.5em;
20
-
21
- &:hover {
22
- background: $theme-mask-white;
23
- }
24
- &:active {
25
- background: $theme-menu-active-background;
26
- }
27
- }
28
- .fa {
29
- margin-right: 2px;
30
21
  }
31
22
 
32
23
  .caption {
@@ -34,9 +25,52 @@
34
25
  font-weight: $font-weight-bold;
35
26
  line-height: 32px;
36
27
  }
28
+
29
+ .fa {
30
+ margin-right: 2px;
31
+ }
32
+
33
+ > ul {
34
+ // the first level links
35
+ > .toc:not(.current) > a {
36
+ &:hover {
37
+ background: $theme-mask-white;
38
+ }
39
+ &:active {
40
+ background: $theme-menu-active-background;
41
+ }
42
+ }
43
+
44
+ .toc.current {
45
+ // all expanded links
46
+ a {
47
+ color: #404040;
48
+
49
+ &:hover {
50
+ background: $theme-mask-white;
51
+ }
52
+ &.current {
53
+ font-weight: bold;
54
+ background: $theme-white;
55
+ border-top: 1px solid var(--toc-2);
56
+ border-bottom: 1px solid var(--toc-2);
57
+ }
58
+ }
59
+ // parent links
60
+ > a {
61
+ .fa-plus-square-o {
62
+ @extend .fa-minus-square-o;
63
+ }
64
+ }
65
+ }
66
+ // fixed level-1's hover mask
67
+ > .toc.current {
68
+ background: var(--toc-1);
69
+ }
70
+ }
37
71
  }
38
72
 
39
- // layout
73
+ // toc layout
40
74
  .toc {
41
75
  > ul {
42
76
  @extend .d-none;
@@ -50,7 +84,6 @@
50
84
 
51
85
  > ul {
52
86
  @extend .d-block;
53
-
54
87
  background: var(--toc-#{$level + 1});
55
88
  }
56
89
 
@@ -60,24 +93,3 @@
60
93
  }
61
94
  }
62
95
  }
63
-
64
- .toc {
65
- &.current {
66
- & > a {
67
- .fa-plus-square-o {
68
- @extend .fa-minus-square-o;
69
- }
70
- }
71
-
72
- a {
73
- color: #404040;
74
-
75
- &.current {
76
- font-weight: bold;
77
- background: $theme-white;
78
- border-top: 1px solid var(--toc-2);
79
- border-bottom: 1px solid var(--toc-2);
80
- }
81
- }
82
- }
83
- }