jekyll-theme-cs50 0.1.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/head.html +40 -0
  3. data/_layouts/page.html +1 -113
  4. data/_sass/{node_modules/bootstrap → bootstrap}/LICENSE +0 -0
  5. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_alert.scss +0 -0
  6. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_badge.scss +0 -0
  7. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_breadcrumb.scss +0 -0
  8. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_button-group.scss +0 -0
  9. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_buttons.scss +0 -0
  10. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_card.scss +0 -0
  11. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_carousel.scss +0 -0
  12. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_close.scss +0 -0
  13. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_code.scss +0 -0
  14. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_custom-forms.scss +0 -0
  15. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_dropdown.scss +0 -0
  16. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_forms.scss +0 -0
  17. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_functions.scss +0 -0
  18. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_grid.scss +0 -0
  19. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_images.scss +0 -0
  20. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_input-group.scss +0 -0
  21. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_jumbotron.scss +0 -0
  22. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_list-group.scss +0 -0
  23. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_media.scss +0 -0
  24. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_mixins.scss +0 -0
  25. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_modal.scss +0 -0
  26. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_nav.scss +0 -0
  27. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_navbar.scss +0 -0
  28. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_pagination.scss +0 -0
  29. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_popover.scss +0 -0
  30. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_print.scss +0 -0
  31. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_progress.scss +0 -0
  32. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_reboot.scss +0 -0
  33. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_root.scss +0 -0
  34. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_spinners.scss +0 -0
  35. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_tables.scss +0 -0
  36. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_toasts.scss +0 -0
  37. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_tooltip.scss +0 -0
  38. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_transitions.scss +0 -0
  39. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_type.scss +0 -0
  40. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_utilities.scss +0 -0
  41. data/_sass/{node_modules/bootstrap → bootstrap}/scss/_variables.scss +0 -0
  42. data/_sass/{node_modules/bootstrap → bootstrap}/scss/bootstrap-grid.scss +0 -0
  43. data/_sass/{node_modules/bootstrap → bootstrap}/scss/bootstrap-reboot.scss +0 -0
  44. data/_sass/{node_modules/bootstrap → bootstrap}/scss/bootstrap.scss +0 -0
  45. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_alert.scss +0 -0
  46. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_background-variant.scss +0 -0
  47. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_badge.scss +0 -0
  48. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_border-radius.scss +0 -0
  49. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_box-shadow.scss +0 -0
  50. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_breakpoints.scss +0 -0
  51. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_buttons.scss +0 -0
  52. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_caret.scss +0 -0
  53. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_clearfix.scss +0 -0
  54. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_deprecate.scss +0 -0
  55. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_float.scss +0 -0
  56. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_forms.scss +0 -0
  57. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_gradients.scss +0 -0
  58. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_grid-framework.scss +0 -0
  59. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_grid.scss +0 -0
  60. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_hover.scss +0 -0
  61. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_image.scss +0 -0
  62. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_list-group.scss +0 -0
  63. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_lists.scss +0 -0
  64. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_nav-divider.scss +0 -0
  65. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_pagination.scss +0 -0
  66. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_reset-text.scss +0 -0
  67. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_resize.scss +0 -0
  68. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_screen-reader.scss +0 -0
  69. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_size.scss +0 -0
  70. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_table-row.scss +0 -0
  71. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_text-emphasis.scss +0 -0
  72. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_text-hide.scss +0 -0
  73. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_text-truncate.scss +0 -0
  74. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_transition.scss +0 -0
  75. data/_sass/{node_modules/bootstrap → bootstrap}/scss/mixins/_visibility.scss +0 -0
  76. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_align.scss +0 -0
  77. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_background.scss +0 -0
  78. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_borders.scss +0 -0
  79. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_clearfix.scss +0 -0
  80. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_display.scss +0 -0
  81. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_embed.scss +0 -0
  82. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_flex.scss +0 -0
  83. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_float.scss +0 -0
  84. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_overflow.scss +0 -0
  85. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_position.scss +0 -0
  86. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_screenreaders.scss +0 -0
  87. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_shadows.scss +0 -0
  88. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_sizing.scss +0 -0
  89. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_spacing.scss +0 -0
  90. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_stretched-link.scss +0 -0
  91. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_text.scss +0 -0
  92. data/_sass/{node_modules/bootstrap → bootstrap}/scss/utilities/_visibility.scss +0 -0
  93. data/_sass/{node_modules/bootstrap → bootstrap}/scss/vendor/_rfs.scss +0 -0
  94. data/_sass/jekyll-theme-cs50.scss +11 -333
  95. data/_sass/primer-markdown/LICENSE +21 -0
  96. data/_sass/{node_modules/primer-markdown → primer-markdown}/build/build.scss +0 -0
  97. data/_sass/rouge.scss +209 -0
  98. data/assets/@fortawesome/fontawesome-free/css/all.min.css +5 -0
  99. data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.eot +0 -0
  100. data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.svg +3442 -0
  101. data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  102. data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff +0 -0
  103. data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  104. data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.eot +0 -0
  105. data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.svg +803 -0
  106. data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  107. data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff +0 -0
  108. data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  109. data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.eot +0 -0
  110. data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.svg +4649 -0
  111. data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  112. data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff +0 -0
  113. data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  114. data/assets/bootstrap/LICENSE +22 -0
  115. data/assets/bootstrap/dist/js/bootstrap.min.js +7 -0
  116. data/assets/jekyll-theme-cs50.js +156 -0
  117. data/assets/jquery/LICENSE.txt +36 -0
  118. data/assets/jquery/dist/jquery.min.js +2 -0
  119. data/assets/page.scss +273 -0
  120. data/assets/popper.js/dist/popper.min.js +5 -0
  121. data/assets/popper.js/dist/umd/popper.min.js +5 -0
  122. data/lib/jekyll-theme-cs50.rb +128 -0
  123. data/lib/jekyll-theme-cs50/constants.rb +36 -0
  124. metadata +150 -109
  125. data/_sass/package.json +0 -12
  126. data/assets/css/style.scss +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a8c9a686a6e28101db3936a867dc4aa25112f01ff6e7f85cccefd9d954090c1
4
- data.tar.gz: bb2eb4e5c7451b00f1678a27dc81759728bdd111499afcc897070cb09009da74
3
+ metadata.gz: 896c673919e772490e6219d39ef65b598ec024149266d257671781fcfa6c19ac
4
+ data.tar.gz: 74bb39a019704681c9fe7825ac9f6c260742276adaf27820ace260d828442a37
5
5
  SHA512:
6
- metadata.gz: 4799a0ef990502326bcfd03199b499cb8bea2efe8004097284cda90703a86adc180341592af3920fe5eb1b6b4939f79e2d297ebcf7d264e995f6d093ea109a55
7
- data.tar.gz: 87bc23a460616f5c299c8bf36cfbebd49aee8935b1293b06ba53c78706095094718279c4729572e8cb19e550ad72344433da4af3df34f45c6a02fdbf28452dbb
6
+ metadata.gz: 1aed08f4cd1774a7251942d8264d6296fed5203e344909ecb45cb20f36bfeadac25800964b699c231122fe0d826ddb728024ffa43f3514a93c4b8b88bcadbaf0
7
+ data.tar.gz: 7fbf519f09b1c6874a82778eb1ae1d3dcf2563616ffc82a497b151c83a90d3e37f2b97da13d359486a4f61ea1d8640d5bf9dd0ee6ed0116d5a6b9bcc0ee8b79c
@@ -0,0 +1,40 @@
1
+ <meta charset="utf-8">
2
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
3
+
4
+ <meta property="og:description" content="{{ site.description }}">
5
+
6
+ <meta property="og:image" content="{{ site.image }}">
7
+
8
+ {%- capture title -%}
9
+ {%- if page.title -%}
10
+ {{- page.title -}}
11
+ {%- endif -%}
12
+ {%- if site.title -%}
13
+ {%- unless site.github and site.title == site.github.repository_name -%}
14
+ {%- if page.title %} - {% endif -%}
15
+ {{- site.title -}}
16
+ {%- endunless -%}
17
+ {%- endif -%}
18
+ {%- endcapture -%}
19
+
20
+ <meta property="og:title" content="{{ title }}">
21
+
22
+ <meta property="og:url" content="{{ site.url }}">
23
+
24
+ {%- assign time = site.time | date: '%s' -%}
25
+
26
+ <link href="{{ '/favicon.ico' | relative_url }}?{{ time }}" rel="icon">
27
+
28
+ <!-- https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use -->
29
+ <link href="{{ '/assets/@fortawesome/fontawesome-free/css/all.min.css' | relative_url }}?{{ time }}" rel="stylesheet">
30
+
31
+ <link href="{{ '/assets/' | append: page.layout | append: '.css' | relative_url }}?{{ time }}" rel="stylesheet">
32
+
33
+ <!-- http://getbootstrap.com/docs/4.3/getting-started/introduction/ -->
34
+ <script src="{{ '/assets/jquery/dist/jquery.min.js' | relative_url }}?{{ time }}"></script>
35
+ <script src="{{ '/assets/popper.js/dist/umd/popper.min.js' | relative_url }}?{{ time }}"></script>
36
+ <script src="{{ '/assets/bootstrap/dist/js/bootstrap.min.js' | relative_url }}?{{ time }}"></script>
37
+
38
+ <script src="{{ '/assets/jekyll-theme-cs50.js' | relative_url }}?{{ time }}"></script>
39
+
40
+ <title>{{ title }}</title>
@@ -4,119 +4,7 @@
4
4
 
5
5
  <head>
6
6
 
7
- <meta charset="utf-8">
8
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9
-
10
- <meta property="og:description" content="{{ site.description }}">
11
-
12
- <meta property="og:image" content="{{ site.image }}">
13
-
14
- {%- capture title -%}
15
- {%- if page.title -%}
16
- {{- page.title -}}
17
- {%- endif -%}
18
- {%- if site.title -%}
19
- {%- unless site.github and site.title == site.github.repository_name -%}
20
- {%- if page.title %} - {% endif -%}
21
- {{- site.title -}}
22
- {%- endunless -%}
23
- {%- endif -%}
24
- {%- endcapture %}
25
-
26
- <meta property="og:title" content="{{ title }}">
27
-
28
- <meta property="og:url" content="{{ site.url }}">
29
-
30
- <link href="{{ '/favicon.ico' | relative_url }}?{{ site.time | date: '%s' }}" rel="icon">
31
-
32
- <!-- https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use -->
33
- <link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" rel="stylesheet">
34
-
35
- <link href="{{ '/assets/css/style.css' | relative_url }}?{{ site.time | date: '%s' }}" rel="stylesheet">
36
-
37
- <!-- http://getbootstrap.com/docs/4.3/getting-started/introduction/ -->
38
- <script crossorigin="anonymous" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
39
- <script crossorigin="anonymous" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
40
- <script crossorigin="anonymous" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
41
-
42
- <script>
43
-
44
- $(document).on('DOMContentLoaded', function() {
45
-
46
- // Get headings
47
- let $headings = $([
48
- 'main.markdown-body h2',
49
- 'main.markdown-body h3',
50
- 'main.markdown-body h4',
51
- 'main.markdown-body h5',
52
- 'main.markdown-body h6'].join(','));
53
-
54
- // Add anchors to headings
55
- $headings.each(function(index, element) {
56
- if ($(element).attr('id') && $(element).has('a').length === 0) {
57
- $(element).wrapInner($('<a data-id href="#' + $(element).attr('id') + '"></a>'));
58
- }
59
- });
60
-
61
- // For each iframe
62
- $('iframe').each(function(index, element) {
63
-
64
- // Ensure responsive in Safari on iOS (for, e.g., Google Calendars), per https://stackoverflow.com/a/23083463/5156190
65
- if (!$(this).attr('scrolling')) {
66
- $(this).attr('scrolling', 'no');
67
- }
68
-
69
- // If an embedded YouTube video
70
- let matches = $(this).attr('src').match(/^https:\/\/www.youtube.com\/embed\/([A-Za-z0-9_-]+)/);
71
- if (matches) {
72
-
73
- // Add allowfullscreen if not present
74
- if ($(this).attr('allowfullscreen') === undefined) {
75
- $(this).attr('allowfullscreen', '');
76
- }
77
-
78
- // Add modifier classes if not present, assuming 16x9 by default
79
- if (!$(this).hasClass('embed-responsive-item')) {
80
- $(this).addClass('embed-responsive-item');
81
- $(this).wrap('<div class="embed-responsive embed-responsive-16by9"></div>');
82
- }
83
-
84
- // Add background image for printing
85
- // https://stackoverflow.com/a/2068371/5156190
86
- if ($(this).css('background-image') === 'none') {
87
- $(this).css('background-image', 'url("https://img.youtube.com/vi/' + matches[1] + '/sddefault.jpg")');
88
- $(this).css('background-repeat', 'no-repeat');
89
- $(this).css('background-size', 'cover');
90
- }
91
- }
92
- });
93
-
94
- // Ensure last heading can be anchored atop page
95
- $(window).resize(function() {
96
- let last = $headings.last();
97
- if (last.length) {
98
-
99
- // On small devices
100
- if ($('aside').position().top < $('main').position().top) {
101
- var margin = $(window).height() - ($('main').outerHeight() + $('aside').outerHeight() - last.offset().top);
102
- }
103
-
104
- // On large devices
105
- else {
106
- var margin = $(window).height() - ($('main').outerHeight() - last.offset().top);
107
- }
108
-
109
- // Update margin
110
- $('main').css('margin-bottom', Math.max(0, Math.ceil(margin)) + 'px');
111
- }
112
- });
113
- $(window).trigger('resize');
114
-
115
- });
116
-
117
- </script>
118
-
119
- <title>{{ title }}</title>
7
+ {%- include head.html -%}
120
8
 
121
9
  </head>
122
10
 
@@ -6,347 +6,25 @@ $link-color: #a51c30 !default;
6
6
  $link-hover-color: $link-color !default;
7
7
 
8
8
  // Import Bootstrap
9
- @import "node_modules/bootstrap/scss/bootstrap.scss";
9
+ @import "bootstrap/scss/bootstrap.scss";
10
10
 
11
11
  // Import build of primer-markdown after renaming build.css to build.scss via package.json so that we can import, per
12
12
  // https://stackoverflow.com/questions/7111610/import-regular-css-file-in-scss-file/36166487#36166487
13
- @import "node_modules/primer-markdown/build/build.scss";
13
+ @import "primer-markdown/build/build.scss";
14
+
15
+ // GitHub syntax highlighter color scheme for Pygments
16
+ // https://github.com/PhilipTrauner/pygments-github-css/blob/master/github.css
17
+ @import "rouge";
14
18
 
15
19
  // Import Google Fonts
16
20
  @import url("https://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700");
17
21
 
18
- // Root em
19
- html {
20
- font-size: 18px;
21
- }
22
-
23
- // Defaults for iframes
24
- iframe {
25
- border: 0;
26
- height: 480px;
27
- }
28
-
29
- // Ensure responsive in Safari on iOS (for, e.g., Google Calendars), per
30
- // https://stackoverflow.com/a/23083463/5156190
31
- iframe {
32
- min-width: 100%;
33
- width: 1px;
34
- }
35
-
36
- // Confine images to parent
37
- img {
38
- max-width: 100%;
39
- }
40
-
41
- // Confine borders to images
42
- .img-thumbnail {
43
- width: fit-content;
44
- }
45
-
46
- // Crimson background, transparent text
47
- aside {
48
- background-color: $link-color;
49
- color: rgba(255, 255, 255, 0.5);
50
- font-size: 1.125rem;
51
- }
52
-
53
- // Override column's padding
54
- aside.col-md {
55
- padding: 2rem 2rem;
22
+ // next
23
+ .next {
24
+ display: none;
56
25
  }
57
26
 
58
- // Fixed width, scroll on larger devices
59
- @include media-breakpoint-up(md) {
60
- aside.col-md {
61
- flex: 0 1 20rem;
62
- @supports (position: sticky) {
63
- height: 100vh;
64
- overflow-y: auto;
65
- position: sticky;
66
- top: 0;
67
- z-index: $zindex-sticky;
68
- }
69
- }
70
- }
71
-
72
- // Align badges
73
- aside .badge {
74
- vertical-align: middle;
75
- }
76
-
77
- // Bold headings
78
- aside h1,
79
- aside h2,
80
- aside h3,
81
- aside h4,
82
- aside h5,
83
- aside h6 {
27
+ // spoiler
28
+ details > summary {
84
29
  font-weight: bold;
85
30
  }
86
-
87
- // Opaque text
88
- aside a,
89
- aside a:hover,
90
- aside button[data-toggle=collapse],
91
- aside button[data-toggle=collapse]:hover {
92
- background-color: inherit;
93
- border-color: rgba(255, 255, 255, .5);
94
- color: rgba(255, 255, 255, 1);
95
- }
96
-
97
- // Opaque border
98
- aside button[data-toggle=collapse]:hover {
99
- border-color: rgba(255, 255, 255, 1);
100
- }
101
-
102
- // Invert colors when not collapsed
103
- aside button[data-toggle=collapse]:not(.collapsed) {
104
- background-color: rgba(255, 255, 255, 1);
105
- color: $link-color;
106
- }
107
-
108
- // Compact small paragraphs
109
- aside p.small {
110
- line-height: 1.25;
111
- }
112
-
113
- // Separate nav button (or header) and footer, applying margins to children to avoid flicker when uncollapsing
114
- nav > *:first-child {
115
- margin-top: 1rem;
116
- }
117
-
118
- // Mimic Primer
119
- header *:last-child,
120
- nav *:last-child,
121
- footer *:last-child {
122
- margin-bottom: 0;
123
- }
124
-
125
- // Separate button from header and nav
126
- aside button[data-toggle=collapse] {
127
- margin-top: 1rem;
128
- }
129
-
130
- // Truncate list items
131
- nav ol li, nav ul li {
132
- @include text-truncate;
133
- }
134
-
135
- // Left-align unordered lists, without bullets
136
- nav ul {
137
- list-style: none;
138
- padding-left: 0;
139
- }
140
-
141
- // Preserve bullets for nested unordered lists
142
- nav ul ul {
143
- list-style: inside;
144
- }
145
-
146
- // Left-align ordered lists
147
- nav ol {
148
- list-style-position: inside;
149
- padding-left: 0;
150
- }
151
-
152
- // Separate footer from nav unless empty
153
- footer {
154
- margin-top: 1rem;
155
- }
156
- footer:empty {
157
- margin-top: 0;
158
- }
159
-
160
- // Override column's padding, width
161
- main.col-md {
162
- max-width: 80rem;
163
- overflow: auto; /* https://stackoverflow.com/a/26523355 */
164
- padding: 4rem 2rem;
165
- }
166
-
167
- // Override Primer's family and size for fonts
168
- .markdown-body {
169
- font-family: inherit; /* Use our family */
170
- font-size: inherit; /* Use our size */
171
- }
172
-
173
- // Add padding above headings to match Primer's padding below headings,
174
- // to ensure anchors aren't too close to top of viewport
175
- .markdown-body h1,
176
- .markdown-body h2,
177
- .markdown-body h3,
178
- .markdown-body h4,
179
- .markdown-body h5,
180
- .markdown-body h6 {
181
- margin-top: 0;
182
- padding-top: 16px;
183
- }
184
-
185
- // Mute emphasized text in headings
186
- .markdown-body h1 > em,
187
- .markdown-body h2 > em,
188
- .markdown-body h3 > em,
189
- .markdown-body h4 > em,
190
- .markdown-body h5 > em,
191
- .markdown-body h6 > em {
192
- @extend .font-weight-normal;
193
- @extend .text-muted;
194
- font-style: normal;
195
- }
196
-
197
- // Subtle anchors in headings
198
- .markdown-body h2 a[data-id],
199
- .markdown-body h3 a[data-id],
200
- .markdown-body h4 a[data-id],
201
- .markdown-body h5 a[data-id],
202
- .markdown-body h6 a[data-id] {
203
- color: inherit;
204
- text-decoration: none;
205
- }
206
-
207
- // Fix inconsistency in Primer
208
- // https://github.com/primer/primer/pull/563
209
- .markdown-body ol > li:first-child,
210
- .markdown-body ul > li:first-child {
211
- margin-top: .25em;
212
- }
213
-
214
- // Mimic li's margin-top
215
- .markdown-body li > blockquote,
216
- .markdown-body li > div > div.highlight,
217
- .markdown-body li > img,
218
- .markdown-body li > pre {
219
- margin-top: .25em;
220
- }
221
-
222
- // Mimic li's margin-bottom, not p's margin-bottom
223
- .markdown-body li > div > div.highlight {
224
- margin-bottom: 0;
225
- }
226
-
227
- // Mimic h1's bottom border
228
- .markdown-body hr {
229
- background-color: #eaecef;
230
- height: 1px;
231
- margin: 16px 0;
232
- }
233
-
234
- // Mimic p
235
- .markdown-body .embed-responsive {
236
- margin-bottom: 16px;
237
- margin-top: 0;
238
- }
239
-
240
- // Condense TOC
241
- #markdown-toc li + li,
242
- #markdown-toc ol > li:first-child,
243
- #markdown-toc ul > li:first-child {
244
- margin-top: 0;
245
- }
246
-
247
- // On small devices and printers
248
- // https://getbootstrap.com/docs/4.2/layout/overview/#responsive-breakpoints
249
- @media (max-width: 767.98px), print {
250
-
251
- // Root em
252
- html {
253
- font-size: 16px;
254
- }
255
-
256
- // Don't shrink fonts as much
257
- small, .small {
258
- font-size: 90%;
259
- }
260
- }
261
-
262
- // Also on printers
263
- @media print {
264
-
265
- // Hide button above nav
266
- aside button[data-toggle=collapse] {
267
- display: none;
268
- }
269
-
270
- // Only show header
271
- nav.collapse:not(.show), footer {
272
- display: none;
273
- }
274
-
275
- // Display links' URLs
276
- a[href^='http']:after {
277
- content: ' (' attr(href) ')';
278
- word-wrap: break-word;
279
- }
280
- }
281
-
282
- // GitHub syntax highlighter color scheme for Pygments
283
- // https://github.com/PhilipTrauner/pygments-github-css/blob/master/github.css
284
- .highlight .hll { background-color: #ffffcc }
285
- .highlight { background: #f8f8f8; }
286
- .highlight .c { color: #6a737d } /* Comment */
287
- .highlight .err { } /* Error */
288
- .highlight .k { color: #d73a49 } /* Keyword */
289
- .highlight .o { } /* Operator */
290
- .highlight .ch { color: #6a737d } /* Comment.Hashbang */
291
- .highlight .cm { color: #6a737d } /* Comment.Multiline */
292
- .highlight .cp { color: #d73a49 } /* Comment.Preproc */
293
- .highlight .cpf { color: #032f62 } /* Comment.PreprocFile */
294
- .highlight .c1 { color: #6a737d } /* Comment.Single */
295
- .highlight .cs { color: #6a737d } /* Comment.Special */
296
- .highlight .gd { color: #b31d28; background-color: #ffeef0 } /* Generic.Deleted */
297
- .highlight .ge { } /* Generic.Emph */
298
- .highlight .gr { } /* Generic.Error */
299
- .highlight .gh { color: #005cc5 } /* Generic.Heading */
300
- .highlight .gi { color: #22863a; background-color: #f0fff4 } /* Generic.Inserted */
301
- .highlight .go { } /* Generic.Output */
302
- .highlight .gp { } /* Generic.Prompt */
303
- .highlight .gs { font-weight: bold } /* Generic.Strong */
304
- .highlight .gu { color: #6f42c1; font-weight: bold } /* Generic.Subheading */
305
- .highlight .gt { color: #0044DD } /* Generic.Traceback */
306
- .highlight .kc { color: #005cc5 } /* Keyword.Constant */
307
- .highlight .kd { color: #d73a49 } /* Keyword.Declaration */
308
- .highlight .kn { color: #d73a49 } /* Keyword.Namespace */
309
- .highlight .kp { color: #d73a49 } /* Keyword.Pseudo */
310
- .highlight .kr { color: #d73a49 } /* Keyword.Reserved */
311
- .highlight .kt { color: #d73a49 } /* Keyword.Type */
312
- .highlight .m { color: #666666 } /* Literal.Number */
313
- .highlight .s { color: #032f62 } /* Literal.String */
314
- .highlight .na { } /* Name.Attribute */
315
- .highlight .nb { color: #005cc5 } /* Name.Builtin */
316
- .highlight .nc { color: #6f42c1 } /* Name.Class */
317
- .highlight .no { color: #005cc5 } /* Name.Constant */
318
- .highlight .nd { color: #6f42c1 } /* Name.Decorator */
319
- .highlight .ni { color: #005cc5 } /* Name.Entity */
320
- .highlight .ne { color: #005cc5 } /* Name.Exception */
321
- .highlight .nf { color: #6f42c1 } /* Name.Function */
322
- .highlight .nl { color: #005cc5 } /* Name.Label */
323
- .highlight .nn { color: #6f42c1 } /* Name.Namespace */
324
- .highlight .nt { color: #22863a } /* Name.Tag */
325
- .highlight .nv { color: #24292e } /* Name.Variable */
326
- .highlight .ow { color: #d73a49; } /* Operator.Word */
327
- .highlight .w { color: #bbbbbb } /* Text.Whitespace */
328
- .highlight .mb { color: #005cc5 } /* Literal.Number.Bin */
329
- .highlight .mf { color: #005cc5 } /* Literal.Number.Float */
330
- .highlight .mh { color: #005cc5 } /* Literal.Number.Hex */
331
- .highlight .mi { color: #005cc5 } /* Literal.Number.Integer */
332
- .highlight .mo { color: #005cc5 } /* Literal.Number.Oct */
333
- .highlight .sa { color: #d73a49 } /* Literal.String.Affix */
334
- .highlight .sb { color: #032f62 } /* Literal.String.Backtick */
335
- .highlight .sc { color: #032f62 } /* Literal.String.Char */
336
- .highlight .dl { color: #d73a49 } /* Literal.String.Delimiter */
337
- .highlight .sd { color: #032f62 } /* Literal.String.Doc */
338
- .highlight .s2 { color: #032f62 } /* Literal.String.Double */
339
- .highlight .se { color: #032f62 } /* Literal.String.Escape */
340
- .highlight .sh { color: #032f62 } /* Literal.String.Heredoc */
341
- .highlight .si { color: #005cc5 } /* Literal.String.Interpol */
342
- .highlight .sx { color: #032f62 } /* Literal.String.Other */
343
- .highlight .sr { color: #032f62 } /* Literal.String.Regex */
344
- .highlight .s1 { color: #032f62 } /* Literal.String.Single */
345
- .highlight .ss { color: #005cc5 } /* Literal.String.Symbol */
346
- .highlight .bp { color: #005cc5 } /* Name.Builtin.Pseudo */
347
- .highlight .fm { color: #005cc5 } /* Name.Function.Magic */
348
- .highlight .vc { color: #24292e } /* Name.Variable.Class */
349
- .highlight .vg { color: #24292e } /* Name.Variable.Global */
350
- .highlight .vi { color: #24292e } /* Name.Variable.Instance */
351
- .highlight .vm { color: #005cc5 } /* Name.Variable.Magic */
352
- .highlight .il { color: #005cc5 } /* Literal.Number.Integer.Long */