jekyll-theme-amp 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +43 -0
  4. data/_includes/extend/image.liquid +10 -0
  5. data/_includes/image +1 -0
  6. data/_layouts/default.liquid +93 -0
  7. data/_layouts/plugins/compress.liquid +14 -0
  8. data/_sass/_rouge.scss +209 -0
  9. data/_sass/_variables.scss +2 -0
  10. data/_sass/amp.noscript.scss +6 -0
  11. data/_sass/amp.scss +51 -0
  12. data/_sass/custom.scss +16 -0
  13. data/_sass/primer/base/base.scss +86 -0
  14. data/_sass/primer/base/index.scss +6 -0
  15. data/_sass/primer/base/kbd.scss +21 -0
  16. data/_sass/primer/base/normalize.scss +418 -0
  17. data/_sass/primer/base/typography-base.scss +88 -0
  18. data/_sass/primer/markdown/blob-csv.scss +29 -0
  19. data/_sass/primer/markdown/code.scss +69 -0
  20. data/_sass/primer/markdown/headings.scss +72 -0
  21. data/_sass/primer/markdown/images.scss +131 -0
  22. data/_sass/primer/markdown/index.scss +8 -0
  23. data/_sass/primer/markdown/lists.scss +77 -0
  24. data/_sass/primer/markdown/markdown-body.scss +99 -0
  25. data/_sass/primer/markdown/tables.scss +38 -0
  26. data/_sass/primer/support/index.scss +11 -0
  27. data/_sass/primer/support/mixins/buttons.scss +172 -0
  28. data/_sass/primer/support/mixins/layout.scss +58 -0
  29. data/_sass/primer/support/mixins/misc.scss +29 -0
  30. data/_sass/primer/support/mixins/typography.scss +84 -0
  31. data/_sass/primer/support/variables/color-system.scss +243 -0
  32. data/_sass/primer/support/variables/colors.scss +55 -0
  33. data/_sass/primer/support/variables/layout.scss +143 -0
  34. data/_sass/primer/support/variables/misc.scss +42 -0
  35. data/_sass/primer/support/variables/typography.scss +42 -0
  36. data/assets/404.liquid +6 -0
  37. data/assets/favicon.liquid +9 -0
  38. data/assets/robots.liquid +9 -0
  39. data/assets/schema.600x60.png +0 -0
  40. data/assets/sitemap.liquid +17 -0
  41. metadata +96 -0
@@ -0,0 +1,88 @@
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 { @include h1; }
15
+ h2 { @include h2; }
16
+ h3 { @include h3; }
17
+ h4 { @include h4; }
18
+ h5 { @include h5; }
19
+ h6 { @include h6; }
20
+
21
+ // Body text
22
+ // --------------------------------------------------
23
+
24
+ p {
25
+ margin-top: 0;
26
+ // stylelint-disable-next-line primer/spacing
27
+ margin-bottom: 10px;
28
+ }
29
+
30
+ small {
31
+ // stylelint-disable-next-line primer/typography
32
+ font-size: 90%;
33
+ }
34
+
35
+ blockquote {
36
+ margin: 0;
37
+ }
38
+
39
+ // Lists
40
+ // --------------------------------------------------
41
+
42
+ ul,
43
+ ol {
44
+ padding-left: 0;
45
+ margin-top: 0;
46
+ margin-bottom: 0;
47
+ }
48
+
49
+ ol ol,
50
+ ul ol {
51
+ list-style-type: lower-roman;
52
+ }
53
+
54
+ ul ul ol,
55
+ ul ol ol,
56
+ ol ul ol,
57
+ ol ol ol {
58
+ list-style-type: lower-alpha;
59
+ }
60
+
61
+ dd {
62
+ margin-left: 0;
63
+ }
64
+
65
+ // Code
66
+ // --------------------------------------------------
67
+
68
+ tt,
69
+ code {
70
+ font-family: $mono-font;
71
+ font-size: $font-size-small;
72
+ }
73
+
74
+ pre {
75
+ margin-top: 0;
76
+ margin-bottom: 0;
77
+ font-family: $mono-font;
78
+ font-size: $font-size-small;
79
+ }
80
+
81
+ // Octicons
82
+ // --------------------------------------------------
83
+
84
+ // Move this over here as a temporary override to the octicons source repo
85
+ // instead of updating that upstream.
86
+ .octicon {
87
+ vertical-align: text-bottom;
88
+ }
@@ -0,0 +1,29 @@
1
+ // stylelint-disable selector-max-type
2
+ .markdown-body .csv-data {
3
+ td,
4
+ th {
5
+ // stylelint-disable-next-line primer/spacing
6
+ padding: 5px;
7
+ overflow: hidden;
8
+ font-size: $font-size-small;
9
+ line-height: $lh-condensed-ultra;
10
+ text-align: left;
11
+ white-space: nowrap;
12
+ }
13
+
14
+ .blob-num {
15
+ // stylelint-disable-next-line primer/spacing
16
+ padding: 10px $spacer-2 9px;
17
+ text-align: right;
18
+ background: $bg-white;
19
+ border: 0;
20
+ }
21
+
22
+ tr { border-top: 0; }
23
+
24
+ th {
25
+ font-weight: $font-weight-bold;
26
+ background: $bg-gray;
27
+ border-top: 0;
28
+ }
29
+ }
@@ -0,0 +1,69 @@
1
+ // stylelint-disable selector-max-type
2
+ .markdown-body {
3
+ // Inline code snippets
4
+ code,
5
+ tt {
6
+ // stylelint-disable-next-line primer/spacing
7
+ padding: 0.2em 0.4em;
8
+ margin: 0;
9
+ // stylelint-disable-next-line primer/typography
10
+ font-size: 85%;
11
+ // stylelint-disable-next-line primer/colors
12
+ background-color: rgba($black, 0.05);
13
+ border-radius: $border-radius;
14
+
15
+ br { display: none; }
16
+ }
17
+
18
+ del code { text-decoration: inherit; }
19
+
20
+ pre {
21
+ word-wrap: normal;
22
+
23
+ // Code tags within code blocks (<pre>s)
24
+ > code {
25
+ padding: 0;
26
+ margin: 0;
27
+ // stylelint-disable-next-line primer/typography
28
+ font-size: 100%;
29
+ word-break: normal;
30
+ white-space: pre;
31
+ background: transparent;
32
+ border: 0;
33
+ }
34
+ }
35
+
36
+ .highlight {
37
+ margin-bottom: $spacer-3;
38
+
39
+ pre {
40
+ margin-bottom: 0;
41
+ word-break: normal;
42
+ }
43
+ }
44
+
45
+ .highlight pre,
46
+ pre {
47
+ padding: $spacer-3;
48
+ overflow: auto;
49
+ // stylelint-disable-next-line primer/typography
50
+ font-size: 85%;
51
+ // stylelint-disable-next-line primer/typography
52
+ line-height: 1.45;
53
+ background-color: $bg-gray;
54
+ border-radius: $border-radius;
55
+ }
56
+
57
+ pre code,
58
+ pre tt {
59
+ display: inline;
60
+ max-width: auto;
61
+ padding: 0;
62
+ margin: 0;
63
+ overflow: visible;
64
+ line-height: inherit;
65
+ word-wrap: normal;
66
+ background-color: transparent;
67
+ border: 0;
68
+ }
69
+ }
@@ -0,0 +1,72 @@
1
+ // Needs refactoring
2
+ // stylelint-disable selector-max-compound-selectors, selector-max-specificity
3
+ // stylelint-disable selector-max-type
4
+ .markdown-body {
5
+ // Headings
6
+ h1,
7
+ h2,
8
+ h3,
9
+ h4,
10
+ h5,
11
+ h6 {
12
+ margin-top: $spacer-4;
13
+ margin-bottom: $spacer-3;
14
+ font-weight: $font-weight-bold;
15
+ line-height: $lh-condensed;
16
+
17
+ .octicon-link {
18
+ color: $text-black;
19
+ vertical-align: middle;
20
+ visibility: hidden;
21
+ }
22
+
23
+ &:hover .anchor {
24
+ text-decoration: none;
25
+
26
+ .octicon-link {
27
+ visibility: visible;
28
+ }
29
+ }
30
+
31
+ tt,
32
+ code {
33
+ font-size: inherit;
34
+ }
35
+ }
36
+
37
+ h1 {
38
+ // stylelint-disable-next-line primer/spacing
39
+ padding-bottom: 0.3em;
40
+ // stylelint-disable-next-line primer/typography
41
+ font-size: 2em;
42
+ border-bottom: $border-width $border-style $border-gray-light;
43
+ }
44
+
45
+ h2 {
46
+ // stylelint-disable-next-line primer/spacing
47
+ padding-bottom: 0.3em;
48
+ // stylelint-disable-next-line primer/typography
49
+ font-size: 1.5em;
50
+ border-bottom: $border-width $border-style $border-gray-light;
51
+ }
52
+
53
+ h3 {
54
+ // stylelint-disable-next-line primer/typography
55
+ font-size: 1.25em;
56
+ }
57
+
58
+ h4 {
59
+ font-size: 1em;
60
+ }
61
+
62
+ h5 {
63
+ // stylelint-disable-next-line primer/typography
64
+ font-size: 0.875em;
65
+ }
66
+
67
+ h6 {
68
+ // stylelint-disable-next-line primer/typography
69
+ font-size: 0.85em;
70
+ color: $text-gray-light;
71
+ }
72
+ }
@@ -0,0 +1,131 @@
1
+ // Need to target base styles
2
+ // stylelint-disable selector-max-compound-selectors, selector-no-qualifying-type
3
+ // stylelint-disable selector-max-type
4
+ .markdown-body {
5
+ // Images & Stuff
6
+ img {
7
+ max-width: 100%;
8
+ // because we put padding on the images to hide header lines, and some people
9
+ // specify the width of their images in their markdown.
10
+ box-sizing: content-box;
11
+ background-color: $bg-white;
12
+
13
+ &[align=right] {
14
+ // stylelint-disable-next-line primer/spacing
15
+ padding-left: 20px;
16
+ }
17
+
18
+ &[align=left] {
19
+ // stylelint-disable-next-line primer/spacing
20
+ padding-right: 20px;
21
+ }
22
+ }
23
+
24
+ .emoji {
25
+ max-width: none;
26
+ vertical-align: text-top;
27
+ // Override `<img>` styles so Emjois don't clash with zebra striping in our tables
28
+ background-color: transparent;
29
+ }
30
+
31
+ // Gollum Image Tags
32
+
33
+ // Framed
34
+ span.frame {
35
+ display: block;
36
+ overflow: hidden;
37
+
38
+ > span {
39
+ display: block;
40
+ float: left;
41
+ width: auto;
42
+ // stylelint-disable-next-line primer/spacing
43
+ padding: 7px;
44
+ // stylelint-disable-next-line primer/spacing
45
+ margin: 13px 0 0;
46
+ overflow: hidden;
47
+ // stylelint-disable-next-line primer/borders
48
+ border: $border-width $border-style lighten($gray-300, 5%);
49
+ }
50
+
51
+ span img {
52
+ display: block;
53
+ float: left;
54
+ }
55
+
56
+ span span {
57
+ display: block;
58
+ // stylelint-disable-next-line primer/spacing
59
+ padding: 5px 0 0;
60
+ clear: both;
61
+ color: $text-gray-dark;
62
+ }
63
+ }
64
+
65
+ span.align-center {
66
+ display: block;
67
+ overflow: hidden;
68
+ clear: both;
69
+
70
+ > span {
71
+ display: block;
72
+ // stylelint-disable-next-line primer/spacing
73
+ margin: 13px auto 0;
74
+ overflow: hidden;
75
+ text-align: center;
76
+ }
77
+
78
+ span img {
79
+ margin: 0 auto;
80
+ text-align: center;
81
+ }
82
+ }
83
+
84
+ span.align-right {
85
+ display: block;
86
+ overflow: hidden;
87
+ clear: both;
88
+
89
+ > span {
90
+ display: block;
91
+ // stylelint-disable-next-line primer/spacing
92
+ margin: 13px 0 0;
93
+ overflow: hidden;
94
+ text-align: right;
95
+ }
96
+
97
+ span img {
98
+ margin: 0;
99
+ text-align: right;
100
+ }
101
+ }
102
+
103
+ span.float-left {
104
+ display: block;
105
+ float: left;
106
+ // stylelint-disable-next-line primer/spacing
107
+ margin-right: 13px;
108
+ overflow: hidden;
109
+
110
+ span {
111
+ // stylelint-disable-next-line primer/spacing
112
+ margin: 13px 0 0;
113
+ }
114
+ }
115
+
116
+ span.float-right {
117
+ display: block;
118
+ float: right;
119
+ // stylelint-disable-next-line primer/spacing
120
+ margin-left: 13px;
121
+ overflow: hidden;
122
+
123
+ > span {
124
+ display: block;
125
+ // stylelint-disable-next-line primer/spacing
126
+ margin: 13px auto 0;
127
+ overflow: hidden;
128
+ text-align: right;
129
+ }
130
+ }
131
+ }
@@ -0,0 +1,8 @@
1
+ @import "../support/index.scss";
2
+ @import "./markdown-body.scss";
3
+ @import "./headings.scss";
4
+ @import "./lists.scss";
5
+ @import "./tables.scss";
6
+ @import "./images.scss";
7
+ @import "./code.scss";
8
+ @import "./blob-csv.scss";
@@ -0,0 +1,77 @@
1
+ // Base styles
2
+ // stylelint-disable selector-no-qualifying-type
3
+ // stylelint-disable selector-max-type
4
+ .markdown-body {
5
+
6
+ // Lists, Blockquotes & Such
7
+ ul,
8
+ ol {
9
+ // stylelint-disable-next-line primer/spacing
10
+ padding-left: 2em;
11
+
12
+ &.no-list {
13
+ padding: 0;
14
+ list-style-type: none;
15
+ }
16
+ }
17
+
18
+ // Did someone complain about list spacing? Encourage them
19
+ // to create the spacing with their markdown formatting.
20
+ // List behavior should be controled by the markup, not the css.
21
+ //
22
+ // For lists with padding between items, use blank
23
+ // lines between items. This will generate paragraphs with
24
+ // padding to space things out.
25
+ //
26
+ // - item
27
+ //
28
+ // - item
29
+ //
30
+ // - item
31
+ //
32
+ // For list without padding, don't use blank lines.
33
+ //
34
+ // - item
35
+ // - item
36
+ // - item
37
+ //
38
+ // Modifying the css to emulate these behaviors merely brakes
39
+ // one case in the process of solving another. Don't change
40
+ // this unless it's really really a bug.
41
+ ul ul,
42
+ ul ol,
43
+ ol ol,
44
+ ol ul {
45
+ margin-top: 0;
46
+ margin-bottom: 0;
47
+ }
48
+
49
+ li {
50
+ word-wrap: break-all;
51
+ }
52
+
53
+ li > p {
54
+ margin-top: $spacer-3;
55
+ }
56
+
57
+ li + li {
58
+ margin-top: $em-spacer-3;
59
+ }
60
+
61
+ dl {
62
+ padding: 0;
63
+
64
+ dt {
65
+ padding: 0;
66
+ margin-top: $spacer-3;
67
+ font-size: 1em;
68
+ font-style: italic;
69
+ font-weight: $font-weight-bold;
70
+ }
71
+
72
+ dd {
73
+ padding: 0 $spacer-3;
74
+ margin-bottom: $spacer-3;
75
+ }
76
+ }
77
+ }