taletype 0.1.0
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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +129 -0
- data/_includes/analytics.html +6 -0
- data/_includes/disqus_comments.html +11 -0
- data/_includes/footer.html +5 -0
- data/_includes/gitalk_comments.html +19 -0
- data/_includes/head.html +23 -0
- data/_includes/navigation.html +23 -0
- data/_layouts/default.html +16 -0
- data/_layouts/home.html +31 -0
- data/_layouts/page.html +25 -0
- data/_layouts/post.html +39 -0
- data/_layouts/tag_page.html +16 -0
- data/_sass/tale/_base.scss +66 -0
- data/_sass/tale/_catalogue.scss +39 -0
- data/_sass/tale/_code.scss +46 -0
- data/_sass/tale/_layout.scss +92 -0
- data/_sass/tale/_pagination.scss +44 -0
- data/_sass/tale/_post.scss +98 -0
- data/_sass/tale/_syntax.scss +65 -0
- data/_sass/tale/_variables.scss +29 -0
- data/_sass/tale.scss +12 -0
- data/_sass/type/__all.scss +9 -0
- data/_sass/type/_functions.scss +19 -0
- data/_sass/type/_mixins.scss +34 -0
- data/_sass/type/_mq.scss +287 -0
- data/_sass/type/_variables.scss +61 -0
- data/_sass/vendor/gitalk.css +1250 -0
- data/assets/apple-touch-icon.png +0 -0
- data/assets/favicon-16x16.png +0 -0
- data/assets/favicon-32x32.png +0 -0
- data/assets/js/disqusLoader.js +10 -0
- data/assets/js/gitalk.min.js +35 -0
- data/assets/main.scss +5 -0
- metadata +161 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
.post {
|
2
|
+
padding: 3rem 0;
|
3
|
+
font-size: 18px;
|
4
|
+
line-height: 20px;
|
5
|
+
// @media (min-width: 600px) {
|
6
|
+
// font-size: 19px;
|
7
|
+
// }
|
8
|
+
|
9
|
+
&-info {
|
10
|
+
color: $default-tint;
|
11
|
+
font-family: $serif-secondary;
|
12
|
+
letter-spacing: 0.5px;
|
13
|
+
text-align: center;
|
14
|
+
margin-bottom: 25px;
|
15
|
+
|
16
|
+
span {
|
17
|
+
font-style: italic;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
&-title {
|
22
|
+
color: $default-shade;
|
23
|
+
font-family: $sans-serif;
|
24
|
+
font-size: 2rem;
|
25
|
+
margin: 1rem 0;
|
26
|
+
text-align: center;
|
27
|
+
}
|
28
|
+
|
29
|
+
&-line {
|
30
|
+
border-top: 0.4rem solid $default-shade;
|
31
|
+
display: block;
|
32
|
+
margin: 0 auto 3rem;
|
33
|
+
width: 5rem;
|
34
|
+
}
|
35
|
+
|
36
|
+
p {
|
37
|
+
margin: 0 0 1rem;
|
38
|
+
text-align: justify;
|
39
|
+
}
|
40
|
+
|
41
|
+
a:hover {
|
42
|
+
text-decoration: underline;
|
43
|
+
}
|
44
|
+
|
45
|
+
img {
|
46
|
+
margin: 0 auto 0.5rem;
|
47
|
+
}
|
48
|
+
|
49
|
+
img + em {
|
50
|
+
color: $default-tint;
|
51
|
+
display: block;
|
52
|
+
font-family: $sans-serif;
|
53
|
+
font-size: 0.9rem;
|
54
|
+
font-style: normal;
|
55
|
+
text-align: center;
|
56
|
+
}
|
57
|
+
|
58
|
+
// CSS for making emoji inline
|
59
|
+
img.emoji {
|
60
|
+
display: inline-block;
|
61
|
+
left: 0;
|
62
|
+
transform: none;
|
63
|
+
width: 1rem;
|
64
|
+
height: 1rem;
|
65
|
+
vertical-align: text-top;
|
66
|
+
padding: 0;
|
67
|
+
margin: 0;
|
68
|
+
}
|
69
|
+
|
70
|
+
.footnotes {
|
71
|
+
margin-top: 30px;
|
72
|
+
font-size: 14px;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
.tags {
|
77
|
+
a {
|
78
|
+
display: inline-block;
|
79
|
+
padding: quarter($base-spacing-unit) $base-spacing-unit;
|
80
|
+
margin: 0 $base-spacing-unit quarter($base-spacing-unit) 0;
|
81
|
+
|
82
|
+
font-size: $font-size-small;
|
83
|
+
font-family: $font-base;
|
84
|
+
line-height: $line-height-medium;
|
85
|
+
|
86
|
+
background-color: $bg-color-gray;
|
87
|
+
transition: $global-transition;
|
88
|
+
|
89
|
+
@include attention() {
|
90
|
+
text-decoration: none;
|
91
|
+
background-color: $bg-color-gray;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
@include mq($until: tablet) {
|
96
|
+
margin-bottom: $line-height-medium - half(quarter($line-height-medium));
|
97
|
+
}
|
98
|
+
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
.highlight .hll { background-color: #ffc; }
|
2
|
+
.highlight .c { color: #999; } /* Comment */
|
3
|
+
.highlight .err { color: #a00; background-color: #faa } /* Error */
|
4
|
+
.highlight .k { color: #069; } /* Keyword */
|
5
|
+
.highlight .o { color: #555 } /* Operator */
|
6
|
+
.highlight .cm { color: #09f; font-style: italic } /* Comment.Multiline */
|
7
|
+
.highlight .cp { color: #099 } /* Comment.Preproc */
|
8
|
+
.highlight .c1 { color: #999; } /* Comment.Single */
|
9
|
+
.highlight .cs { color: #999; } /* Comment.Special */
|
10
|
+
.highlight .gd { background-color: #fcc; border: 1px solid #c00 } /* Generic.Deleted */
|
11
|
+
.highlight .ge { font-style: italic } /* Generic.Emph */
|
12
|
+
.highlight .gr { color: #f00 } /* Generic.Error */
|
13
|
+
.highlight .gh { color: #030; } /* Generic.Heading */
|
14
|
+
.highlight .gi { background-color: #cfc; border: 1px solid #0c0 } /* Generic.Inserted */
|
15
|
+
.highlight .go { color: #aaa } /* Generic.Output */
|
16
|
+
.highlight .gp { color: #009; } /* Generic.Prompt */
|
17
|
+
.highlight .gs { } /* Generic.Strong */
|
18
|
+
.highlight .gu { color: #030; } /* Generic.Subheading */
|
19
|
+
.highlight .gt { color: #9c6 } /* Generic.Traceback */
|
20
|
+
.highlight .kc { color: #069; } /* Keyword.Constant */
|
21
|
+
.highlight .kd { color: #069; } /* Keyword.Declaration */
|
22
|
+
.highlight .kn { color: #069; } /* Keyword.Namespace */
|
23
|
+
.highlight .kp { color: #069 } /* Keyword.Pseudo */
|
24
|
+
.highlight .kr { color: #069; } /* Keyword.Reserved */
|
25
|
+
.highlight .kt { color: #078; } /* Keyword.Type */
|
26
|
+
.highlight .m { color: #f60 } /* Literal.Number */
|
27
|
+
.highlight .s { color: #d44950 } /* Literal.String */
|
28
|
+
.highlight .na { color: #4f9fcf } /* Name.Attribute */
|
29
|
+
.highlight .nb { color: #366 } /* Name.Builtin */
|
30
|
+
.highlight .nc { color: #0a8; } /* Name.Class */
|
31
|
+
.highlight .no { color: #360 } /* Name.Constant */
|
32
|
+
.highlight .nd { color: #99f } /* Name.Decorator */
|
33
|
+
.highlight .ni { color: #999; } /* Name.Entity */
|
34
|
+
.highlight .ne { color: #c00; } /* Name.Exception */
|
35
|
+
.highlight .nf { color: #c0f } /* Name.Function */
|
36
|
+
.highlight .nl { color: #99f } /* Name.Label */
|
37
|
+
.highlight .nn { color: #0cf; } /* Name.Namespace */
|
38
|
+
.highlight .nt { color: #2f6f9f; } /* Name.Tag */
|
39
|
+
.highlight .nv { color: #033 } /* Name.Variable */
|
40
|
+
.highlight .ow { color: #000; } /* Operator.Word */
|
41
|
+
.highlight .w { color: #bbb } /* Text.Whitespace */
|
42
|
+
.highlight .mf { color: #f60 } /* Literal.Number.Float */
|
43
|
+
.highlight .mh { color: #f60 } /* Literal.Number.Hex */
|
44
|
+
.highlight .mi { color: #f60 } /* Literal.Number.Integer */
|
45
|
+
.highlight .mo { color: #f60 } /* Literal.Number.Oct */
|
46
|
+
.highlight .sb { color: #c30 } /* Literal.String.Backtick */
|
47
|
+
.highlight .sc { color: #c30 } /* Literal.String.Char */
|
48
|
+
.highlight .sd { color: #c30; font-style: italic } /* Literal.String.Doc */
|
49
|
+
.highlight .s2 { color: #c30 } /* Literal.String.Double */
|
50
|
+
.highlight .se { color: #c30; } /* Literal.String.Escape */
|
51
|
+
.highlight .sh { color: #c30 } /* Literal.String.Heredoc */
|
52
|
+
.highlight .si { color: #a00 } /* Literal.String.Interpol */
|
53
|
+
.highlight .sx { color: #c30 } /* Literal.String.Other */
|
54
|
+
.highlight .sr { color: #3aa } /* Literal.String.Regex */
|
55
|
+
.highlight .s1 { color: #c30 } /* Literal.String.Single */
|
56
|
+
.highlight .ss { color: #fc3 } /* Literal.String.Symbol */
|
57
|
+
.highlight .bp { color: #366 } /* Name.Builtin.Pseudo */
|
58
|
+
.highlight .vc { color: #033 } /* Name.Variable.Class */
|
59
|
+
.highlight .vg { color: #033 } /* Name.Variable.Global */
|
60
|
+
.highlight .vi { color: #033 } /* Name.Variable.Instance */
|
61
|
+
.highlight .il { color: #f60 } /* Literal.Number.Integer.Long */
|
62
|
+
|
63
|
+
.css .o,
|
64
|
+
.css .o + .nt,
|
65
|
+
.css .nt + .nt { color: #999; }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
// Colors
|
2
|
+
$default-color: #555;
|
3
|
+
$default-shade: #353535;
|
4
|
+
$default-tint: #aaa;
|
5
|
+
$grey-1: #979797;
|
6
|
+
$grey-2: #e5e5e5;
|
7
|
+
$grey-3: #f9f9f9;
|
8
|
+
$white: #fff;
|
9
|
+
$blue: #4a9ae1;
|
10
|
+
$shadow-color: rgba(0, 0, 0, .2);
|
11
|
+
$code-color: #bf616a;
|
12
|
+
|
13
|
+
// Fonts
|
14
|
+
$serif-primary: '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Helvetica', 'Microsoft YaHei', 'Times New Roman', Times, serif;
|
15
|
+
$serif-secondary: Palatino, 'Palatino LT STD', 'Palatino Linotype', 'Book Antiqua', 'Georgia', serif;
|
16
|
+
$sans-serif: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
|
17
|
+
$monospaced: Menlo, Monaco, monospace;
|
18
|
+
|
19
|
+
@mixin box-sizing($type: border-box) {
|
20
|
+
-webkit-box-sizing: $type;
|
21
|
+
-moz-box-sizing: $type;
|
22
|
+
box-sizing: $type;
|
23
|
+
}
|
24
|
+
|
25
|
+
@mixin transition($args...) {
|
26
|
+
-webkit-transition: $args;
|
27
|
+
-moz-transition: $args;
|
28
|
+
transition: $args;
|
29
|
+
}
|
data/_sass/tale.scss
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
@import 'type/_all';
|
2
|
+
|
3
|
+
@import 'tale/variables';
|
4
|
+
@import 'tale/base';
|
5
|
+
@import 'tale/code';
|
6
|
+
@import 'tale/post';
|
7
|
+
@import 'tale/syntax';
|
8
|
+
@import 'tale/layout';
|
9
|
+
@import 'tale/pagination';
|
10
|
+
@import 'tale/catalogue';
|
11
|
+
|
12
|
+
@import 'vendor/gitalk';
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// *----------------------------------*\
|
2
|
+
// Tools > Functions
|
3
|
+
// *----------------------------------*/
|
4
|
+
|
5
|
+
@function half($n) {
|
6
|
+
@return round($n / 2);
|
7
|
+
}
|
8
|
+
|
9
|
+
@function quarter($n) {
|
10
|
+
@return round($n / 4);
|
11
|
+
}
|
12
|
+
|
13
|
+
@function double($n) {
|
14
|
+
@return round($n * 2);
|
15
|
+
}
|
16
|
+
|
17
|
+
@function quadruple($n) {
|
18
|
+
@return round($n * 4);
|
19
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// *----------------------------------*\
|
2
|
+
// Tools > Mixins
|
3
|
+
// *----------------------------------*/
|
4
|
+
|
5
|
+
// Apply ‘attention’ styles in one go.
|
6
|
+
// https://goo.gl/LFx8on
|
7
|
+
//
|
8
|
+
// Example use:
|
9
|
+
//
|
10
|
+
// @include attention() {
|
11
|
+
// text-decoration: underline;
|
12
|
+
// }
|
13
|
+
@mixin attention() {
|
14
|
+
&:hover,
|
15
|
+
&:active,
|
16
|
+
&:focus {
|
17
|
+
@content;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
// Mixin to drop micro clearfix into a selector.
|
22
|
+
//
|
23
|
+
// // Example use:
|
24
|
+
//
|
25
|
+
// .class {
|
26
|
+
// @include clearfix();
|
27
|
+
// }
|
28
|
+
@mixin clearfix() {
|
29
|
+
&:after {
|
30
|
+
content: '';
|
31
|
+
display: table;
|
32
|
+
clear: both;
|
33
|
+
}
|
34
|
+
}
|
data/_sass/type/_mq.scss
ADDED
@@ -0,0 +1,287 @@
|
|
1
|
+
@charset "UTF-8"; // Fixes an issue where Ruby locale is not set properly
|
2
|
+
// See https://github.com/sass-mq/sass-mq/pull/10
|
3
|
+
|
4
|
+
/// Base font size on the `<body>` element
|
5
|
+
/// @type Number (unit)
|
6
|
+
$mq-base-font-size: 16px !default;
|
7
|
+
|
8
|
+
/// Responsive mode
|
9
|
+
///
|
10
|
+
/// Set to `false` to enable support for browsers that do not support @media queries,
|
11
|
+
/// (IE <= 8, Firefox <= 3, Opera <= 9)
|
12
|
+
///
|
13
|
+
/// You could create a stylesheet served exclusively to older browsers,
|
14
|
+
/// where @media queries are rasterized
|
15
|
+
///
|
16
|
+
/// @example scss
|
17
|
+
/// // old-ie.scss
|
18
|
+
/// $mq-responsive: false;
|
19
|
+
/// @import 'main'; // @media queries in this file will be rasterized up to $mq-static-breakpoint
|
20
|
+
/// // larger breakpoints will be ignored
|
21
|
+
///
|
22
|
+
/// @type Boolean
|
23
|
+
/// @link https://github.com/sass-mq/sass-mq#responsive-mode-off Disabled responsive mode documentation
|
24
|
+
$mq-responsive: true !default;
|
25
|
+
|
26
|
+
/// Breakpoint list
|
27
|
+
///
|
28
|
+
/// Name your breakpoints in a way that creates a ubiquitous language
|
29
|
+
/// across team members. It will improve communication between
|
30
|
+
/// stakeholders, designers, developers, and testers.
|
31
|
+
///
|
32
|
+
/// @type Map
|
33
|
+
/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint Full documentation and examples
|
34
|
+
$mq-breakpoints: (
|
35
|
+
mobile: 320px,
|
36
|
+
tablet: 740px,
|
37
|
+
desktop: 980px,
|
38
|
+
wide: 1300px
|
39
|
+
) !default;
|
40
|
+
|
41
|
+
/// Static breakpoint (for fixed-width layouts)
|
42
|
+
///
|
43
|
+
/// Define the breakpoint from $mq-breakpoints that should
|
44
|
+
/// be used as the target width for the fixed-width layout
|
45
|
+
/// (i.e. when $mq-responsive is set to 'false') in a old-ie.scss
|
46
|
+
///
|
47
|
+
/// @example scss
|
48
|
+
/// // tablet-only.scss
|
49
|
+
/// //
|
50
|
+
/// // Ignore all styles above tablet breakpoint,
|
51
|
+
/// // and fix the styles (e.g. layout) at tablet width
|
52
|
+
/// $mq-responsive: false;
|
53
|
+
/// $mq-static-breakpoint: tablet;
|
54
|
+
/// @import 'main'; // @media queries in this file will be rasterized up to tablet
|
55
|
+
/// // larger breakpoints will be ignored
|
56
|
+
///
|
57
|
+
/// @type String
|
58
|
+
/// @link https://github.com/sass-mq/sass-mq#adding-custom-breakpoints Full documentation and examples
|
59
|
+
$mq-static-breakpoint: desktop !default;
|
60
|
+
|
61
|
+
/// Show breakpoints in the top right corner
|
62
|
+
///
|
63
|
+
/// If you want to display the currently active breakpoint in the top
|
64
|
+
/// right corner of your site during development, add the breakpoints
|
65
|
+
/// to this list, ordered by width, e.g. (mobile, tablet, desktop).
|
66
|
+
///
|
67
|
+
/// @type map
|
68
|
+
$mq-show-breakpoints: () !default;
|
69
|
+
|
70
|
+
/// Customize the media type (e.g. `@media screen` or `@media print`)
|
71
|
+
/// By default sass-mq uses an "all" media type (`@media all and …`)
|
72
|
+
///
|
73
|
+
/// @type String
|
74
|
+
/// @link https://github.com/sass-mq/sass-mq#changing-media-type Full documentation and examples
|
75
|
+
$mq-media-type: all !default;
|
76
|
+
|
77
|
+
/// Convert pixels to ems
|
78
|
+
///
|
79
|
+
/// @param {Number} $px - value to convert
|
80
|
+
/// @param {Number} $base-font-size ($mq-base-font-size) - `<body>` font size
|
81
|
+
///
|
82
|
+
/// @example scss
|
83
|
+
/// $font-size-in-ems: mq-px2em(16px);
|
84
|
+
/// p { font-size: mq-px2em(16px); }
|
85
|
+
///
|
86
|
+
/// @requires $mq-base-font-size
|
87
|
+
/// @returns {Number}
|
88
|
+
@function mq-px2em($px, $base-font-size: $mq-base-font-size) {
|
89
|
+
@if unitless($px) {
|
90
|
+
@warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels.";
|
91
|
+
@return mq-px2em($px * 1px, $base-font-size);
|
92
|
+
} @else if unit($px) == em {
|
93
|
+
@return $px;
|
94
|
+
}
|
95
|
+
@return ($px / $base-font-size) * 1em;
|
96
|
+
}
|
97
|
+
|
98
|
+
/// Get a breakpoint's width
|
99
|
+
///
|
100
|
+
/// @param {String} $name - Name of the breakpoint. One of $mq-breakpoints
|
101
|
+
///
|
102
|
+
/// @example scss
|
103
|
+
/// $tablet-width: mq-get-breakpoint-width(tablet);
|
104
|
+
/// @media (min-width: mq-get-breakpoint-width(desktop)) {}
|
105
|
+
///
|
106
|
+
/// @requires {Variable} $mq-breakpoints
|
107
|
+
///
|
108
|
+
/// @returns {Number} Value in pixels
|
109
|
+
@function mq-get-breakpoint-width($name, $breakpoints: $mq-breakpoints) {
|
110
|
+
@if map-has-key($breakpoints, $name) {
|
111
|
+
@return map-get($breakpoints, $name);
|
112
|
+
} @else {
|
113
|
+
@warn "Breakpoint #{$name} wasn't found in $breakpoints.";
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
/// Media Query mixin
|
118
|
+
///
|
119
|
+
/// @param {String | Boolean} $from (false) - One of $mq-breakpoints
|
120
|
+
/// @param {String | Boolean} $until (false) - One of $mq-breakpoints
|
121
|
+
/// @param {String | Boolean} $and (false) - Additional media query parameters
|
122
|
+
/// @param {String} $media-type ($mq-media-type) - Media type: screen, print…
|
123
|
+
///
|
124
|
+
/// @ignore Undocumented API, for advanced use only:
|
125
|
+
/// @ignore @param {Map} $breakpoints ($mq-breakpoints)
|
126
|
+
/// @ignore @param {String} $static-breakpoint ($mq-static-breakpoint)
|
127
|
+
///
|
128
|
+
/// @content styling rules, wrapped into a @media query when $responsive is true
|
129
|
+
///
|
130
|
+
/// @requires {Variable} $mq-media-type
|
131
|
+
/// @requires {Variable} $mq-breakpoints
|
132
|
+
/// @requires {Variable} $mq-static-breakpoint
|
133
|
+
/// @requires {function} mq-px2em
|
134
|
+
/// @requires {function} mq-get-breakpoint-width
|
135
|
+
///
|
136
|
+
/// @link https://github.com/sass-mq/sass-mq#responsive-mode-on-default Full documentation and examples
|
137
|
+
///
|
138
|
+
/// @example scss
|
139
|
+
/// .element {
|
140
|
+
/// @include mq($from: mobile) {
|
141
|
+
/// color: red;
|
142
|
+
/// }
|
143
|
+
/// @include mq($until: tablet) {
|
144
|
+
/// color: blue;
|
145
|
+
/// }
|
146
|
+
/// @include mq(mobile, tablet) {
|
147
|
+
/// color: green;
|
148
|
+
/// }
|
149
|
+
/// @include mq($from: tablet, $and: '(orientation: landscape)') {
|
150
|
+
/// color: teal;
|
151
|
+
/// }
|
152
|
+
/// @include mq(950px) {
|
153
|
+
/// color: hotpink;
|
154
|
+
/// }
|
155
|
+
/// @include mq(tablet, $media-type: screen) {
|
156
|
+
/// color: hotpink;
|
157
|
+
/// }
|
158
|
+
/// // Advanced use:
|
159
|
+
/// $my-breakpoints: (L: 900px, XL: 1200px);
|
160
|
+
/// @include mq(L, $breakpoints: $my-breakpoints, $static-breakpoint: L) {
|
161
|
+
/// color: hotpink;
|
162
|
+
/// }
|
163
|
+
/// }
|
164
|
+
@mixin mq(
|
165
|
+
$from: false,
|
166
|
+
$until: false,
|
167
|
+
$and: false,
|
168
|
+
$media-type: $mq-media-type,
|
169
|
+
$breakpoints: $mq-breakpoints,
|
170
|
+
$responsive: $mq-responsive,
|
171
|
+
$static-breakpoint: $mq-static-breakpoint
|
172
|
+
) {
|
173
|
+
$min-width: 0;
|
174
|
+
$max-width: 0;
|
175
|
+
$media-query: '';
|
176
|
+
|
177
|
+
// From: this breakpoint (inclusive)
|
178
|
+
@if $from {
|
179
|
+
@if type-of($from) == number {
|
180
|
+
$min-width: mq-px2em($from);
|
181
|
+
} @else {
|
182
|
+
$min-width: mq-px2em(mq-get-breakpoint-width($from, $breakpoints));
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
// Until: that breakpoint (exclusive)
|
187
|
+
@if $until {
|
188
|
+
@if type-of($until) == number {
|
189
|
+
$max-width: mq-px2em($until);
|
190
|
+
} @else {
|
191
|
+
$max-width: mq-px2em(mq-get-breakpoint-width($until, $breakpoints)) - .01em;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
// Responsive support is disabled, rasterize the output outside @media blocks
|
196
|
+
// The browser will rely on the cascade itself.
|
197
|
+
@if $responsive == false {
|
198
|
+
$static-breakpoint-width: mq-get-breakpoint-width($static-breakpoint, $breakpoints);
|
199
|
+
$target-width: mq-px2em($static-breakpoint-width);
|
200
|
+
|
201
|
+
// Output only rules that start at or span our target width
|
202
|
+
@if (
|
203
|
+
$and == false
|
204
|
+
and $min-width <= $target-width
|
205
|
+
and (
|
206
|
+
$until == false or $max-width >= $target-width
|
207
|
+
)
|
208
|
+
) {
|
209
|
+
@content;
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
// Responsive support is enabled, output rules inside @media queries
|
214
|
+
@else {
|
215
|
+
@if $min-width != 0 { $media-query: '#{$media-query} and (min-width: #{$min-width})'; }
|
216
|
+
@if $max-width != 0 { $media-query: '#{$media-query} and (max-width: #{$max-width})'; }
|
217
|
+
@if $and { $media-query: '#{$media-query} and #{$and}'; }
|
218
|
+
|
219
|
+
// Remove unnecessary media query prefix 'all and '
|
220
|
+
@if ($media-type == 'all' and $media-query != '') {
|
221
|
+
$media-type: '';
|
222
|
+
$media-query: str-slice(unquote($media-query), 6);
|
223
|
+
}
|
224
|
+
|
225
|
+
@media #{$media-type + $media-query} {
|
226
|
+
@content;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
}
|
230
|
+
|
231
|
+
/// Add a breakpoint
|
232
|
+
///
|
233
|
+
/// @param {String} $name - Name of the breakpoint
|
234
|
+
/// @param {Number} $width - Width of the breakpoint
|
235
|
+
///
|
236
|
+
/// @requires {Variable} $mq-breakpoints
|
237
|
+
///
|
238
|
+
/// @example scss
|
239
|
+
/// @include mq-add-breakpoint(tvscreen, 1920px);
|
240
|
+
/// @include mq(tvscreen) {}
|
241
|
+
@mixin mq-add-breakpoint($name, $width) {
|
242
|
+
$new-breakpoint: ($name: $width);
|
243
|
+
$mq-breakpoints: map-merge($mq-breakpoints, $new-breakpoint) !global;
|
244
|
+
}
|
245
|
+
|
246
|
+
/// Show the active breakpoint in the top right corner of the viewport
|
247
|
+
/// @link https://github.com/sass-mq/sass-mq#seeing-the-currently-active-breakpoint
|
248
|
+
///
|
249
|
+
/// @param {List} $show-breakpoints ($mq-show-breakpoints) - List of breakpoints to show in the top right corner
|
250
|
+
/// @param {Map} $breakpoints ($mq-breakpoints) - Breakpoint names and sizes
|
251
|
+
///
|
252
|
+
/// @requires {Variable} $mq-breakpoints
|
253
|
+
/// @requires {Variable} $mq-show-breakpoints
|
254
|
+
///
|
255
|
+
/// @example scss
|
256
|
+
/// // Show breakpoints using global settings
|
257
|
+
/// @include mq-show-breakpoints;
|
258
|
+
///
|
259
|
+
/// // Show breakpoints using custom settings
|
260
|
+
/// @include mq-show-breakpoints((L, XL), (S: 300px, L: 800px, XL: 1200px));
|
261
|
+
@mixin mq-show-breakpoints($show-breakpoints: $mq-show-breakpoints, $breakpoints: $mq-breakpoints) {
|
262
|
+
body:before {
|
263
|
+
background-color: #FCF8E3;
|
264
|
+
border-bottom: 1px solid #FBEED5;
|
265
|
+
border-left: 1px solid #FBEED5;
|
266
|
+
color: #C09853;
|
267
|
+
font: small-caption;
|
268
|
+
padding: 3px 6px;
|
269
|
+
pointer-events: none;
|
270
|
+
position: fixed;
|
271
|
+
right: 0;
|
272
|
+
top: 0;
|
273
|
+
z-index: 100;
|
274
|
+
|
275
|
+
// Loop through the breakpoints that should be shown
|
276
|
+
@each $show-breakpoint in $show-breakpoints {
|
277
|
+
$width: mq-get-breakpoint-width($show-breakpoint, $breakpoints);
|
278
|
+
@include mq($show-breakpoint, $breakpoints: $breakpoints) {
|
279
|
+
content: "#{$show-breakpoint} ≥ #{$width} (#{mq-px2em($width)})";
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}
|
283
|
+
}
|
284
|
+
|
285
|
+
@if length($mq-show-breakpoints) > 0 {
|
286
|
+
@include mq-show-breakpoints;
|
287
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
// *----------------------------------*\
|
2
|
+
// imported from type
|
3
|
+
// *----------------------------------*/
|
4
|
+
|
5
|
+
$mq-breakpoints: (
|
6
|
+
mobile: 320px,
|
7
|
+
tablet: 640px,
|
8
|
+
desktop: 1024px
|
9
|
+
);
|
10
|
+
|
11
|
+
$base-spacing-unit: 16px;
|
12
|
+
|
13
|
+
$global-transition: .4s;
|
14
|
+
|
15
|
+
// Colors
|
16
|
+
$color-brand: #00A0FF;
|
17
|
+
$color-white: #FFFFFF;
|
18
|
+
$color-text: #323232;
|
19
|
+
$color-gray: #2B5F72;
|
20
|
+
|
21
|
+
// Background Colors
|
22
|
+
$bg-color-white: $color-white;
|
23
|
+
$bg-color-dark: #222228;
|
24
|
+
$bg-color-gray: #FAFAFA;
|
25
|
+
|
26
|
+
// Border
|
27
|
+
$color-border: #E9EFF3;
|
28
|
+
|
29
|
+
// Links
|
30
|
+
$color-link: $color-text;
|
31
|
+
$color-link-hover: $color-brand;
|
32
|
+
|
33
|
+
// Fonts
|
34
|
+
$font-base:
|
35
|
+
-apple-system,
|
36
|
+
BlinkMacSystemFont,
|
37
|
+
'Segoe UI',
|
38
|
+
Helvetica,
|
39
|
+
'Microsoft YaHei',
|
40
|
+
华文细黑,
|
41
|
+
Arial,
|
42
|
+
sans-serif,
|
43
|
+
'Apple Color Emoji',
|
44
|
+
'Segoe UI Emoji',
|
45
|
+
'Segoe UI Symbol';
|
46
|
+
$font-monospace: Courier, monospace;
|
47
|
+
|
48
|
+
$font-size-base: 19px;
|
49
|
+
$font-size-medium: 16px;
|
50
|
+
$font-size-small: 14px;
|
51
|
+
$font-size-tiny: 12px;
|
52
|
+
|
53
|
+
$font-weight-light: 300;
|
54
|
+
$font-weight-regular: 400;
|
55
|
+
$font-weight-bold: 600;
|
56
|
+
$font-weight-bolder: 900;
|
57
|
+
|
58
|
+
$line-height-base: round($font-size-base * 1.7);
|
59
|
+
$line-height-medium: round($font-size-medium * 1.55);
|
60
|
+
$line-height-small: round($font-size-small * 1.55);
|
61
|
+
$line-height-tiny: round($font-size-tiny * 1.55);
|