materialize-sass 0.99.0 → 0.100.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -2
- data/app/assets/javascripts/materialize.js +6015 -5060
- data/app/assets/javascripts/materialize/animation.js +4 -5
- data/app/assets/javascripts/materialize/buttons.js +24 -38
- data/app/assets/javascripts/materialize/cards.js +13 -21
- data/app/assets/javascripts/materialize/carousel.js +122 -110
- data/app/assets/javascripts/materialize/character_counter.js +14 -22
- data/app/assets/javascripts/materialize/chips.js +41 -44
- data/app/assets/javascripts/materialize/collapsible.js +41 -46
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +965 -1167
- data/app/assets/javascripts/materialize/date_picker/picker.js +546 -634
- data/app/assets/javascripts/materialize/date_picker/picker.time.js +166 -212
- data/app/assets/javascripts/materialize/dropdown.js +53 -68
- data/app/assets/javascripts/materialize/extras/nouislider.js +3 -1
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
- data/app/assets/javascripts/materialize/forms.js +156 -154
- data/app/assets/javascripts/materialize/global.js +34 -43
- data/app/assets/javascripts/materialize/hammer.min.js +424 -1
- data/app/assets/javascripts/materialize/initial.js +3 -3
- data/app/assets/javascripts/materialize/jquery.easing.1.4.js +120 -142
- data/app/assets/javascripts/materialize/jquery.hammer.js +9 -9
- data/app/assets/javascripts/materialize/materialbox.js +81 -107
- data/app/assets/javascripts/materialize/modal.js +373 -162
- data/app/assets/javascripts/materialize/parallax.js +11 -15
- data/app/assets/javascripts/materialize/pushpin.js +2 -5
- data/app/assets/javascripts/materialize/scrollFire.js +9 -11
- data/app/assets/javascripts/materialize/scrollspy.js +84 -92
- data/app/assets/javascripts/materialize/sideNav.js +128 -139
- data/app/assets/javascripts/materialize/slider.js +83 -112
- data/app/assets/javascripts/materialize/tabs.js +196 -196
- data/app/assets/javascripts/materialize/tapTarget.js +170 -173
- data/app/assets/javascripts/materialize/toasts.js +330 -112
- data/app/assets/javascripts/materialize/tooltip.js +134 -145
- data/app/assets/javascripts/materialize/transitions.js +43 -49
- data/app/assets/javascripts/materialize/velocity.min.js +623 -2
- data/app/assets/javascripts/materialize/waves.js +42 -47
- data/app/assets/stylesheets/materialize/components/_buttons.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_carousel.scss +4 -5
- data/app/assets/stylesheets/materialize/components/_chips.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_collapsible.scss +4 -7
- data/app/assets/stylesheets/materialize/components/_color.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_global.scss +8 -14
- data/app/assets/stylesheets/materialize/components/_navbar.scss +0 -1
- data/app/assets/stylesheets/materialize/components/_tabs.scss +1 -7
- data/app/assets/stylesheets/materialize/components/_toast.scss +6 -12
- data/app/assets/stylesheets/materialize/components/_variables.scss +55 -43
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +1 -0
- data/app/assets/stylesheets/materialize/components/forms/_checkboxes.scss +2 -12
- data/app/assets/stylesheets/materialize/components/forms/_file-input.scss +6 -0
- data/app/assets/stylesheets/materialize/components/forms/_input-fields.scss +67 -37
- data/app/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +1 -3
- data/app/assets/stylesheets/materialize/components/forms/_select.scss +72 -11
- data/app/assets/stylesheets/materialize/components/forms/_switches.scss +2 -4
- data/app/assets/stylesheets/materialize/extras/nouislider.css +8 -1
- data/lib/materialize-sass/version.rb +1 -1
- metadata +2 -5
- data/app/assets/javascripts/materialize/init.js +0 -214
- data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
- data/app/assets/javascripts/materialize/prism.js +0 -8
@@ -5,8 +5,8 @@
|
|
5
5
|
[type="radio"]:not(:checked),
|
6
6
|
[type="radio"]:checked {
|
7
7
|
position: absolute;
|
8
|
-
left: -9999px;
|
9
8
|
opacity: 0;
|
9
|
+
pointer-events: none;
|
10
10
|
}
|
11
11
|
|
12
12
|
[type="radio"]:not(:checked) + label,
|
@@ -19,8 +19,6 @@
|
|
19
19
|
line-height: 25px;
|
20
20
|
font-size: 1rem;
|
21
21
|
transition: .28s ease;
|
22
|
-
|
23
|
-
-khtml-user-select: none; /* webkit (konqueror) browsers */
|
24
22
|
user-select: none;
|
25
23
|
}
|
26
24
|
|
@@ -13,11 +13,55 @@ select {
|
|
13
13
|
height: $input-height;
|
14
14
|
}
|
15
15
|
|
16
|
+
|
17
|
+
.input-field {
|
18
|
+
select {
|
19
|
+
display: block;
|
20
|
+
position: absolute;
|
21
|
+
width: 0;
|
22
|
+
pointer-events: none;
|
23
|
+
height: 0;
|
24
|
+
top: 0;
|
25
|
+
left: 0;
|
26
|
+
opacity: 0;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
16
30
|
.select-label {
|
17
31
|
position: absolute;
|
18
32
|
}
|
19
33
|
|
20
34
|
.select-wrapper {
|
35
|
+
&.valid {
|
36
|
+
& > input.select-dropdown {
|
37
|
+
@extend %valid-input-style;
|
38
|
+
}
|
39
|
+
|
40
|
+
& + label:after {
|
41
|
+
@extend %custom-success-message;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
&.invalid {
|
46
|
+
& > input.select-dropdown {
|
47
|
+
@extend %invalid-input-style;
|
48
|
+
}
|
49
|
+
|
50
|
+
& + label:after {
|
51
|
+
@extend %custom-error-message;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
&.valid + label,
|
56
|
+
&.invalid + label {
|
57
|
+
width: 100%;
|
58
|
+
pointer-events: none;
|
59
|
+
}
|
60
|
+
|
61
|
+
& + label:after {
|
62
|
+
@extend %input-after-style;
|
63
|
+
}
|
64
|
+
|
21
65
|
position: relative;
|
22
66
|
|
23
67
|
input.select-dropdown {
|
@@ -34,6 +78,7 @@ select {
|
|
34
78
|
margin: $input-margin;
|
35
79
|
padding: 0;
|
36
80
|
display: block;
|
81
|
+
user-select:none;
|
37
82
|
}
|
38
83
|
|
39
84
|
span.caret {
|
@@ -46,31 +91,31 @@ select {
|
|
46
91
|
margin: auto 0;
|
47
92
|
font-size: 10px;
|
48
93
|
line-height: 10px;
|
49
|
-
|
50
|
-
&.disabled {
|
51
|
-
color: $input-disabled-color;
|
52
|
-
}
|
53
94
|
}
|
54
95
|
|
55
96
|
& + label {
|
56
97
|
position: absolute;
|
57
|
-
top: -
|
98
|
+
top: -26px;
|
58
99
|
font-size: $label-font-size;
|
59
100
|
}
|
60
101
|
}
|
61
102
|
|
62
103
|
// Disabled styles
|
63
104
|
select:disabled {
|
64
|
-
color:
|
105
|
+
color: $input-disabled-color;
|
106
|
+
}
|
107
|
+
|
108
|
+
.select-wrapper.disabled {
|
109
|
+
span.caret,
|
110
|
+
& + label {
|
111
|
+
color: $input-disabled-color;
|
112
|
+
}
|
65
113
|
}
|
66
114
|
|
67
115
|
.select-wrapper input.select-dropdown:disabled {
|
68
|
-
color:
|
116
|
+
color: $input-disabled-color;
|
69
117
|
cursor: default;
|
70
|
-
|
71
|
-
-moz-user-select: none; /* mozilla browsers */
|
72
|
-
-ms-user-select: none; /* IE10+ */
|
73
|
-
border-bottom: 1px solid rgba(0,0,0,.3);
|
118
|
+
user-select: none;
|
74
119
|
}
|
75
120
|
|
76
121
|
.select-wrapper i {
|
@@ -84,6 +129,22 @@ select:disabled {
|
|
84
129
|
background-color: transparent;
|
85
130
|
}
|
86
131
|
|
132
|
+
.select-dropdown.dropdown-content {
|
133
|
+
li {
|
134
|
+
&.active {
|
135
|
+
background-color: transparent;
|
136
|
+
}
|
137
|
+
|
138
|
+
&:hover {
|
139
|
+
background-color: $select-option-hover;
|
140
|
+
}
|
141
|
+
|
142
|
+
&.selected {
|
143
|
+
background-color: $select-option-focus;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
87
148
|
// Prefix Icons
|
88
149
|
.prefix ~ .select-wrapper {
|
89
150
|
margin-left: 3rem;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Materialize v0.
|
2
|
+
* Materialize v0.100.0 (http://materializecss.com)
|
3
3
|
* Copyright 2014-2015 Materialize
|
4
4
|
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
|
5
5
|
*/
|
@@ -59,6 +59,13 @@
|
|
59
59
|
cursor: inherit !important;
|
60
60
|
}
|
61
61
|
|
62
|
+
.noUi-handle-touch-area{
|
63
|
+
position: relative;
|
64
|
+
width: 44px;
|
65
|
+
height: 44px;
|
66
|
+
left: -15px;
|
67
|
+
top: -15px;
|
68
|
+
}
|
62
69
|
/* Painting and performance;
|
63
70
|
* Browsers can paint handles in their own layer.
|
64
71
|
*/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: materialize-sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.100.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mkhairi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,15 +92,12 @@ files:
|
|
92
92
|
- app/assets/javascripts/materialize/forms.js
|
93
93
|
- app/assets/javascripts/materialize/global.js
|
94
94
|
- app/assets/javascripts/materialize/hammer.min.js
|
95
|
-
- app/assets/javascripts/materialize/init.js
|
96
95
|
- app/assets/javascripts/materialize/initial.js
|
97
96
|
- app/assets/javascripts/materialize/jquery.easing.1.4.js
|
98
97
|
- app/assets/javascripts/materialize/jquery.hammer.js
|
99
|
-
- app/assets/javascripts/materialize/jquery.timeago.min.js
|
100
98
|
- app/assets/javascripts/materialize/materialbox.js
|
101
99
|
- app/assets/javascripts/materialize/modal.js
|
102
100
|
- app/assets/javascripts/materialize/parallax.js
|
103
|
-
- app/assets/javascripts/materialize/prism.js
|
104
101
|
- app/assets/javascripts/materialize/pushpin.js
|
105
102
|
- app/assets/javascripts/materialize/scrollFire.js
|
106
103
|
- app/assets/javascripts/materialize/scrollspy.js
|
@@ -1,214 +0,0 @@
|
|
1
|
-
(function($){
|
2
|
-
$(function(){
|
3
|
-
|
4
|
-
var window_width = $(window).width();
|
5
|
-
|
6
|
-
// convert rgb to hex value string
|
7
|
-
function rgb2hex(rgb) {
|
8
|
-
if (/^#[0-9A-F]{6}$/i.test(rgb)) { return rgb; }
|
9
|
-
|
10
|
-
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
11
|
-
|
12
|
-
if (rgb === null) { return "N/A"; }
|
13
|
-
|
14
|
-
function hex(x) {
|
15
|
-
return ("0" + parseInt(x).toString(16)).slice(-2);
|
16
|
-
}
|
17
|
-
|
18
|
-
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
19
|
-
}
|
20
|
-
|
21
|
-
$('.dynamic-color .col').each(function () {
|
22
|
-
$(this).children().each(function () {
|
23
|
-
var color = $(this).css('background-color'),
|
24
|
-
classes = $(this).attr('class');
|
25
|
-
$(this).html(rgb2hex(color) + " " + classes);
|
26
|
-
if (classes.indexOf("darken") >= 0 || $(this).hasClass('black')) {
|
27
|
-
$(this).css('color', 'rgba(255,255,255,.9');
|
28
|
-
}
|
29
|
-
});
|
30
|
-
});
|
31
|
-
|
32
|
-
// Floating-Fixed table of contents
|
33
|
-
setTimeout(function() {
|
34
|
-
var tocWrapperHeight = 260; // Max height of ads.
|
35
|
-
var tocHeight = $('.toc-wrapper .table-of-contents').length ? $('.toc-wrapper .table-of-contents').height() : 0;
|
36
|
-
var socialHeight = 95; // Height of unloaded social media in footer.
|
37
|
-
var footerOffset = $('body > footer').first().length ? $('body > footer').first().offset().top : 0;
|
38
|
-
var bottomOffset = footerOffset - socialHeight - tocHeight - tocWrapperHeight;
|
39
|
-
|
40
|
-
if ($('nav').length) {
|
41
|
-
$('.toc-wrapper').pushpin({
|
42
|
-
top: $('nav').height(),
|
43
|
-
bottom: bottomOffset
|
44
|
-
});
|
45
|
-
}
|
46
|
-
else if ($('#index-banner').length) {
|
47
|
-
$('.toc-wrapper').pushpin({
|
48
|
-
top: $('#index-banner').height(),
|
49
|
-
bottom: bottomOffset
|
50
|
-
});
|
51
|
-
}
|
52
|
-
else {
|
53
|
-
$('.toc-wrapper').pushpin({
|
54
|
-
top: 0,
|
55
|
-
bottom: bottomOffset
|
56
|
-
});
|
57
|
-
}
|
58
|
-
}, 100);
|
59
|
-
|
60
|
-
|
61
|
-
// BuySellAds Detection
|
62
|
-
var $bsa = $(".buysellads"),
|
63
|
-
$timesToCheck = 3;
|
64
|
-
function checkForChanges() {
|
65
|
-
if (!$bsa.find('#carbonads').length) {
|
66
|
-
$timesToCheck -= 1;
|
67
|
-
if ($timesToCheck >= 0) {
|
68
|
-
setTimeout(checkForChanges, 500);
|
69
|
-
}
|
70
|
-
else {
|
71
|
-
var donateAd = $('<div id="carbonads"><span><a class="carbon-text" href="#!" onclick="document.getElementById(\'paypal-donate\').submit();"><img src="images/donate.png" /> Help support us by turning off adblock. If you still prefer to keep adblock on for this page but still want to support us, feel free to donate. Any little bit helps.</a></form></span></div>');
|
72
|
-
|
73
|
-
$bsa.append(donateAd);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
}
|
78
|
-
checkForChanges();
|
79
|
-
|
80
|
-
|
81
|
-
// BuySellAds Demos close button.
|
82
|
-
$('.buysellads.buysellads-demo .close').on('click', function() {
|
83
|
-
$(this).parent().remove();
|
84
|
-
});
|
85
|
-
|
86
|
-
|
87
|
-
// Github Latest Commit
|
88
|
-
if ($('.github-commit').length) { // Checks if widget div exists (Index only)
|
89
|
-
$.ajax({
|
90
|
-
url: "https://api.github.com/repos/dogfalo/materialize/commits/master",
|
91
|
-
dataType: "json",
|
92
|
-
success: function (data) {
|
93
|
-
var sha = data.sha,
|
94
|
-
date = jQuery.timeago(data.commit.author.date);
|
95
|
-
if (window_width < 1120) {
|
96
|
-
sha = sha.substring(0,7);
|
97
|
-
}
|
98
|
-
$('.github-commit').find('.date').html(date);
|
99
|
-
$('.github-commit').find('.sha').html(sha).attr('href', data.html_url);
|
100
|
-
}
|
101
|
-
});
|
102
|
-
}
|
103
|
-
|
104
|
-
// Toggle Flow Text
|
105
|
-
var toggleFlowTextButton = $('#flow-toggle');
|
106
|
-
toggleFlowTextButton.click( function(){
|
107
|
-
$('#flow-text-demo').children('p').each(function(){
|
108
|
-
$(this).toggleClass('flow-text');
|
109
|
-
});
|
110
|
-
});
|
111
|
-
|
112
|
-
// Toggle Containers on page
|
113
|
-
var toggleContainersButton = $('#container-toggle-button');
|
114
|
-
toggleContainersButton.click(function(){
|
115
|
-
$('body .browser-window .container, .had-container').each(function(){
|
116
|
-
$(this).toggleClass('had-container');
|
117
|
-
$(this).toggleClass('container');
|
118
|
-
if ($(this).hasClass('container')) {
|
119
|
-
toggleContainersButton.text("Turn off Containers");
|
120
|
-
}
|
121
|
-
else {
|
122
|
-
toggleContainersButton.text("Turn on Containers");
|
123
|
-
}
|
124
|
-
});
|
125
|
-
});
|
126
|
-
|
127
|
-
// Detect touch screen and enable scrollbar if necessary
|
128
|
-
function is_touch_device() {
|
129
|
-
try {
|
130
|
-
document.createEvent("TouchEvent");
|
131
|
-
return true;
|
132
|
-
} catch (e) {
|
133
|
-
return false;
|
134
|
-
}
|
135
|
-
}
|
136
|
-
if (is_touch_device()) {
|
137
|
-
$('#nav-mobile').css({ overflow: 'auto'});
|
138
|
-
}
|
139
|
-
|
140
|
-
// Set checkbox on forms.html to indeterminate
|
141
|
-
var indeterminateCheckbox = document.getElementById('indeterminate-checkbox');
|
142
|
-
if (indeterminateCheckbox !== null)
|
143
|
-
indeterminateCheckbox.indeterminate = true;
|
144
|
-
|
145
|
-
|
146
|
-
// Pushpin Demo Init
|
147
|
-
if ($('.pushpin-demo-nav').length) {
|
148
|
-
$('.pushpin-demo-nav').each(function() {
|
149
|
-
var $this = $(this);
|
150
|
-
var $target = $('#' + $(this).attr('data-target'));
|
151
|
-
$this.pushpin({
|
152
|
-
top: $target.offset().top,
|
153
|
-
bottom: $target.offset().top + $target.outerHeight() - $this.height()
|
154
|
-
});
|
155
|
-
});
|
156
|
-
}
|
157
|
-
|
158
|
-
// CSS Transitions Demo Init
|
159
|
-
if ($('#scale-demo').length &&
|
160
|
-
$('#scale-demo-trigger').length) {
|
161
|
-
$('#scale-demo-trigger').click(function() {
|
162
|
-
$('#scale-demo').toggleClass('scale-out');
|
163
|
-
});
|
164
|
-
}
|
165
|
-
|
166
|
-
// Swipeable Tabs Demo Init
|
167
|
-
if ($('#tabs-swipe-demo').length) {
|
168
|
-
$('#tabs-swipe-demo').tabs({ 'swipeable': true });
|
169
|
-
}
|
170
|
-
|
171
|
-
// Plugin initialization
|
172
|
-
$('.carousel.carousel-slider').carousel({fullWidth: true});
|
173
|
-
$('.carousel').carousel();
|
174
|
-
$('.slider').slider();
|
175
|
-
$('.parallax').parallax();
|
176
|
-
$('.modal').modal();
|
177
|
-
$('.scrollspy').scrollSpy();
|
178
|
-
$('.button-collapse').sideNav({'edge': 'left'});
|
179
|
-
$('.datepicker').pickadate({selectYears: 20});
|
180
|
-
$('.timepicker').pickatime();
|
181
|
-
$('select').not('.disabled').material_select();
|
182
|
-
$('input.autocomplete').autocomplete({
|
183
|
-
data: {"Apple": null, "Microsoft": null, "Google": 'http://placehold.it/250x250'},
|
184
|
-
});
|
185
|
-
|
186
|
-
// Chips
|
187
|
-
$('.chips').material_chip();
|
188
|
-
$('.chips-initial').material_chip({
|
189
|
-
readOnly: true,
|
190
|
-
data: [{
|
191
|
-
tag: 'Apple',
|
192
|
-
}, {
|
193
|
-
tag: 'Microsoft',
|
194
|
-
}, {
|
195
|
-
tag: 'Google',
|
196
|
-
}]
|
197
|
-
});
|
198
|
-
$('.chips-placeholder').material_chip({
|
199
|
-
placeholder: 'Enter a tag',
|
200
|
-
secondaryPlaceholder: '+Tag',
|
201
|
-
});
|
202
|
-
$('.chips-autocomplete').material_chip({
|
203
|
-
autocompleteOptions: {
|
204
|
-
data: {
|
205
|
-
'Apple': null,
|
206
|
-
'Microsoft': null,
|
207
|
-
'Google': null
|
208
|
-
}
|
209
|
-
},
|
210
|
-
});
|
211
|
-
|
212
|
-
|
213
|
-
}); // end of document ready
|
214
|
-
})(jQuery); // end of jQuery name space
|
@@ -1 +0,0 @@
|
|
1
|
-
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(){var e=a(this),o=r.settings;return isNaN(e.datetime)||(0==o.cutoff||Math.abs(n(e.datetime))<o.cutoff)&&t(this).text(i(e.datetime)),this}function a(e){if(e=t(e),!e.data("timeago")){e.data("timeago",{datetime:r.datetime(e)});var a=t.trim(e.text());r.settings.localeTitle?e.attr("title",e.data("timeago").datetime.toLocaleString()):!(a.length>0)||r.isTime(e)&&e.attr("title")||e.attr("title",a)}return e.data("timeago")}function i(t){return r.inWords(n(t))}function n(t){return(new Date).getTime()-t.getTime()}t.timeago=function(e){return i(e instanceof Date?e:"string"==typeof e?t.timeago.parse(e):"number"==typeof e?new Date(e):t.timeago.datetime(e))};var r=t.timeago;t.extend(t.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(e){function a(a,n){var r=t.isFunction(a)?a(n,e):a,o=i.numbers&&i.numbers[n]||n;return r.replace(/%d/i,o)}if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var i=this.settings.strings,n=i.prefixAgo,r=i.suffixAgo;if(this.settings.allowFuture&&0>e&&(n=i.prefixFromNow,r=i.suffixFromNow),!this.settings.allowPast&&e>=0)return this.settings.strings.inPast;var o=Math.abs(e)/1e3,s=o/60,u=s/60,m=u/24,l=m/365,d=45>o&&a(i.seconds,Math.round(o))||90>o&&a(i.minute,1)||45>s&&a(i.minutes,Math.round(s))||90>s&&a(i.hour,1)||24>u&&a(i.hours,Math.round(u))||42>u&&a(i.day,1)||30>m&&a(i.days,Math.round(m))||45>m&&a(i.month,1)||365>m&&a(i.months,Math.round(m/30))||1.5>l&&a(i.year,1)||a(i.years,Math.round(l)),f=i.wordSeparator||"";return void 0===i.wordSeparator&&(f=" "),t.trim([n,d,r].join(f))},parse:function(e){var a=t.trim(e);return a=a.replace(/\.\d+/,""),a=a.replace(/-/,"/").replace(/-/,"/"),a=a.replace(/T/," ").replace(/Z/," UTC"),a=a.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),a=a.replace(/([\+\-]\d\d)$/," $100"),new Date(a)},datetime:function(e){var a=t(e).attr(r.isTime(e)?"datetime":"title");return r.parse(a)},isTime:function(e){return"time"===t(e).get(0).tagName.toLowerCase()}});var o={init:function(){var a=t.proxy(e,this);a();var i=r.settings;i.refreshMillis>0&&(this._timeagoInterval=setInterval(a,i.refreshMillis))},update:function(a){var i=r.parse(a);t(this).data("timeago",{datetime:i}),r.settings.localeTitle&&t(this).attr("title",i.toLocaleString()),e.apply(this)},updateFromDOM:function(){t(this).data("timeago",{datetime:r.parse(t(this).attr(r.isTime(this)?"datetime":"title"))}),e.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}};t.fn.timeago=function(t,e){var a=t?o[t]:o.init;if(!a)throw new Error("Unknown function name '"+t+"' for timeago");return this.each(function(){a.call(this,e)}),this},document.createElement("abbr"),document.createElement("time")});
|
@@ -1,8 +0,0 @@
|
|
1
|
-
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+scss+bash */
|
2
|
-
self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{};var Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=t.util.clone(e[r]));return a;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var a=t.util.clone(t.languages[e]);for(var r in n)a[r]=n[r];return a},insertBefore:function(e,n,a,r){r=r||t.languages;var i=r[e];if(2==arguments.length){a=arguments[1];for(var l in a)a.hasOwnProperty(l)&&(i[l]=a[l]);return i}var s={};for(var o in i)if(i.hasOwnProperty(o)){if(o==n)for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l]);s[o]=i[o]}return t.languages.DFS(t.languages,function(t,n){n===r[e]&&t!=e&&(this[t]=s)}),r[e]=s},DFS:function(e,n,a){for(var r in e)e.hasOwnProperty(r)&&(n.call(e,r,e[r],a||r),"Object"===t.util.type(e[r])?t.languages.DFS(e[r],n):"Array"===t.util.type(e[r])&&t.languages.DFS(e[r],n,r))}},highlightAll:function(e,n){for(var a,r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),i=0;a=r[i++];)t.highlightElement(a,e===!0,n)},highlightElement:function(a,r,i){for(var l,s,o=a;o&&!e.test(o.className);)o=o.parentNode;if(o&&(l=(o.className.match(e)||[,""])[1],s=t.languages[l]),s){a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,o=a.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l);var g=a.textContent;if(g){var u={element:a,language:l,grammar:s,code:g};if(t.hooks.run("before-highlight",u),r&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){u.highlightedCode=n.stringify(JSON.parse(e.data),l),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,i&&i.call(u.element),t.hooks.run("after-highlight",u)},c.postMessage(JSON.stringify({language:u.language,code:u.code}))}else u.highlightedCode=t.highlight(u.code,u.grammar,u.language),t.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,i&&i.call(a),t.hooks.run("after-highlight",u)}}},highlight:function(e,a,r){var i=t.tokenize(e,a);return n.stringify(t.util.encode(i),r)},tokenize:function(e,n){var a=t.Token,r=[e],i=n.rest;if(i){for(var l in i)n[l]=i[l];delete n.rest}e:for(var l in n)if(n.hasOwnProperty(l)&&n[l]){var s=n[l];s="Array"===t.util.type(s)?s:[s];for(var o=0;o<s.length;++o){var g=s[o],u=g.inside,c=!!g.lookbehind,f=0,h=g.alias;g=g.pattern||g;for(var p=0;p<r.length;p++){var d=r[p];if(r.length>e.length)break e;if(!(d instanceof a)){g.lastIndex=0;var m=g.exec(d);if(m){c&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),O=[p,1];b&&O.push(b);var N=new a(l,u?t.tokenize(m,u):m,h);O.push(N),w&&O.push(w),Array.prototype.splice.apply(r,O)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("[object Array]"==Object.prototype.toString.call(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var i={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}t.hooks.run("wrap",i);var s="";for(var o in i.attributes)s+=o+'="'+(i.attributes[o]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+s+">"+i.content+"</"+i.tag+">"},!self.document)return self.addEventListener?(self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code;self.postMessage(JSON.stringify(t.util.encode(t.tokenize(r,t.languages[a])))),self.close()},!1),self.Prism):self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism);;
|
3
|
-
Prism.languages.markup={comment:/<!--[\w\W]*?-->/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/\&#?[\da-z]{1,8};/gi},Prism.hooks.add("wrap",function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&/,"&"))});;
|
4
|
-
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*{))/gi,inside:{punctuation:/[;:]/g}},url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\};]*(?=\s*\{)/g,property:/(\b|\B)[\w-]+(?=\s*:)/gi,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,punctuation:/[\{\};:]/g,"function":/[-a-z0-9]+(?=\()/gi},Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/gi,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/gi,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css},alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').+?\1/gi,inside:{"attr-name":{pattern:/^\s*style/gi,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/gi,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));;
|
5
|
-
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//g,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*?(\r?\n|$)/g,lookbehind:!0}],string:/("|')(\\?.)*?\1/g,"class-name":{pattern:/((?:(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/gi,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,"function":{pattern:/[a-z0-9_]+\(/gi,inside:{punctuation:/\(/}},number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,operator:/[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
|
6
|
-
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|-?Infinity)\b/g,"function":/(?!\d)[a-z0-9_$]+(?=\()/gi}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/gi,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/gi,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript},alias:"language-javascript"}});;
|
7
|
-
Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g,lookbehind:!0},atrule:/@[\w-]+(?=\s+(\(|\{|;))/gi,url:/([-a-z]+-)*url(?=\()/gi,selector:/([^@;\{\}\(\)]?([^@;\{\}\(\)]|&|\#\{\$[-_\w]+\})+)(?=\s*\{(\}|\s|[^\}]+(:|\{)[^\}]+))/gm}),Prism.languages.insertBefore("scss","atrule",{keyword:/@(if|else if|else|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)|(?=@for\s+\$[-_\w]+\s)+from/i}),Prism.languages.insertBefore("scss","property",{variable:/((\$[-_\w]+)|(#\{\$[-_\w]+\}))/i}),Prism.languages.insertBefore("scss","ignore",{placeholder:/%[-_\w]+/i,statement:/\B!(default|optional)\b/gi,"boolean":/\b(true|false)\b/g,"null":/\b(null)\b/g,operator:/\s+([-+]{1,2}|={1,2}|!=|\|?\||\?|\*|\/|\%)\s+/g});;
|
8
|
-
Prism.languages.bash=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])(#.*?(\r?\n|$))/g,lookbehind:!0},string:{pattern:/("|')(\\?[\s\S])*?\1/g,inside:{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^\}]+\})/g}},keyword:/\b(if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)\b/g}),Prism.languages.insertBefore("bash","keyword",{property:/\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^}]+\})/g}),Prism.languages.insertBefore("bash","comment",{important:/(^#!\s*\/bin\/bash)|(^#!\s*\/bin\/sh)/g});;
|