mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-10 19:57:13 +03:00
docs: fixes
This commit is contained in:
parent
45c4f8cdac
commit
de218c66f8
|
@ -29,14 +29,3 @@
|
|||
<!-- Favicons -->
|
||||
<link rel="apple-touch-icon" href="{{ site.baseurl }}/apple-touch-icon.png">
|
||||
<link rel="icon" href="{{ site.baseurl }}/favicon.ico">
|
||||
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
|
||||
ga('create', 'UA-80431047-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
|
|
@ -1,9 +1,26 @@
|
|||
<script src="{{ site.baseurl }}/assets/js/vendor/split.min.js">
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Split.setup({
|
||||
creativetim: function () {document.body.classList.add('creativetim')},
|
||||
mdbootstrap: function () {document.body.classList.add('mdbootstrap')},
|
||||
});
|
||||
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
|
||||
ga('create', 'UA-80431047-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
||||
<script src="{{ site.cdn.jquery }}" integrity="{{ site.cdn.jquery_hash }}" crossorigin="anonymous"></script>
|
||||
<script>window.jQuery || document.write('<script src="{{ site.baseurl }}/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
|
||||
|
||||
<script src="{{ site.baseurl }}/assets/js/vendor/popper.min.js"></script>
|
||||
<script src="{{ site.baseurl }}/assets/js/vendor/ab.min.js"></script>
|
||||
|
||||
{% if site.github %}
|
||||
<script src="{{ site.baseurl }}/dist/js/bootstrap-material-design.min.js"></script>
|
||||
{% else %}
|
||||
|
|
|
@ -142,9 +142,18 @@
|
|||
display: block;
|
||||
color: #777 !important; }
|
||||
|
||||
.partner.mdbootstrap {
|
||||
body.creativetim .partner.mdbootstrap {
|
||||
display: none; }
|
||||
|
||||
body.creativetim .partner.creativetim {
|
||||
display: initial; }
|
||||
|
||||
body.mdbootstrap .partner.creativetim {
|
||||
display: none; }
|
||||
|
||||
body.mdbootstrap .partner.mdbootstrap {
|
||||
display: initial; }
|
||||
|
||||
.bd-content {
|
||||
order: 1; }
|
||||
.bd-content > h2[id],
|
||||
|
|
2
assets/css/docs.min.css
vendored
2
assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -18,14 +18,6 @@
|
|||
$(function() {
|
||||
$('body').bootstrapMaterialDesign();
|
||||
|
||||
ab('partner', 0.5).slices('creativetim', 'mdbootstrap').run(function() {
|
||||
if (this.slice.name !== 'creativetim' && this.slice.name !== 'control') {
|
||||
$('.partner.creativetim').hide();
|
||||
}
|
||||
$('.partner.' + this.slice.name).show();
|
||||
ga('send', 'event', 'Partner', this.slice.name);
|
||||
});
|
||||
|
||||
// Indeterminate checkbox example
|
||||
$('.bd-example-indeterminate [type="checkbox"]').prop(
|
||||
'indeterminate',
|
||||
|
|
2
assets/js/vendor/ab.min.js
vendored
2
assets/js/vendor/ab.min.js
vendored
|
@ -1,2 +0,0 @@
|
|||
/*! ab - v0.0.3 - 2014-03-24 */
|
||||
!function(){function a(){this._events={}}function b(a){this.name=a}function c(a,b){this.name=a,this.traffic=b,this.slice=null,this.storage=i,this._slices={}}var d={},e=function(a,b,e){return d.hasOwnProperty(a)?d[a]:("undefined"==typeof b&&(b=1),d[a]=new c(a,b),e&&e.length&&d[a].slices(e),d[a])};e.clear=function(){for(var a in d)d.hasOwnProperty(a)&&d[a].clear();d={}};var f=window.ab;e.noConflict=function(){return window.ab=f,e},e.events=new a,e.version="__VERSION__",e.config={STORAGE_PREFIX:"ab:"};var g=function(a){var b="test";try{return window[a+"Storage"].setItem(b,b),window[a+"Storage"].removeItem(b),!0}catch(c){return!1}},h=function(a){function b(a,b,c){var d,e;c?(d=new Date,d.setTime(d.getTime()+24*c*60*60*1e3),e="; expires="+d.toGMTString()):e="",document.cookie=a+"="+b+e+"; path=/"}function c(a){var b,c,d=a+"=",e=document.cookie.split(";");for(b=0;b<e.length;b++){for(c=e[b];" "===c.charAt(0);)c=c.substring(1,c.length);if(0===c.indexOf(d))return c.substring(d.length,c.length)}return null}function d(c){c=JSON.stringify(c),"session"===a?window.name=c:b("localStorage",c,365)}function e(){"session"===a?window.name="":b("localStorage","",365)}function f(){var b="session"===a?window.name:c("localStorage");try{return b?JSON.parse(b):{}}catch(d){return{}}}var g=f();return{length:0,clear:function(){g={},this.length=0,e()},getItem:function(a){return void 0===g[a]?null:g[a]},key:function(a){var b=0;for(var c in g){if(b==a)return c;b+=1}return null},removeItem:function(a){delete g[a],this.length-=1,d(g)},setItem:function(a,b){g[a]=b+"",this.length+=1,d(g)}}},i=g("local")?window.localStorage:new h("local");a.prototype.trigger=function(a){var b=Array.prototype.slice.call(arguments,1);if(this._events.hasOwnProperty(a))for(var c=0,d=this._events[a].length;d>c;c++)this._events[a][c].apply(window,b)},a.prototype.on=function(a,b){this._events.hasOwnProperty(a)||(this._events[a]=[]),this._events[a].push(b)},b.prototype.toString=function(){return this.name},b.prototype.toJSON=function(){return{name:this.name}},c.prototype.slices=function(a){if(null!==this.slice)throw new Error("Attempted to add slices to already running test.");"[object Array]"!==Object.prototype.toString.call(a)&&(a=Array.prototype.slice.call(arguments,0));for(var c=0,d=a.length;d>c;c++)this.add(new b(a[c]));return this},c.prototype.add=function(a){return this._slices[a.name]=a,this},c.prototype.run=function(a){var c=this.urlSlice()||this.storedSlice();return c&&this.hasSlice(c)?this.slice=this.getSlice(c):Math.random()>this.traffic?(this.slice=new b("control"),e.events.trigger("start",this)):(this.slice=this.chooseSlice(),e.events.trigger("start",this)),this.storage.setItem(this.key(),this.slice.name),"function"==typeof a&&a.call(this),e.events.trigger("run",this),this},c.prototype.chooseSlice=function(){var a=[];for(var c in this._slices)this._slices.hasOwnProperty(c)&&a.push(c);if(0===a.length)return new b("control");var d=Math.floor(Math.random()/(1/a.length));return this.getSlice(a[d])},c.prototype.hasSlice=function(a){return"control"===a&&this.traffic<1||this._slices.hasOwnProperty(a)},c.prototype.getSlice=function(a){return"control"===a?new b("control"):this._slices[a]},c.prototype.urlSlice=function(){var a,b=window.location.hash,c=window.location.search,d=new RegExp("("+this.key()+")=([\\w0-9]+)");return(a=b.match(d))?a[2]:(a=c.match(d))?a[2]:!1},c.prototype.storedSlice=function(){return this.storage.getItem(this.key())},c.prototype.key=function(){return e.config.STORAGE_PREFIX+this.name},c.prototype.toString=function(){return this.key()},c.prototype.clear=function(){this.storage.removeItem(this.key())},c.prototype.style=function(a){var b=document.createElement("link");return b.rel="stylesheet",b.href=a,document.head.appendChild(b),this},c.prototype.script=function(a,b){var c=document.createElement("script");c.type="text/javascript",c.async="undefined"==typeof b?!0:!!b,c.src=a;var d=document.getElementsByTagName("script")[0];return d.parentNode.insertBefore(c,d),this},e.Test=c,e.Slice=b,e.Storage=h,e.Events=a,"undefined"!=typeof module&&module.exports&&"undefined"!=typeof require?module.exports=e:"function"==typeof define&&define.amd?define("ab",function(){return e}):window.ab=e}();
|
21
assets/js/vendor/split.min.js
vendored
Normal file
21
assets/js/vendor/split.min.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
var _gaq=_gaq||[]
|
||||
Split=(function(){var config={},defaults={cookieName:'abTest',cookieAge:30,customVariableName:'AB Test alternative',customVariableIndex:1}
|
||||
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
|
||||
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
|
||||
function readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
|
||||
return null;}
|
||||
function eraseCookie(name){createCookie(name,"",-1);}
|
||||
function getKeys(obj)
|
||||
{var keys=[];for(var i in obj)if(obj.hasOwnProperty(i))
|
||||
{keys.push(i);}
|
||||
return keys;}
|
||||
function init(){alternatives=arguments[0]
|
||||
options=arguments[1]
|
||||
keys=getKeys(alternatives);config={}
|
||||
if(options!=undefined){for(k in defaults){config[k]=(options[k]!=undefined)?options[k]:defaults[k];}}else{config=defaults;}
|
||||
var alternative=readCookie(config.cookieName)
|
||||
if(alternative){}else{alternative=keys[Math.floor(Math.random()*keys.length)]
|
||||
createCookie(config.cookieName,alternative,config.cookieAge)}
|
||||
_gaq.push(['_setCustomVar',config.customVariableIndex,config.customVariableName,alternative,1]);alternatives[alternative]();}
|
||||
return{setup:function(args,options){init(args,options)}}})();
|
|
@ -14,7 +14,7 @@
|
|||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
text-align: left;
|
||||
background-color: rgba(0,0,0,.05);
|
||||
background-color: rgba(0, 0, 0, .05);
|
||||
|
||||
a {
|
||||
color: #333;
|
||||
|
@ -37,6 +37,19 @@
|
|||
color: #777 !important;
|
||||
}
|
||||
|
||||
.partner.mdbootstrap {
|
||||
display: none;
|
||||
body.creativetim {
|
||||
.partner.mdbootstrap {
|
||||
display: none;
|
||||
}
|
||||
.partner.creativetim {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
body.mdbootstrap {
|
||||
.partner.creativetim {
|
||||
display: none;
|
||||
}
|
||||
.partner.mdbootstrap {
|
||||
display: initial;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user