├── cheatsheet └── bootstrap4 │ ├── README.md │ └── assets │ ├── img │ ├── header.jpg │ ├── favicon.png │ ├── apple-icon.png │ ├── 318x100.svg │ └── 318x200.svg │ ├── scss │ ├── bs4-cheatsheet.scss │ └── bs4-cheatsheet │ │ ├── _navbar.scss │ │ ├── _footer.scss │ │ ├── _collapse.scss │ │ └── _cheatsheet.scss │ ├── js │ ├── plugins │ │ ├── jcfilter.min.js │ │ └── jquery.sharrre.js │ ├── bs4-cheatsheet.js │ ├── material.min.js │ └── core │ │ ├── tether.min.js │ │ └── bootstrap.min.js │ └── css │ └── bs4-cheatsheet.css ├── README.md └── LICENSE.md /cheatsheet/bootstrap4/README.md: -------------------------------------------------------------------------------- 1 | # [Bootstrap 4 Cheatsheet](https://www.creative-tim.com/cheatsheet/bootstrap4) 2 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/img/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/bootstrap4-cheatsheet/HEAD/cheatsheet/bootstrap4/assets/img/header.jpg -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/bootstrap4-cheatsheet/HEAD/cheatsheet/bootstrap4/assets/img/favicon.png -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/img/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/creativetimofficial/bootstrap4-cheatsheet/HEAD/cheatsheet/bootstrap4/assets/img/apple-icon.png -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/scss/bs4-cheatsheet.scss: -------------------------------------------------------------------------------- 1 | @import "bs4-cheatsheet/navbar"; 2 | @import "bs4-cheatsheet/collapse"; 3 | @import "bs4-cheatsheet/cheatsheet"; 4 | @import "bs4-cheatsheet/footer"; 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Creative Tim Cheatsheet](https://www.creative-tim.com/cheatsheet/bootstrap4) 2 | 3 | **Bootstrap 4 Cheat Sheet** is an online tool that helps you easily find the differences between Bootstrap 3 and Bootstrap 4. Beautiful and easy-to-use, this should be your go-to page if you are looking to upgrade your Bootstrap 3 project or start a new Bootstrap 4 project. 4 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/img/318x100.svg: -------------------------------------------------------------------------------- 1 | 318x100 -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/img/318x200.svg: -------------------------------------------------------------------------------- 1 | 318x200 -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/scss/bs4-cheatsheet/_navbar.scss: -------------------------------------------------------------------------------- 1 | .navbar{ 2 | transition: none; 3 | 4 | .navbar-collapse{ 5 | .navbar-nav .nav-item .nav-link p{ 6 | display: inline-block; 7 | } 8 | } 9 | 10 | button{ 11 | outline: none; 12 | cursor: pointer; 13 | } 14 | } 15 | 16 | @media screen and (max-width: 576px){ 17 | .navbar[class*='navbar-toggleable-'] .container { 18 | margin-left: 0; 19 | margin-right: 0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/scss/bs4-cheatsheet/_footer.scss: -------------------------------------------------------------------------------- 1 | .footer{ 2 | color: #ffffff; 3 | background-color: transparent; 4 | padding: 10px 15px; 5 | 6 | nav{ 7 | display: inline-block; 8 | float: left; 9 | line-height: 2.4; 10 | } 11 | 12 | ul{ 13 | margin-bottom: 0; 14 | padding: 0; 15 | list-style: none; 16 | 17 | li{ 18 | display: inline-block; 19 | } 20 | } 21 | 22 | &:after{ 23 | display: table; 24 | clear: both; 25 | content: " "; 26 | } 27 | 28 | .copyright, 29 | nav ul li > a{ 30 | > a{ 31 | color: #fff; 32 | } 33 | } 34 | } 35 | 36 | @media screen and (min-width: 991px){ 37 | .footer .copyright { 38 | float: right; 39 | } 40 | } 41 | 42 | @media screen and (max-width: 991px) { 43 | .footer nav { 44 | display: block; 45 | float: none; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/js/plugins/jcfilter.min.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.jcOnPageFilter=function(a){a=jQuery.extend({animateHideNShow:false,focusOnLoad:false,highlightColor:"yellow",textColorForHighlights:"#000000",caseSensitive:false,hideNegatives:false,parentLookupClass:"jcorgFilterTextParent",childBlockClass:"jcorgFilterTextChild"},a);jQuery.expr[":"].icontains=function(a,b,c){return jQuery(a).text().toUpperCase().indexOf(c[3].toUpperCase())>=0};if(a.focusOnLoad){jQuery(this).focus()}var b=/()(.+?)(<\/span>)/g;var c="g";if(!a.caseSensitive){b=/()(.+?)(<\/span>)/gi;c="gi"}return this.each(function(){jQuery(this).keyup(function(d){if(d.which&&d.which==13||d.keyCode&&d.keyCode==13){return false}else{var e=jQuery(this).val();if(e.length>0){if(a.hideNegatives){if(a.animateHideNShow){jQuery("."+a.parentLookupClass).stop(true,true).fadeOut("slow")}else{jQuery("."+a.parentLookupClass).stop(true,true).hide()}}var f="icontains";if(a.caseSensitive){f="contains"}jQuery.each(jQuery("."+a.childBlockClass),function(a,c){jQuery(c).html(jQuery(c).html().replace(new RegExp(b),"$2"))});jQuery.each(jQuery("."+a.childBlockClass+":"+f+"("+e+")"),function(b,d){if(a.hideNegatives){if(a.animateHideNShow){jQuery(d).parent().stop(true,true).fadeIn("slow")}else{jQuery(d).parent().stop(true,true).show()}}var f=jQuery(d).html();jQuery(d).html(f.replace(new RegExp(e,c),function(b){return["",b,""].join("")}))})}else{jQuery.each(jQuery("."+a.childBlockClass),function(a,c){var d=jQuery(c).html().replace(new RegExp(b),"$2");jQuery(c).html(d)});if(a.hideNegatives){if(a.animateHideNShow){jQuery("."+a.parentLookupClass).stop(true,true).fadeIn("slow")}else{jQuery("."+a.parentLookupClass).stop(true,true).show()}}}}})})} 2 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/scss/bs4-cheatsheet/_collapse.scss: -------------------------------------------------------------------------------- 1 | .card{ 2 | &.card-collapse{ 3 | border: none; 4 | background-color: transparent; 5 | border-radius: 10px; 6 | transition: background-color 170ms ease-in; 7 | margin-bottom: 10px; 8 | 9 | &.active{ 10 | background-color: #fff; 11 | box-shadow: 0px 10px 50px 0px rgba(0, 0, 0, 0.2); 12 | 13 | .card-header{ 14 | h2{ 15 | > a{ 16 | color: #3C4858; 17 | 18 | i{ 19 | opacity: 1; 20 | } 21 | } 22 | } 23 | } 24 | } 25 | 26 | .card-header{ 27 | padding: 0; 28 | background-color: transparent; 29 | border-bottom: none; 30 | 31 | h2{ 32 | > a{ 33 | padding: .5rem 1rem; 34 | display: block; 35 | color: #fff; 36 | font-size: 13px; 37 | letter-spacing: 1px; 38 | text-transform: uppercase; 39 | transition: none; 40 | 41 | i{ 42 | opacity: 0; 43 | float: right; 44 | position: relative; 45 | top: 4px; 46 | color: #3C4858; 47 | transition: transform 170ms ease-in, opacity 170ms ease-in; 48 | } 49 | 50 | &[aria-expanded="true"]{ 51 | i{ 52 | -webkit-transform: rotate(180deg); 53 | -ms-transform: rotate(180deg); 54 | transform: rotate(180deg); 55 | } 56 | } 57 | 58 | &:hover, 59 | &focus{ 60 | color: inherit; 61 | } 62 | 63 | .jcorgFilterTextChild{ 64 | display: inline-block; 65 | } 66 | } 67 | } 68 | 69 | & + div .card-block{ 70 | border-top: 1px solid rgba(0,0,0,.125); 71 | padding-left: 12px; 72 | padding-right: 12px; 73 | 74 | ul{ 75 | padding: 0; 76 | margin: 0; 77 | text-decoration: none; 78 | list-style: none; 79 | 80 | li > a{ 81 | padding: 5px 15px; 82 | display: block; 83 | color: #3C4858; 84 | font-size: 14px; 85 | border-radius: 4px; 86 | transition: background-color 100ms linear, color 100ms linear; 87 | text-decoration: none; 88 | 89 | &:hover, 90 | &:focus, 91 | &.active{ 92 | background-color: rgba(220,220,220, .425); 93 | } 94 | } 95 | 96 | li:not(:last-child) a{ 97 | margin-bottom: 5px; 98 | } 99 | } 100 | } 101 | } 102 | 103 | &:hover, 104 | &:focus{ 105 | background-color: #fff; 106 | box-shadow: 0px 10px 50px 0px rgba(0, 0, 0, 0.2); 107 | 108 | h2{ 109 | > a{ 110 | color: #3C4858; 111 | 112 | i{ 113 | color: #3C4858; 114 | opacity: 1; 115 | } 116 | } 117 | } 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/scss/bs4-cheatsheet/_cheatsheet.scss: -------------------------------------------------------------------------------- 1 | .main{ 2 | background: url('../img/header.jpg') no-repeat center center fixed; 3 | background-size: cover; 4 | height: auto; 5 | min-height: 100%; 6 | min-width: 100%; 7 | width: auto; 8 | z-index: -1; 9 | top: 0; 10 | position: absolute; 11 | 12 | &:before{ 13 | display: block; 14 | content: ""; 15 | position: absolute; 16 | width: 100%; 17 | height: 100%; 18 | top: 0; 19 | left: 0; 20 | z-index: 0; 21 | opacity: .73; 22 | background: #000000; 23 | } 24 | 25 | .header{ 26 | & + div{ 27 | margin-top: 80px; 28 | margin-bottom: 100px; 29 | } 30 | 31 | .brand { 32 | text-align: center; 33 | margin-top: 100px; 34 | 35 | h2 { 36 | color: #fff; 37 | font-size: 2.8rem; 38 | font-weight: 600; 39 | } 40 | 41 | .btn{ 42 | cursor: pointer; 43 | } 44 | } 45 | } 46 | 47 | // a{ 48 | // &:hover, 49 | // &:focus{ 50 | // color: #fff; 51 | // } 52 | // } 53 | } 54 | 55 | #accordion .row + .row{ 56 | margin-top: 60px; 57 | } 58 | 59 | .navbar p{ 60 | margin-bottom: 0; 61 | } 62 | 63 | .hidden{ 64 | opacity: 0; 65 | visibility: hidden; 66 | position: absolute; 67 | display: none; 68 | } 69 | 70 | .col-md-3:not(:last-child){ 71 | &:before{ 72 | content: ""; 73 | width: 1px; 74 | position: absolute; 75 | right: 0; 76 | height: 100%; 77 | background-color: rgba(255,255,255, .2); 78 | } 79 | } 80 | 81 | .show-highlight{ 82 | .card.card-collapse .card-header{ 83 | & + div .card-block ul li.bootstrap4-new > a{ 84 | &{ 85 | transition: background-color 170ms ease-in, color 170ms ease-in; 86 | } 87 | 88 | &, 89 | &:hover, 90 | &:focus{ 91 | background-color: #00bcd4; 92 | color: #fff; 93 | } 94 | } 95 | } 96 | } 97 | 98 | .html-code{ 99 | display: none; 100 | } 101 | 102 | .share-plugin{ 103 | position: fixed; 104 | height: auto; 105 | width: 50px; 106 | background-color: #fff; 107 | left: 0; 108 | top: 154px; 109 | border-top-right-radius: 4px; 110 | border-bottom-right-radius: 4px; 111 | 112 | ul{ 113 | list-style-type: none; 114 | padding: 0; 115 | margin: 0; 116 | 117 | li > a{ 118 | display: block; 119 | text-align: -webkit-center; 120 | padding: 13px; 121 | transition: background-color 170ms ease-in; 122 | 123 | i{ 124 | color: #fff; 125 | font-size: 20px; 126 | vertical-align: middle; 127 | } 128 | 129 | &.facebook-sharrre-nav{ 130 | background-color: #3b5998; 131 | border-top-right-radius: 3px; 132 | 133 | &:hover, 134 | &:focus{ 135 | background-color: lighten(#3b5998, 5%); 136 | } 137 | } 138 | 139 | &.pinterest-sharrre-nav{ 140 | background-color: #cb2027; 141 | 142 | &:hover, 143 | &:focus{ 144 | background-color: lighten(#cb2027, 5%); 145 | } 146 | } 147 | 148 | &.google-sharrre-nav{ 149 | background-color: #dd4b39; 150 | 151 | &:hover, 152 | &:focus{ 153 | background-color: lighten(#dd4b39, 5%); 154 | } 155 | } 156 | 157 | &.twitter-sharrre-nav{ 158 | background-color: #00aced; 159 | border-bottom-right-radius: 3px; 160 | 161 | &:hover, 162 | &:focus{ 163 | background-color: lighten(#00aced, 5%); 164 | } 165 | } 166 | } 167 | } 168 | } 169 | 170 | .bg-transparent{ 171 | background-color: transparent; 172 | color: #fff; 173 | 174 | & .navbar-nav .nav-link, 175 | & .navbar-brand, 176 | & .navbar-brand:focus, 177 | & .navbar-brand:hover, 178 | & .navbar-toggler, 179 | & .navbar-nav .nav-link:focus, 180 | & .navbar-nav .nav-link:hover{ 181 | color: #fff; 182 | } 183 | } 184 | 185 | .container-editor{ 186 | height: 280px; 187 | width: 100%; 188 | padding: 10px 15px; 189 | position: fixed; 190 | overflow: scroll; 191 | bottom: 0; 192 | transform: translate3d(0,280px,0); 193 | background-color: gray; 194 | z-index: 9999; 195 | transition: transform 170ms linear; 196 | 197 | .material-icons{ 198 | position: absolute; 199 | right: 25px; 200 | top: 8px; 201 | color: #fff; 202 | opacity: .5; 203 | cursor: pointer; 204 | transition: opacity 170ms linear; 205 | 206 | &:hover, 207 | &:focus{ 208 | opacity: 1; 209 | } 210 | } 211 | 212 | &.open{ 213 | transform: translate3d(0,0px,0); 214 | } 215 | 216 | .editor-left, 217 | .return-right{ 218 | width: 48%; 219 | height: 200px; 220 | max-height: 200px; 221 | 222 | > h5{ 223 | color: #fff; 224 | } 225 | } 226 | 227 | .editor-left{ 228 | float: left; 229 | } 230 | 231 | .return-right{ 232 | float: right; 233 | } 234 | 235 | #editor, 236 | #return{ 237 | height: 100%; 238 | width: 100%; 239 | position: relative; 240 | margin: 0; 241 | border-radius: 4px; 242 | box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.5); 243 | } 244 | 245 | #return{ 246 | background-color: #fff; 247 | padding: 10px; 248 | overflow: scroll; 249 | 250 | .navbar.fixed-top, 251 | .navbar.fixed-bottom{ 252 | position: absolute; 253 | } 254 | 255 | .card{ 256 | max-width: 320px; 257 | } 258 | } 259 | } 260 | 261 | @media screen and (max-width: 768px) { 262 | .col-md-3{ 263 | &:before{ 264 | display: none; 265 | } 266 | } 267 | 268 | .editor-left, 269 | .return-right{ 270 | width: 100% !important; 271 | } 272 | 273 | .editor-left{ 274 | margin-bottom:100px; 275 | } 276 | 277 | #return{ 278 | margin-bottom: 10px !important; 279 | } 280 | 281 | .card-block .row .col-md-4:not(:last-child){ 282 | margin-bottom: 10px; 283 | } 284 | } 285 | 286 | @media screen and (max-width: 900px) { 287 | .share-plugin{ 288 | display: none; 289 | } 290 | } 291 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/js/bs4-cheatsheet.js: -------------------------------------------------------------------------------- 1 | var card_collapse = 0; 2 | 3 | $(document).ready(function(){ 4 | // Activate the Tooltips 5 | $('[data-toggle="tooltip"], [rel="tooltip"]').tooltip(); 6 | 7 | $('.brand input').focusin(function(){ 8 | $(this).parent().addClass('is-focused'); 9 | }).focusout(function(){ 10 | $(this).parent().removeClass('is-focused'); 11 | }); 12 | 13 | $('.modal').appendTo('body'); 14 | 15 | if($(window).width() < 991 && $('.navbar').hasClass('bg-transparent')){ 16 | $('.navbar').removeClass('bg-transparent').addClass('bg-faded'); 17 | } 18 | 19 | if($('.twitter-sharrre-nav').length != 0){ 20 | $('.twitter-sharrre-nav').sharrre({ 21 | share: { 22 | twitter: true 23 | }, 24 | enableHover: false, 25 | enableTracking: true, 26 | enableCounter: false, 27 | buttons: { twitter: {via: 'BootstrapBay'}}, 28 | click: function(api, options){ 29 | api.simulateClick(); 30 | api.openPopup('twitter'); 31 | }, 32 | template: '

Twitter

', 33 | url: 'https://www.creative-tim.com/cheatsheet/bootstrap4' 34 | }); 35 | } 36 | 37 | if($('.facebook-sharrre-nav').length != 0){ 38 | $('.facebook-sharrre-nav').sharrre({ 39 | share: { 40 | facebook: true 41 | }, 42 | enableHover: false, 43 | enableTracking: true, 44 | enableCounter: false, 45 | click: function(api, options){ 46 | api.simulateClick(); 47 | api.openPopup('facebook'); 48 | }, 49 | template: '

Facebook

', 50 | url: 'https://www.creative-tim.com/cheatsheet/bootstrap4' 51 | }); 52 | } 53 | 54 | if($('.google-sharrre-nav').length != 0){ 55 | $('.google-sharrre-nav').sharrre({ 56 | share: { 57 | googlePlus: true 58 | }, 59 | enableCounter: false, 60 | enableHover: false, 61 | enableTracking: true, 62 | click: function(api, options){ 63 | api.simulateClick(); 64 | api.openPopup('googlePlus'); 65 | }, 66 | template: '

LinkedIn

', 67 | url: 'https://www.creative-tim.com/cheatsheet/bootstrap4' 68 | }); 69 | } 70 | 71 | if($('.pinterest-sharrre-nav').length != 0){ 72 | $('.pinterest-sharrre-nav').sharrre({ 73 | share: { 74 | pinterest: true 75 | }, 76 | enableCounter: false, 77 | enableHover: false, 78 | enableTracking: true, 79 | click: function(api, options){ 80 | api.simulateClick(); 81 | api.openPopup('pinterest'); 82 | }, 83 | template: '

LinkedIn

', 84 | url: 'https://www.creative-tim.com/cheatsheet/bootstrap4' 85 | }); 86 | } 87 | 88 | var $input = $('.main .brand').find("#filter"); 89 | $input.jcOnPageFilter({ 90 | animateHideNShow: true, 91 | focusOnLoad: false, 92 | highlightColor: "yellow", 93 | textColorForHighlights: "#000000", 94 | caseSensitive: false, 95 | hideNegatives: false, 96 | childBlockClass: "jcorgFilterTextChild" 97 | }); 98 | 99 | card_collapse = $('.card-collapse'); 100 | SetCard(card_collapse); 101 | }); 102 | 103 | function materialInit(){ 104 | $.material.init(); 105 | } 106 | 107 | $(window).on("resize", function(){ 108 | if($(window).width() < 992){ 109 | $('.navbar').removeClass('bg-transparent').addClass('bg-faded'); 110 | } else { 111 | $('.navbar').addClass('bg-transparent').removeClass('bg-faded'); 112 | } 113 | }); 114 | 115 | $(document).on('click', '#expand-all', function(){ 116 | $(this).html('Collapse-all'); 117 | $(this).attr('id', 'collapse-all').attr('class', 'btn btn-info btn-block'); 118 | 119 | $('.card-collapse').addClass('active'); 120 | $('.card-collapse .card-header').siblings('.collapse').addClass('show'); 121 | }); 122 | 123 | $(document).on('click', '#collapse-all', function(){ 124 | $(this).html('Expand-all'); 125 | $(this).attr('id', 'expand-all').attr('class', 'btn btn-default btn-block'); 126 | 127 | if($('.card-collapse.active').length != 0){ 128 | $('.card-collapse').removeClass('active'); 129 | $('.card-collapse .card-header').siblings('.collapse').removeClass('show'); 130 | } 131 | }); 132 | 133 | $(document).on('click', '#new', function(){ 134 | $('body').toggleClass('show-highlight'); 135 | 136 | if($('body').hasClass('show-highlight')){ 137 | $('.card-collapse').addClass('active'); 138 | $('.card-collapse .card-header').siblings('.collapse').addClass('show'); 139 | 140 | $(this).attr('class', 'btn btn-info btn-block'); 141 | $('#expand-all').html('Collapse-all').attr('id', 'collapse-all').attr('class', 'btn btn-info btn-block'); 142 | } else{ 143 | $(this).attr('class', 'btn btn-default btn-block'); 144 | } 145 | }); 146 | 147 | $(document).on('click', '#close', function(){ 148 | $(this).parent().removeClass('open'); 149 | }); 150 | 151 | $(document).on('click', '.card-block li > a', function(){ 152 | var attr = $(this).attr('data-html'); 153 | 154 | if(typeof attr !== typeof undefined && attr !== false){ 155 | $html_container = $($(this).data('html')); 156 | } else { 157 | $html_container = $(this).siblings('.html-code'); 158 | } 159 | 160 | $('.card-block').find('a').removeClass('active'); 161 | $(this).addClass('active'); 162 | 163 | var html_code = $html_container.html(); 164 | // $('.editor-preview #editor').html(html_code); 165 | 166 | $('.container-editor').addClass('open'); 167 | 168 | editor = ace.edit("editor"); 169 | editor.setTheme("ace/theme/twilight"); 170 | editor.session.setMode("ace/mode/html"); 171 | 172 | editor.setValue(html_code); 173 | 174 | function showHTML() { 175 | $('#return').html(editor.getValue()); 176 | } 177 | 178 | editor.on("input", showHTML); 179 | showHTML(); 180 | }); 181 | 182 | 183 | 184 | 185 | $("#filter").keyup(function(){ 186 | $('.card-collapse').removeClass('active'); 187 | $('.card-header').siblings('.collapse').removeClass('show'); 188 | $('.card-collapse').removeClass('hidden'); 189 | setTimeout(function(){ 190 | if($('.jcorgFilterTextChild').children('span').length != 0){ 191 | $('.jcorgFilterTextChild').each(function(){ 192 | if($(this).children('span').length != 0) { 193 | $(this).children('span').closest('.card-collapse').removeClass('hidden'); 194 | $(this).children('span').closest('.card-collapse').addClass('active'); 195 | $(this).children('span').closest('.card-header').siblings('.collapse').addClass('show'); 196 | $(this).children('span').closest('.card-block').closest('.collapse').addClass('show'); 197 | } 198 | }); 199 | 200 | $('.card-collapse:not(.active)').addClass('hidden'); 201 | SetCard($('.card-collapse.active')); 202 | }else{ 203 | SetCard(card_collapse); 204 | } 205 | }, 100); 206 | }); 207 | 208 | 209 | function SetCard(cards){ 210 | $('.card-collapse.active').remove(); 211 | 212 | var nr = 1; 213 | 214 | cards.each(function(){ 215 | if(nr == 1){ 216 | $('#col1').append($(this)); 217 | nr = 2; 218 | } else if(nr == 2){ 219 | $('#col2').append($(this)); 220 | nr = 3; 221 | } else if(nr == 3){ 222 | $('#col3').append($(this)); 223 | nr = 4; 224 | } else if(nr == 4){ 225 | $('#col4').append($(this)); 226 | nr = 1; 227 | } 228 | }); 229 | 230 | initCardCollapse(); 231 | } 232 | 233 | function initCardCollapse(){ 234 | $('.card.card-collapse > .collapse.show').each(function(){ 235 | $(this).parent().addClass('active'); 236 | }); 237 | 238 | $('.card.card-collapse .collapse').on('show.bs.collapse', function(){ 239 | $(this).parent().addClass('active'); 240 | }).on('hidden.bs.collapse', function(){ 241 | console.log("ajunge"); 242 | $(this).parent().removeClass('active'); 243 | }); 244 | } 245 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/css/bs4-cheatsheet.css: -------------------------------------------------------------------------------- 1 | .navbar { 2 | transition: none; 3 | } 4 | .navbar .navbar-collapse .navbar-nav .nav-item .nav-link p { 5 | display: inline-block; 6 | } 7 | .navbar button { 8 | outline: none; 9 | cursor: pointer; 10 | } 11 | 12 | @media screen and (max-width: 576px) { 13 | .navbar[class*='navbar-toggleable-'] .container { 14 | margin-left: 0; 15 | margin-right: 0; 16 | } 17 | } 18 | .card.card-collapse { 19 | border: none; 20 | background-color: transparent; 21 | border-radius: 10px; 22 | transition: background-color 170ms ease-in; 23 | margin-bottom: 10px; 24 | } 25 | .card.card-collapse.active { 26 | background-color: #fff; 27 | box-shadow: 0px 10px 50px 0px rgba(0, 0, 0, 0.2); 28 | } 29 | .card.card-collapse.active .card-header h2 > a { 30 | color: #3C4858; 31 | } 32 | .card.card-collapse.active .card-header h2 > a i { 33 | opacity: 1; 34 | } 35 | .card.card-collapse .card-header { 36 | padding: 0; 37 | background-color: transparent; 38 | border-bottom: none; 39 | } 40 | .card.card-collapse .card-header h2 > a { 41 | padding: .5rem 1rem; 42 | display: block; 43 | color: #fff; 44 | font-size: 13px; 45 | letter-spacing: 1px; 46 | text-transform: uppercase; 47 | transition: none; 48 | } 49 | .card.card-collapse .card-header h2 > a i { 50 | opacity: 0; 51 | float: right; 52 | position: relative; 53 | top: 4px; 54 | color: #3C4858; 55 | transition: transform 170ms ease-in, opacity 170ms ease-in; 56 | } 57 | .card.card-collapse .card-header h2 > a[aria-expanded="true"] i { 58 | -webkit-transform: rotate(180deg); 59 | -ms-transform: rotate(180deg); 60 | transform: rotate(180deg); 61 | } 62 | .card.card-collapse .card-header h2 > a:hover, .card.card-collapse .card-header h2 > afocus { 63 | color: inherit; 64 | } 65 | .card.card-collapse .card-header h2 > a .jcorgFilterTextChild { 66 | display: inline-block; 67 | } 68 | .card.card-collapse .card-header + div .card-block { 69 | border-top: 1px solid rgba(0, 0, 0, 0.125); 70 | padding-left: 12px; 71 | padding-right: 12px; 72 | } 73 | .card.card-collapse .card-header + div .card-block ul { 74 | padding: 0; 75 | margin: 0; 76 | text-decoration: none; 77 | list-style: none; 78 | } 79 | .card.card-collapse .card-header + div .card-block ul li > a { 80 | padding: 5px 15px; 81 | display: block; 82 | color: #3C4858; 83 | font-size: 14px; 84 | border-radius: 4px; 85 | transition: background-color 100ms linear, color 100ms linear; 86 | text-decoration: none; 87 | } 88 | .card.card-collapse .card-header + div .card-block ul li > a:hover, .card.card-collapse .card-header + div .card-block ul li > a:focus, .card.card-collapse .card-header + div .card-block ul li > a.active { 89 | background-color: rgba(220, 220, 220, 0.425); 90 | } 91 | .card.card-collapse .card-header + div .card-block ul li:not(:last-child) a { 92 | margin-bottom: 5px; 93 | } 94 | .card.card-collapse:hover, .card.card-collapse:focus { 95 | background-color: #fff; 96 | box-shadow: 0px 10px 50px 0px rgba(0, 0, 0, 0.2); 97 | } 98 | .card.card-collapse:hover h2 > a, .card.card-collapse:focus h2 > a { 99 | color: #3C4858; 100 | } 101 | .card.card-collapse:hover h2 > a i, .card.card-collapse:focus h2 > a i { 102 | color: #3C4858; 103 | opacity: 1; 104 | } 105 | 106 | .main { 107 | background: url("../img/header.jpg") no-repeat center center fixed; 108 | background-size: cover; 109 | height: auto; 110 | min-height: 100%; 111 | min-width: 100%; 112 | width: auto; 113 | z-index: -1; 114 | top: 0; 115 | position: absolute; 116 | } 117 | .main:before { 118 | display: block; 119 | content: ""; 120 | position: absolute; 121 | width: 100%; 122 | height: 100%; 123 | top: 0; 124 | left: 0; 125 | z-index: 0; 126 | opacity: .73; 127 | background: #000000; 128 | } 129 | .main .header + div { 130 | margin-top: 80px; 131 | margin-bottom: 100px; 132 | } 133 | .main .header .brand { 134 | text-align: center; 135 | margin-top: 100px; 136 | } 137 | .main .header .brand h2 { 138 | color: #fff; 139 | font-size: 2.8rem; 140 | font-weight: 600; 141 | } 142 | .main .header .brand .btn { 143 | cursor: pointer; 144 | } 145 | 146 | #accordion .row + .row { 147 | margin-top: 60px; 148 | } 149 | 150 | .navbar p { 151 | margin-bottom: 0; 152 | } 153 | 154 | .hidden { 155 | opacity: 0; 156 | visibility: hidden; 157 | position: absolute; 158 | display: none; 159 | } 160 | 161 | .col-md-3:not(:last-child):before { 162 | content: ""; 163 | width: 1px; 164 | position: absolute; 165 | right: 0; 166 | height: 100%; 167 | background-color: rgba(255, 255, 255, 0.2); 168 | } 169 | 170 | .show-highlight .card.card-collapse .card-header + div .card-block ul li.bootstrap4-new > a { 171 | transition: background-color 170ms ease-in, color 170ms ease-in; 172 | } 173 | .show-highlight .card.card-collapse .card-header + div .card-block ul li.bootstrap4-new > a, .show-highlight .card.card-collapse .card-header + div .card-block ul li.bootstrap4-new > a:hover, .show-highlight .card.card-collapse .card-header + div .card-block ul li.bootstrap4-new > a:focus { 174 | background-color: #00bcd4; 175 | color: #fff; 176 | } 177 | 178 | .html-code { 179 | display: none; 180 | } 181 | 182 | .share-plugin { 183 | position: fixed; 184 | height: auto; 185 | width: 50px; 186 | background-color: #fff; 187 | left: 0; 188 | top: 154px; 189 | border-top-right-radius: 4px; 190 | border-bottom-right-radius: 4px; 191 | } 192 | .share-plugin ul { 193 | list-style-type: none; 194 | padding: 0; 195 | margin: 0; 196 | } 197 | .share-plugin ul li > a { 198 | display: block; 199 | text-align: -webkit-center; 200 | padding: 13px; 201 | transition: background-color 170ms ease-in; 202 | } 203 | .share-plugin ul li > a i { 204 | color: #fff; 205 | font-size: 20px; 206 | vertical-align: middle; 207 | } 208 | .share-plugin ul li > a.facebook-sharrre-nav { 209 | background-color: #3b5998; 210 | border-top-right-radius: 3px; 211 | } 212 | .share-plugin ul li > a.facebook-sharrre-nav:hover, .share-plugin ul li > a.facebook-sharrre-nav:focus { 213 | background-color: #4264aa; 214 | } 215 | .share-plugin ul li > a.pinterest-sharrre-nav { 216 | background-color: #cb2027; 217 | } 218 | .share-plugin ul li > a.pinterest-sharrre-nav:hover, .share-plugin ul li > a.pinterest-sharrre-nav:focus { 219 | background-color: #dd272f; 220 | } 221 | .share-plugin ul li > a.google-sharrre-nav { 222 | background-color: #dd4b39; 223 | } 224 | .share-plugin ul li > a.google-sharrre-nav:hover, .share-plugin ul li > a.google-sharrre-nav:focus { 225 | background-color: #e15f4f; 226 | } 227 | .share-plugin ul li > a.twitter-sharrre-nav { 228 | background-color: #00aced; 229 | border-bottom-right-radius: 3px; 230 | } 231 | .share-plugin ul li > a.twitter-sharrre-nav:hover, .share-plugin ul li > a.twitter-sharrre-nav:focus { 232 | background-color: #08bbff; 233 | } 234 | 235 | .bg-transparent { 236 | background-color: transparent; 237 | color: #fff; 238 | } 239 | .bg-transparent .navbar-nav .nav-link, .bg-transparent .navbar-brand, .bg-transparent .navbar-brand:focus, .bg-transparent .navbar-brand:hover, .bg-transparent .navbar-toggler, .bg-transparent .navbar-nav .nav-link:focus, .bg-transparent .navbar-nav .nav-link:hover { 240 | color: #fff; 241 | } 242 | 243 | .container-editor { 244 | height: 280px; 245 | width: 100%; 246 | padding: 10px 15px; 247 | position: fixed; 248 | overflow: scroll; 249 | bottom: 0; 250 | transform: translate3d(0, 280px, 0); 251 | background-color: gray; 252 | z-index: 9999; 253 | transition: transform 170ms linear; 254 | } 255 | .container-editor .material-icons { 256 | position: absolute; 257 | right: 25px; 258 | top: 8px; 259 | color: #fff; 260 | opacity: .5; 261 | cursor: pointer; 262 | transition: opacity 170ms linear; 263 | } 264 | .container-editor .material-icons:hover, .container-editor .material-icons:focus { 265 | opacity: 1; 266 | } 267 | .container-editor.open { 268 | transform: translate3d(0, 0px, 0); 269 | } 270 | .container-editor .editor-left, 271 | .container-editor .return-right { 272 | width: 48%; 273 | height: 200px; 274 | max-height: 200px; 275 | } 276 | .container-editor .editor-left > h5, 277 | .container-editor .return-right > h5 { 278 | color: #fff; 279 | } 280 | .container-editor .editor-left { 281 | float: left; 282 | } 283 | .container-editor .return-right { 284 | float: right; 285 | } 286 | .container-editor #editor, 287 | .container-editor #return { 288 | height: 100%; 289 | width: 100%; 290 | position: relative; 291 | margin: 0; 292 | border-radius: 4px; 293 | box-shadow: 0px 5px 25px 0px rgba(0, 0, 0, 0.5); 294 | } 295 | .container-editor #return { 296 | background-color: #fff; 297 | padding: 10px; 298 | overflow: scroll; 299 | } 300 | .container-editor #return .navbar.fixed-top, 301 | .container-editor #return .navbar.fixed-bottom { 302 | position: absolute; 303 | } 304 | .container-editor #return .card { 305 | max-width: 320px; 306 | } 307 | 308 | @media screen and (max-width: 768px) { 309 | .col-md-3:before { 310 | display: none; 311 | } 312 | 313 | .editor-left, 314 | .return-right { 315 | width: 100% !important; 316 | } 317 | 318 | .editor-left { 319 | margin-bottom: 100px; 320 | } 321 | 322 | #return { 323 | margin-bottom: 10px !important; 324 | } 325 | 326 | .card-block .row .col-md-4:not(:last-child) { 327 | margin-bottom: 10px; 328 | } 329 | } 330 | @media screen and (max-width: 900px) { 331 | .share-plugin { 332 | display: none; 333 | } 334 | } 335 | .footer { 336 | color: #ffffff; 337 | background-color: transparent; 338 | padding: 10px 15px; 339 | } 340 | .footer nav { 341 | display: inline-block; 342 | float: left; 343 | line-height: 2.4; 344 | } 345 | .footer ul { 346 | margin-bottom: 0; 347 | padding: 0; 348 | list-style: none; 349 | } 350 | .footer ul li { 351 | display: inline-block; 352 | } 353 | .footer:after { 354 | display: table; 355 | clear: both; 356 | content: " "; 357 | } 358 | .footer .copyright > a, 359 | .footer nav ul li > a > a { 360 | color: #fff; 361 | } 362 | 363 | @media screen and (min-width: 991px) { 364 | .footer .copyright { 365 | float: right; 366 | } 367 | } 368 | @media screen and (max-width: 991px) { 369 | .footer nav { 370 | display: block; 371 | float: none; 372 | } 373 | } 374 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/js/material.min.js: -------------------------------------------------------------------------------- 1 | ! function(t) { 2 | function o(t) { 3 | return "undefined" == typeof t.which ? !0 : "number" == typeof t.which && t.which > 0 ? !t.ctrlKey && !t.metaKey && !t.altKey && 8 != t.which && 9 != t.which && 13 != t.which && 16 != t.which && 17 != t.which && 20 != t.which && 27 != t.which : !1 4 | } 5 | 6 | function i(o) { 7 | var i = t(o); 8 | i.prop("disabled") || i.closest(".form-group").addClass("is-focused") 9 | } 10 | 11 | function n(o) { 12 | o.closest("label").hover(function() { 13 | var o = t(this).find("input"); 14 | o.prop("disabled") || i(o) 15 | }, function() { 16 | e(t(this).find("input")) 17 | }) 18 | } 19 | 20 | function e(o) { 21 | t(o).closest(".form-group").removeClass("is-focused") 22 | } 23 | t.expr[":"].notmdproc = function(o) { 24 | return t(o).data("mdproc") ? !1 : !0 25 | }, t.material = { 26 | options: { 27 | validate: !0, 28 | input: !0, 29 | ripples: !0, 30 | checkbox: !0, 31 | togglebutton: !0, 32 | radio: !0, 33 | arrive: !0, 34 | autofill: !1, 35 | withRipples: [".btn:not(.btn-link)", ".card-image", ".navbar a:not(.withoutripple)", ".footer a:not(.withoutripple)", ".dropdown-menu a", ".nav-tabs a:not(.withoutripple)", ".withripple", ".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","), 36 | inputElements: "#filter", 37 | checkboxElements: ".checkbox > label > input[type=checkbox]", 38 | togglebuttonElements: ".togglebutton > label > input[type=checkbox]", 39 | radioElements: ".radio > label > input[type=radio]" 40 | }, 41 | checkbox: function(o) { 42 | var i = t(o ? o : this.options.checkboxElements).filter(":notmdproc").data("mdproc", !0).after(""); 43 | n(i) 44 | }, 45 | togglebutton: function(o) { 46 | var i = t(o ? o : this.options.togglebuttonElements).filter(":notmdproc").data("mdproc", !0).after(""); 47 | n(i) 48 | }, 49 | radio: function(o) { 50 | var i = t(o ? o : this.options.radioElements).filter(":notmdproc").data("mdproc", !0).after(""); 51 | n(i) 52 | }, 53 | input: function(o) { 54 | t(o ? o : this.options.inputElements).filter(":notmdproc").data("mdproc", !0).each(function() { 55 | var o = t(this), 56 | i = o.closest(".form-group"); 57 | 0 === i.length && (o.wrap("
"), i = o.closest(".form-group")), o.attr("data-hint") && (o.after("

" + o.attr("data-hint") + "

"), o.removeAttr("data-hint")); 58 | var n = { 59 | "input-lg": "form-group-lg", 60 | "input-sm": "form-group-sm" 61 | }; 62 | if (t.each(n, function(t, n) { 63 | o.hasClass(t) && (o.removeClass(t), i.addClass(n)) 64 | }), o.hasClass("floating-label")) { 65 | var e = o.attr("placeholder"); 66 | o.attr("placeholder", null).removeClass("floating-label"); 67 | var a = o.attr("id"), 68 | r = ""; 69 | a && (r = "for='" + a + "'"), i.addClass("label-floating"), o.after("") 70 | }(null === o.val() || "undefined" == o.val() || "" === o.val()) && i.addClass("is-empty"), i.append(""), i.find("input[type=file]").length > 0 && i.addClass("is-fileinput") 71 | }) 72 | }, 73 | attachInputEventHandlers: function() { 74 | var n = this.options.validate; 75 | t(document).on("change", ".checkbox input[type=checkbox]", function() { 76 | t(this).blur() 77 | }).on("keydown paste", ".form-control", function(i) { 78 | o(i) && t(this).closest(".form-group").removeClass("is-empty") 79 | }).on("keyup change", ".form-control", function() { 80 | var o = t(this), 81 | i = o.closest(".form-group"), 82 | e = "undefined" == typeof o[0].checkValidity || o[0].checkValidity(); 83 | "" === o.val() ? i.addClass("is-empty") : i.removeClass("is-empty"), n && (e ? i.removeClass("has-error") : i.addClass("has-error")) 84 | }).on("focus", ".form-control, .form-group.is-fileinput", function() { 85 | i(this) 86 | }).on("blur", ".form-control, .form-group.is-fileinput", function() { 87 | e(this) 88 | }).on("change", ".form-group input", function() { 89 | var o = t(this); 90 | if ("file" != o.attr("type")) { 91 | var i = o.closest(".form-group"), 92 | n = o.val(); 93 | n ? i.removeClass("is-empty") : i.addClass("is-empty") 94 | } 95 | }).on("change", ".form-group.is-fileinput input[type='file']", function() { 96 | var o = t(this), 97 | i = o.closest(".form-group"), 98 | n = ""; 99 | t.each(this.files, function(t, o) { 100 | n += o.name + ", " 101 | }), n = n.substring(0, n.length - 2), n ? i.removeClass("is-empty") : i.addClass("is-empty"), i.find("input.form-control[readonly]").val(n) 102 | }) 103 | }, 104 | ripples: function(o) { 105 | t(o ? o : this.options.withRipples).ripples() 106 | }, 107 | autofill: function() { 108 | var o = setInterval(function() { 109 | t("input[type!=checkbox]").each(function() { 110 | var o = t(this); 111 | o.val() && o.val() !== o.attr("value") && o.trigger("change") 112 | }) 113 | }, 100); 114 | setTimeout(function() { 115 | clearInterval(o) 116 | }, 1e4) 117 | }, 118 | attachAutofillEventHandlers: function() { 119 | var o; 120 | t(document).on("focus", "input", function() { 121 | var i = t(this).parents("form").find("input").not("[type=file]"); 122 | o = setInterval(function() { 123 | i.each(function() { 124 | var o = t(this); 125 | o.val() !== o.attr("value") && o.trigger("change") 126 | }) 127 | }, 100) 128 | }).on("blur", ".form-group input", function() { 129 | clearInterval(o) 130 | }) 131 | }, 132 | init: function(o) { 133 | this.options = t.extend({}, this.options, o); 134 | var i = t(document); 135 | t.fn.ripples && this.options.ripples && this.ripples(), this.options.input && (this.input(), this.attachInputEventHandlers()), this.options.checkbox && this.checkbox(), this.options.togglebutton && this.togglebutton(), this.options.radio && this.radio(), this.options.autofill && (this.autofill(), this.attachAutofillEventHandlers()), document.arrive && this.options.arrive && (t.fn.ripples && this.options.ripples && i.arrive(this.options.withRipples, function() { 136 | t.material.ripples(t(this)) 137 | }), this.options.input && i.arrive(this.options.inputElements, function() { 138 | t.material.input(t(this)) 139 | }), this.options.checkbox && i.arrive(this.options.checkboxElements, function() { 140 | t.material.checkbox(t(this)) 141 | }), this.options.radio && i.arrive(this.options.radioElements, function() { 142 | t.material.radio(t(this)) 143 | }), this.options.togglebutton && i.arrive(this.options.togglebuttonElements, function() { 144 | t.material.togglebutton(t(this)) 145 | })) 146 | } 147 | } 148 | }(jQuery), 149 | function(t, o, i, n) { 150 | "use strict"; 151 | 152 | function e(o, i) { 153 | r = this, this.element = t(o), this.options = t.extend({}, s, i), this._defaults = s, this._name = a, this.init() 154 | } 155 | var a = "ripples", 156 | r = null, 157 | s = {}; 158 | e.prototype.init = function() { 159 | var i = this.element; 160 | i.on("mousedown touchstart", function(n) { 161 | if (!r.isTouch() || "mousedown" !== n.type) { 162 | i.find(".ripple-container").length || i.append('
'); 163 | var e = i.children(".ripple-container"), 164 | a = r.getRelY(e, n), 165 | s = r.getRelX(e, n); 166 | if (a || s) { 167 | var l = r.getRipplesColor(i), 168 | p = t("
"); 169 | p.addClass("ripple").css({ 170 | left: s, 171 | top: a, 172 | "background-color": l 173 | }), e.append(p), 174 | function() { 175 | return o.getComputedStyle(p[0]).opacity 176 | }(), r.rippleOn(i, p), setTimeout(function() { 177 | r.rippleEnd(p) 178 | }, 500), i.on("mouseup mouseleave touchend", function() { 179 | p.data("mousedown", "off"), "off" === p.data("animating") && r.rippleOut(p) 180 | }) 181 | } 182 | } 183 | }) 184 | }, e.prototype.getNewSize = function(t, o) { 185 | return Math.max(t.outerWidth(), t.outerHeight()) / o.outerWidth() * 2.5 186 | }, e.prototype.getRelX = function(t, o) { 187 | var i = t.offset(); 188 | return r.isTouch() ? (o = o.originalEvent, 1 === o.touches.length ? o.touches[0].pageX - i.left : !1) : o.pageX - i.left 189 | }, e.prototype.getRelY = function(t, o) { 190 | var i = t.offset(); 191 | return r.isTouch() ? (o = o.originalEvent, 1 === o.touches.length ? o.touches[0].pageY - i.top : !1) : o.pageY - i.top 192 | }, e.prototype.getRipplesColor = function(t) { 193 | var i = t.data("ripple-color") ? t.data("ripple-color") : o.getComputedStyle(t[0]).color; 194 | return i 195 | }, e.prototype.hasTransitionSupport = function() { 196 | var t = i.body || i.documentElement, 197 | o = t.style, 198 | e = o.transition !== n || o.WebkitTransition !== n || o.MozTransition !== n || o.MsTransition !== n || o.OTransition !== n; 199 | return e 200 | }, e.prototype.isTouch = function() { 201 | return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) 202 | }, e.prototype.rippleEnd = function(t) { 203 | t.data("animating", "off"), "off" === t.data("mousedown") && r.rippleOut(t) 204 | }, e.prototype.rippleOut = function(t) { 205 | t.off(), r.hasTransitionSupport() ? t.addClass("ripple-out") : t.animate({ 206 | opacity: 0 207 | }, 100, function() { 208 | t.trigger("transitionend") 209 | }), t.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() { 210 | t.remove() 211 | }) 212 | }, e.prototype.rippleOn = function(t, o) { 213 | var i = r.getNewSize(t, o); 214 | r.hasTransitionSupport() ? o.css({ 215 | "-ms-transform": "scale(" + i + ")", 216 | "-moz-transform": "scale(" + i + ")", 217 | "-webkit-transform": "scale(" + i + ")", 218 | transform: "scale(" + i + ")" 219 | }).addClass("ripple-on").data("animating", "on").data("mousedown", "on") : o.animate({ 220 | width: 2 * Math.max(t.outerWidth(), t.outerHeight()), 221 | height: 2 * Math.max(t.outerWidth(), t.outerHeight()), 222 | "margin-left": -1 * Math.max(t.outerWidth(), t.outerHeight()), 223 | "margin-top": -1 * Math.max(t.outerWidth(), t.outerHeight()), 224 | opacity: .2 225 | }, 500, function() { 226 | o.trigger("transitionend") 227 | }) 228 | }, t.fn.ripples = function(o) { 229 | return this.each(function() { 230 | t.data(this, "plugin_" + a) || t.data(this, "plugin_" + a, new e(this, o)) 231 | }) 232 | } 233 | }(jQuery, window, document); 234 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # LICENSE-CC-BY-4.0.md - 2020 - Creative Tim (www.creative-tim.com) 2 | 3 | 4 | 5 | UNLESS OTHERWISE NOTED, THE CONTENTS OF THIS DIRECTORY ARE LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE. 6 | 7 | ![https://creativecommons.org/licenses/by/4.0/](https://i.creativecommons.org/l/by/4.0/88x31.png) ![Approved for Free Cultural Works](https://creativecommons.org/images/deed/seal.png) 8 | 9 | ## License Summary of CC-BY 4.0 International 10 | 11 | *This section is a human-readable summary of (and not a substitute for) the full license included below.* 12 | 13 | ### You are free to: 14 | 15 | * **Share** — copy and redistribute the material in any medium or format 16 | * **Adapt** — remix, transform, and build upon the material for any purpose, even commercially. 17 | 18 | The licensor cannot revoke these freedoms as long as you follow the license terms. 19 | 20 | ### Under the following terms: 21 | 22 | * ![CC-BY](https://creativecommons.org/images/deed/by.png) **Attribution** — You must give **appropriate credit**, provide **a link to the license** and [Creative Tim website](https://www.creative-tim.com), and **indicate if changes were made**. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 23 | 24 | **No additional restrictions** — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. 25 | 26 | ### Notices: 27 | 28 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable **exception or limitation**. 29 | 30 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as **publicity, privacy, or moral rights** may limit how you use the material. 31 | 32 | # Creative Commons Attribution 4.0 International License 33 | 34 | FROM: https://creativecommons.org/licenses/by/4.0/ 35 | 36 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 37 | 38 | ### Using Creative Commons Public Licenses 39 | 40 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 41 | 42 | * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). 43 | 44 | * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). 45 | 46 | ## Creative Commons Attribution 4.0 International Public License 47 | 48 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 49 | 50 | **Section 1 – Definitions.** 51 | 52 | 1. **Adapted Material** means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 53 | 2. **Adapter's License** means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 54 | 3. **Copyright and Similar Rights** means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 55 | 4. **Effective Technological Measures** means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 56 | 5. **Exceptions and Limitations** means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 57 | 6. **Licensed Material** means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 58 | 7. **Licensed Rights** means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 59 | 8. **Licensor** means the individual(s) or entity(ies) granting rights under this Public License. 60 | 9. **Share** means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 61 | 10. **Sui Generis Database Rights** means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 62 | 11. **You** means the individual or entity exercising the Licensed Rights under this Public License. **Your** has a corresponding meaning. 63 | 64 | **Section 2 – Scope.** 65 | 66 | 1. **License grant**. 67 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 68 | 1. reproduce and Share the Licensed Material, in whole or in part; and 69 | 2. produce, reproduce, and Share Adapted Material. 70 | 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 71 | 3. Term. The term of this Public License is specified in Section 6(a). 72 | 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 73 | 5. Downstream recipients. 74 | 75 | 1. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 76 | 2. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 77 | 78 | 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 79 | 2. **Other rights**. 80 | 81 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 82 | 2. Patent and trademark rights are not licensed under this Public License. 83 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. 84 | 85 | **Section 3 – License Conditions.** 86 | 87 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 88 | 89 | 1. **Attribution**. 90 | 91 | 1. If You Share the Licensed Material (including in modified form), You must: 92 | 93 | 1. retain the following if it is supplied by the Licensor with the Licensed Material: 94 | 1. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 95 | 2. a copyright notice; 96 | 3. a notice that refers to this Public License; 97 | 4. a notice that refers to the disclaimer of warranties; 98 | 5. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 99 | 2. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 100 | 3. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 101 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 102 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 103 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. 104 | 105 | **Section 4 – Sui Generis Database Rights.** 106 | 107 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 108 | 109 | 1. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; 110 | 2. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and 111 | 3. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 112 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 113 | 114 | **Section 5 – Disclaimer of Warranties and Limitation of Liability.** 115 | 116 | 1. **Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.** 117 | 2. **To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.** 118 | 3. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 119 | 120 | **Section 6 – Term and Termination.** 121 | 122 | 1. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 123 | 2. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 124 | 125 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 126 | 2. upon express reinstatement by the Licensor. 127 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 128 | 3. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 129 | 4. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 130 | 131 | **Section 7 – Other Terms and Conditions.** 132 | 133 | 1. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 134 | 2. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 135 | 136 | **Section 8 – Interpretation.** 137 | 138 | 1. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 139 | 2. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 140 | 3. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 141 | 4. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 142 | 143 | --- 144 | 145 | *Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." The text of the Creative Commons public licenses is dedicated to the public domain under the [CC0 Public Domain Dedication](http://creativecommons.org/publicdomain/zero/1.0/legalcode). Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.* 146 | 147 | *Creative Commons may be contacted at [creativecommons.org](http://creativecommons.org/).* 148 | 149 | *Additional languages available: [Bahasa Indonesia](http://creativecommons.org/licenses/by/4.0/legalcode.id), [Nederlands](http://creativecommons.org/licenses/by/4.0/legalcode.nl), [norsk](http://creativecommons.org/licenses/by/4.0/legalcode.no), [suomeksi](http://creativecommons.org/licenses/by/4.0/legalcode.fi), [te reo Māori](http://creativecommons.org/licenses/by/4.0/legalcode.mi), [українська](http://creativecommons.org/licenses/by/4.0/legalcode.uk), [日本語](http://creativecommons.org/licenses/by/4.0/legalcode.ja). Please read the [FAQ](http://wiki.creativecommons.org/FAQ#officialtranslations) for more information about official translations.* 150 | 151 | --- 152 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/js/core/tether.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.getBoundingClientRect(),o={};for(var n in e)o[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=i(r);o.top+=s.top,o.bottom+=s.top,o.left+=s.left,o.right+=s.left}}return o}function r(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function s(){A&&document.body.removeChild(A),A=null}function a(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n=i(t),r=P();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function f(t){return t.offsetParent||document.documentElement}function l(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");h(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return{width:i,height:i}}function h(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function u(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=c(t).replace(o," ");g(t,n)}}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{u(t,e);var o=c(t)+(" "+e);g(t,o)}}function p(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=c(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function c(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function g(t,e){t.setAttribute("class",e)}function m(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&p(t,o)&&u(t,o)}),e.forEach(function(e){p(t,e)||d(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function y(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function b(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function C(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function O(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=a(e),n=o,i=getComputedStyle(e);if(e=[n.left,n.top,o.width+n.left,o.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}$.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var E=function(){function t(t,e){for(var o=0;o1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&b()-t<10||(null!=o&&(clearTimeout(o),o=null),t=b(),D(),e=b()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var X={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},N=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=X[e.left]),"auto"===n&&(n=F[e.top]),{left:o,top:n}},U=function(t){var e=t.left,o=t.top;return"undefined"!=typeof H[t.left]&&(e=H[t.left]),"undefined"!=typeof H[t.top]&&(o=H[t.top]),{left:e,top:o}},V=function(t){var e=t.split(" "),o=B(e,2),n=o[0],i=o[1];return{top:n,left:i}},R=V,q=function(t){function e(t){var o=this;n(this,e),z(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),L.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return v(e,t),E(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=h(n,t);var i=this.options,s=i.element,a=i.target,f=i.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=R(this.options.targetAttachment),this.attachment=R(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return a(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=a(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.topo.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var s=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*s*(s/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>s&&this.target===document.body&&(f=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-s);return e.top=l*(s-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),L.forEach(function(e,o){e===t&&L.splice(o,1)}),0===L.length&&s()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),M(function(){"undefined"!=typeof o._addAttachClasses&&(m(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&m(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=N(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return a(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var s=this.lastSize;i=s.width,r=s.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),u=h,d=C(U(this.attachment),{width:i,height:r}),p=C(U(o),u),c=C(this.offset,{width:i,height:r}),g=C(this.targetOffset,u);d=w(d,c),p=w(p,g);for(var m=h.left+p.left-d.left,v=h.top+p.top-d.top,y=0;yT.innerWidth&&(S=this.cache("scrollbar-size",l),E.viewport.bottom-=S.height),A.body.scrollHeight>T.innerHeight&&(S=this.cache("scrollbar-size",l),E.viewport.right-=S.width),(-1===["","static"].indexOf(A.body.style.position)||-1===["","static"].indexOf(A.body.parentElement.style.position))&&(E.page.bottom=A.body.scrollHeight-v-r,E.page.right=A.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return f(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return a(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-i.width+r.right,o.bottom=A.body.scrollHeight-o.top-i.height+r.bottom,E.page.top>=o.top+r.top&&E.page.bottom>=o.bottom&&E.page.left>=o.left+r.left&&E.page.right>=o.right){var s=e.scrollTop,l=e.scrollLeft;E.offset={top:E.page.top-o.top+s-r.top,left:E.page.left-o.left+l-r.left}}}(),this.move(E),this.history.unshift(E),this.history.length>3&&this.history.pop(),e&&_(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s=0){var c=a.split(" "),m=B(c,2);u=m[0],h=m[1]}else h=u=a;var b=O(e,r);("target"===u||"both"===u)&&(ob[3]&&"bottom"===v.top&&(o-=d,v.top="top")),"together"===u&&("top"===v.top&&("bottom"===y.top&&ob[3]&&o-(s-d)>=b[1]&&(o-=s-d,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+s>b[3]?(o-=d,v.top="top",o-=s,y.top="bottom"):"bottom"===y.top&&ob[3]&&"top"===y.top?(o-=s,y.top="bottom"):ob[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(nb[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):nb[3]&&"top"===y.top&&(o-=s,y.top="bottom")),("element"===h||"both"===h)&&(nb[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],C=[];o=0?(o=b[1],w.push("top")):C.push("top")),o+s>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-s,w.push("bottom")):C.push("bottom")),n=0?(n=b[0],w.push("left")):C.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):C.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),g.push(t),w.forEach(function(e){g.push(t+"-"+e)})}(),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),g.push(t),C.forEach(function(e){g.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),M(function(){e.options.addTargetClasses!==!1&&m(e.target,g,c),m(e.element,g,c)}),{top:o,left:n}}});var j=x.Utils,a=j.getBounds,m=j.updateClasses,M=j.defer;x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return a(e.element)}),r=i.height,s=i.width,f=this.getTargetBounds(),l=o+r,h=n+s,u=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&u.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&u.push(t)});var d=[],p=[],c=["left","top","right","bottom"];return d.push(this.getClass("abutted")),c.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),u.length&&p.push(this.getClass("abutted")),u.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),M(function(){e.options.addTargetClasses!==!1&&m(e.target,p,d),m(e.element,p,d)}),!0}});var B=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=B(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),I}); -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/js/plugins/jquery.sharrre.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Sharrre.com - Make your sharing widget! 3 | * Version: beta 1.3.5 4 | * Author: Julien Hany 5 | * License: MIT http://en.wikipedia.org/wiki/MIT_License or GPLv2 http://en.wikipedia.org/wiki/GNU_General_Public_License 6 | */ 7 | 8 | ;(function ( $, window, document, undefined ) { 9 | 10 | /* Defaults 11 | ================================================== */ 12 | var pluginName = 'sharrre', 13 | defaults = { 14 | className: 'sharrre', 15 | share: { 16 | googlePlus: false, 17 | facebook: false, 18 | twitter: false, 19 | digg: false, 20 | delicious: false, 21 | stumbleupon: false, 22 | linkedin: false, 23 | pinterest: false 24 | }, 25 | shareTotal: 0, 26 | template: '', 27 | title: '', 28 | url: document.location.href, 29 | text: document.title, 30 | urlCurl: 'sharrre.php', //PHP script for google plus... 31 | count: {}, //counter by social network 32 | total: 0, //total of sharing 33 | shorterTotal: true, //show total by k or M when number is to big 34 | enableHover: true, //disable if you want to personalize hover event with callback 35 | enableCounter: true, //disable if you just want use buttons 36 | enableTracking: false, //tracking with google analitycs 37 | hover: function(){}, //personalize hover event with this callback function 38 | hide: function(){}, //personalize hide event with this callback function 39 | click: function(){}, //personalize click event with this callback function 40 | render: function(){}, //personalize render event with this callback function 41 | buttons: { //settings for buttons 42 | googlePlus : { //http://www.google.com/webmasters/+1/button/ 43 | url: '', //if you need to personnalize button url 44 | urlCount: false, //if you want to use personnalize button url on global counter 45 | size: 'medium', 46 | lang: 'en-US', 47 | annotation: '' 48 | }, 49 | facebook: { //http://developers.facebook.com/docs/reference/plugins/like/ 50 | url: '', //if you need to personalize url button 51 | urlCount: false, //if you want to use personnalize button url on global counter 52 | action: 'like', 53 | layout: 'button_count', 54 | width: '', 55 | send: 'false', 56 | faces: 'false', 57 | colorscheme: '', 58 | font: '', 59 | lang: 'en_US' 60 | }, 61 | twitter: { //http://twitter.com/about/resources/tweetbutton 62 | url: '', //if you need to personalize url button 63 | urlCount: false, //if you want to use personnalize button url on global counter 64 | count: 'horizontal', 65 | hashtags: '', 66 | via: '', 67 | related: '', 68 | lang: 'en' 69 | }, 70 | digg: { //http://about.digg.com/downloads/button/smart 71 | url: '', //if you need to personalize url button 72 | urlCount: false, //if you want to use personnalize button url on global counter 73 | type: 'DiggCompact' 74 | }, 75 | delicious: { 76 | url: '', //if you need to personalize url button 77 | urlCount: false, //if you want to use personnalize button url on global counter 78 | size: 'medium' //medium or tall 79 | }, 80 | stumbleupon: { //http://www.stumbleupon.com/badges/ 81 | url: '', //if you need to personalize url button 82 | urlCount: false, //if you want to use personnalize button url on global counter 83 | layout: '1' 84 | }, 85 | linkedin: { //http://developer.linkedin.com/plugins/share-button 86 | url: '', //if you need to personalize url button 87 | urlCount: false, //if you want to use personnalize button url on global counter 88 | counter: '' 89 | }, 90 | pinterest: { //http://pinterest.com/about/goodies/ 91 | url: '', //if you need to personalize url button 92 | media: '', 93 | description: '', 94 | layout: 'horizontal' 95 | } 96 | } 97 | }, 98 | /* Json URL to get count number 99 | ================================================== */ 100 | urlJson = { 101 | googlePlus: "", 102 | 103 | //new FQL method by Sire 104 | facebook: "https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?", 105 | //old method facebook: "http://graph.facebook.com/?id={url}&callback=?", 106 | //facebook : "http://api.ak.facebook.com/restserver.php?v=1.0&method=links.getStats&urls={url}&format=json" 107 | 108 | twitter: "http://cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?", 109 | digg: "http://services.digg.com/2.0/story.getInfo?links={url}&type=javascript&callback=?", 110 | delicious: 'http://feeds.delicious.com/v2/json/urlinfo/data?url={url}&callback=?', 111 | //stumbleupon: "http://www.stumbleupon.com/services/1.01/badge.getinfo?url={url}&format=jsonp&callback=?", 112 | stumbleupon: "", 113 | linkedin: "http://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?", 114 | pinterest: "http://api.pinterest.com/v1/urls/count.json?url={url}&callback=?" 115 | }, 116 | /* Load share buttons asynchronously 117 | ================================================== */ 118 | loadButton = { 119 | googlePlus : function(self){ 120 | var sett = self.options.buttons.googlePlus; 121 | //$(self.element).find('.buttons').append('
'); 122 | $(self.element).find('.buttons').append('
'); 123 | window.___gcfg = { 124 | lang: self.options.buttons.googlePlus.lang 125 | }; 126 | var loading = 0; 127 | if(typeof gapi === 'undefined' && loading == 0){ 128 | loading = 1; 129 | (function() { 130 | var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; 131 | po.src = '//apis.google.com/js/plusone.js'; 132 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); 133 | })(); 134 | } 135 | else{ 136 | gapi.plusone.go(); 137 | } 138 | }, 139 | facebook : function(self){ 140 | var sett = self.options.buttons.facebook; 141 | $(self.element).find('.buttons').append(''); 142 | var loading = 0; 143 | if(typeof FB === 'undefined' && loading == 0){ 144 | loading = 1; 145 | (function(d, s, id) { 146 | var js, fjs = d.getElementsByTagName(s)[0]; 147 | if (d.getElementById(id)) {return;} 148 | js = d.createElement(s); js.id = id; 149 | js.src = '//connect.facebook.net/'+sett.lang+'/all.js#xfbml=1'; 150 | fjs.parentNode.insertBefore(js, fjs); 151 | }(document, 'script', 'facebook-jssdk')); 152 | } 153 | else{ 154 | FB.XFBML.parse(); 155 | } 156 | }, 157 | twitter : function(self){ 158 | var sett = self.options.buttons.twitter; 159 | $(self.element).find('.buttons').append(''); 160 | var loading = 0; 161 | if(typeof twttr === 'undefined' && loading == 0){ 162 | loading = 1; 163 | (function() { 164 | var twitterScriptTag = document.createElement('script'); 165 | twitterScriptTag.type = 'text/javascript'; 166 | twitterScriptTag.async = true; 167 | twitterScriptTag.src = '//platform.twitter.com/widgets.js'; 168 | var s = document.getElementsByTagName('script')[0]; 169 | s.parentNode.insertBefore(twitterScriptTag, s); 170 | })(); 171 | } 172 | else{ 173 | $.ajax({ url: '//platform.twitter.com/widgets.js', dataType: 'script', cache:true}); //http://stackoverflow.com/q/6536108 174 | } 175 | }, 176 | digg : function(self){ 177 | var sett = self.options.buttons.digg; 178 | $(self.element).find('.buttons').append('
'); 179 | var loading = 0; 180 | if(typeof __DBW === 'undefined' && loading == 0){ 181 | loading = 1; 182 | (function() { 183 | var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0]; 184 | s.type = 'text/javascript'; 185 | s.async = true; 186 | s.src = '//widgets.digg.com/buttons.js'; 187 | s1.parentNode.insertBefore(s, s1); 188 | })(); 189 | } 190 | }, 191 | delicious : function(self){ 192 | if(self.options.buttons.delicious.size == 'tall'){//tall 193 | var css = 'width:50px;', 194 | cssCount = 'height:35px;width:50px;font-size:15px;line-height:35px;', 195 | cssShare = 'height:18px;line-height:18px;margin-top:3px;'; 196 | } 197 | else{//medium 198 | var css = 'width:93px;', 199 | cssCount = 'float:right;padding:0 3px;height:20px;width:26px;line-height:20px;', 200 | cssShare = 'float:left;height:20px;line-height:20px;'; 201 | } 202 | var count = self.shorterTotal(self.options.count.delicious); 203 | if(typeof count === "undefined"){ 204 | count = 0; 205 | } 206 | $(self.element).find('.buttons').append( 207 | '
'+ 208 | '
'+count+'
'+ 209 | '
'+ 210 | 'Delicious Add
'); 211 | 212 | $(self.element).find('.delicious').on('click', function(){ 213 | self.openPopup('delicious'); 214 | }); 215 | }, 216 | stumbleupon : function(self){ 217 | var sett = self.options.buttons.stumbleupon; 218 | $(self.element).find('.buttons').append('
'); 219 | var loading = 0; 220 | if(typeof STMBLPN === 'undefined' && loading == 0){ 221 | loading = 1; 222 | (function() { 223 | var li = document.createElement('script');li.type = 'text/javascript';li.async = true; 224 | li.src = '//platform.stumbleupon.com/1/widgets.js'; 225 | var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s); 226 | })(); 227 | s = window.setTimeout(function(){ 228 | if(typeof STMBLPN !== 'undefined'){ 229 | STMBLPN.processWidgets(); 230 | clearInterval(s); 231 | } 232 | },500); 233 | } 234 | else{ 235 | STMBLPN.processWidgets(); 236 | } 237 | }, 238 | linkedin : function(self){ 239 | var sett = self.options.buttons.linkedin; 240 | $(self.element).find('.buttons').append('
'); 241 | var loading = 0; 242 | if(typeof window.IN === 'undefined' && loading == 0){ 243 | loading = 1; 244 | (function() { 245 | var li = document.createElement('script');li.type = 'text/javascript';li.async = true; 246 | li.src = '//platform.linkedin.com/in.js'; 247 | var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s); 248 | })(); 249 | } 250 | else{ 251 | window.IN.init(); 252 | } 253 | }, 254 | pinterest : function(self){ 255 | var sett = self.options.buttons.pinterest; 256 | $(self.element).find('.buttons').append(''); 257 | 258 | (function() { 259 | var li = document.createElement('script');li.type = 'text/javascript';li.async = true; 260 | li.src = '//assets.pinterest.com/js/pinit.js'; 261 | var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(li, s); 262 | })(); 263 | } 264 | }, 265 | /* Tracking for Google Analytics 266 | ================================================== */ 267 | tracking = { 268 | googlePlus: function(){}, 269 | facebook: function(){ 270 | //console.log('facebook'); 271 | fb = window.setInterval(function(){ 272 | if (typeof FB !== 'undefined') { 273 | FB.Event.subscribe('edge.create', function(targetUrl) { 274 | _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]); 275 | }); 276 | FB.Event.subscribe('edge.remove', function(targetUrl) { 277 | _gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]); 278 | }); 279 | FB.Event.subscribe('message.send', function(targetUrl) { 280 | _gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]); 281 | }); 282 | //console.log('ok'); 283 | clearInterval(fb); 284 | } 285 | },1000); 286 | }, 287 | twitter: function(){ 288 | //console.log('twitter'); 289 | tw = window.setInterval(function(){ 290 | if (typeof twttr !== 'undefined') { 291 | twttr.events.bind('tweet', function(event) { 292 | if (event) { 293 | _gaq.push(['_trackSocial', 'twitter', 'tweet']); 294 | } 295 | }); 296 | //console.log('ok'); 297 | clearInterval(tw); 298 | } 299 | },1000); 300 | }, 301 | digg: function(){ 302 | //if somenone find a solution, mail me ! 303 | /*$(this.element).find('.digg').on('click', function(){ 304 | _gaq.push(['_trackSocial', 'digg', 'add']); 305 | });*/ 306 | }, 307 | delicious: function(){}, 308 | stumbleupon: function(){}, 309 | linkedin: function(){ 310 | function LinkedInShare() { 311 | _gaq.push(['_trackSocial', 'linkedin', 'share']); 312 | } 313 | }, 314 | pinterest: function(){ 315 | //if somenone find a solution, mail me ! 316 | } 317 | }, 318 | /* Popup for each social network 319 | ================================================== */ 320 | popup = { 321 | googlePlus: function(opt){ 322 | window.open("https://plus.google.com/share?hl="+opt.buttons.googlePlus.lang+"&url="+encodeURIComponent((opt.buttons.googlePlus.url !== '' ? opt.buttons.googlePlus.url : opt.url)), "", "toolbar=0, status=0, width=900, height=500"); 323 | }, 324 | facebook: function(opt){ 325 | window.open("http://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent((opt.buttons.facebook.url !== '' ? opt.buttons.facebook.url : opt.url))+"&t="+opt.text+"", "", "toolbar=0, status=0, width=900, height=500"); 326 | }, 327 | twitter: function(opt){ 328 | window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(opt.text)+"&url="+encodeURIComponent((opt.buttons.twitter.url !== '' ? opt.buttons.twitter.url : opt.url))+(opt.buttons.twitter.via !== '' ? '&via='+opt.buttons.twitter.via : ''), "", "toolbar=0, status=0, width=650, height=360"); 329 | }, 330 | digg: function(opt){ 331 | window.open("http://digg.com/tools/diggthis/submit?url="+encodeURIComponent((opt.buttons.digg.url !== '' ? opt.buttons.digg.url : opt.url))+"&title="+opt.text+"&related=true&style=true", "", "toolbar=0, status=0, width=650, height=360"); 332 | }, 333 | delicious: function(opt){ 334 | window.open('http://www.delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent((opt.buttons.delicious.url !== '' ? opt.buttons.delicious.url : opt.url))+'&title='+opt.text, 'delicious', 'toolbar=no,width=550,height=550'); 335 | }, 336 | stumbleupon: function(opt){ 337 | window.open('http://www.stumbleupon.com/badge/?url='+encodeURIComponent((opt.buttons.stumbleupon.url !== '' ? opt.buttons.stumbleupon.url : opt.url)), 'stumbleupon', 'toolbar=no,width=550,height=550'); 338 | }, 339 | linkedin: function(opt){ 340 | window.open('https://www.linkedin.com/cws/share?url='+encodeURIComponent((opt.buttons.linkedin.url !== '' ? opt.buttons.linkedin.url : opt.url))+'&token=&isFramed=true', 'linkedin', 'toolbar=no,width=550,height=550'); 341 | }, 342 | pinterest: function(opt){ 343 | window.open('http://pinterest.com/pin/create/button/?url='+encodeURIComponent((opt.buttons.pinterest.url !== '' ? opt.buttons.pinterest.url : opt.url))+'&media='+encodeURIComponent(opt.buttons.pinterest.media)+'&description='+opt.buttons.pinterest.description, 'pinterest', 'toolbar=no,width=700,height=300'); 344 | } 345 | }; 346 | 347 | /* Plugin constructor 348 | ================================================== */ 349 | function Plugin( element, options ) { 350 | this.element = element; 351 | 352 | this.options = $.extend( true, {}, defaults, options); 353 | this.options.share = options.share; //simple solution to allow order of buttons 354 | 355 | this._defaults = defaults; 356 | this._name = pluginName; 357 | 358 | this.init(); 359 | }; 360 | 361 | /* Initialization method 362 | ================================================== */ 363 | Plugin.prototype.init = function () { 364 | var self = this; 365 | if(this.options.urlCurl !== ''){ 366 | urlJson.googlePlus = this.options.urlCurl + '?url={url}&type=googlePlus'; // PHP script for GooglePlus... 367 | urlJson.stumbleupon = this.options.urlCurl + '?url={url}&type=stumbleupon'; // PHP script for Stumbleupon... 368 | } 369 | $(this.element).addClass(this.options.className); //add class 370 | 371 | //HTML5 Custom data 372 | if(typeof $(this.element).data('title') !== 'undefined'){ 373 | this.options.title = $(this.element).attr('data-title'); 374 | } 375 | if(typeof $(this.element).data('url') !== 'undefined'){ 376 | this.options.url = $(this.element).data('url'); 377 | } 378 | if(typeof $(this.element).data('text') !== 'undefined'){ 379 | this.options.text = $(this.element).data('text'); 380 | } 381 | 382 | //how many social website have been selected 383 | $.each(this.options.share, function(name, val) { 384 | if(val === true){ 385 | self.options.shareTotal ++; 386 | } 387 | }); 388 | 389 | if(self.options.enableCounter === true){ //if for some reason you don't need counter 390 | //get count of social share that have been selected 391 | $.each(this.options.share, function(name, val) { 392 | if(val === true){ 393 | //self.getSocialJson(name); 394 | try { 395 | self.getSocialJson(name); 396 | } catch(e){ 397 | } 398 | } 399 | }); 400 | } 401 | else if(self.options.template !== ''){ //for personalized button (with template) 402 | this.options.render(this, this.options); 403 | } 404 | else{ // if you want to use official button like example 3 or 5 405 | this.loadButtons(); 406 | } 407 | 408 | //add hover event 409 | $(this.element).hover(function(){ 410 | //load social button if enable and 1 time 411 | if($(this).find('.buttons').length === 0 && self.options.enableHover === true){ 412 | self.loadButtons(); 413 | } 414 | self.options.hover(self, self.options); 415 | }, function(){ 416 | self.options.hide(self, self.options); 417 | }); 418 | 419 | //click event 420 | $(this.element).click(function(){ 421 | self.options.click(self, self.options); 422 | return false; 423 | }); 424 | }; 425 | 426 | /* loadButtons methode 427 | ================================================== */ 428 | Plugin.prototype.loadButtons = function () { 429 | var self = this; 430 | $(this.element).append('
'); 431 | $.each(self.options.share, function(name, val) { 432 | if(val == true){ 433 | loadButton[name](self); 434 | if(self.options.enableTracking === true){ //add tracking 435 | tracking[name](); 436 | } 437 | } 438 | }); 439 | }; 440 | 441 | /* getSocialJson methode 442 | ================================================== */ 443 | Plugin.prototype.getSocialJson = function (name) { 444 | var self = this, 445 | count = 0, 446 | url = urlJson[name].replace('{url}', encodeURIComponent(this.options.url)); 447 | if(this.options.buttons[name].urlCount === true && this.options.buttons[name].url !== ''){ 448 | url = urlJson[name].replace('{url}', this.options.buttons[name].url); 449 | } 450 | //console.log('name : ' + name + ' - url : '+url); //debug 451 | if(url != '' && self.options.urlCurl !== ''){ //urlCurl = '' if you don't want to used PHP script but used social button 452 | $.getJSON(url, function(json){ 453 | if(typeof json.count !== "undefined"){ //GooglePlus, Stumbleupon, Twitter, Pinterest and Digg 454 | var temp = json.count + ''; 455 | temp = temp.replace('\u00c2\u00a0', ''); //remove google plus special chars 456 | count += parseInt(temp, 10); 457 | } 458 | //get the FB total count (shares, likes and more) 459 | else if(json.data && json.data.length > 0 && typeof json.data[0].total_count !== "undefined"){ //Facebook total count 460 | count += parseInt(json.data[0].total_count, 10); 461 | } 462 | else if(typeof json[0] !== "undefined"){ //Delicious 463 | count += parseInt(json[0].total_posts, 10); 464 | } 465 | else if(typeof json[0] !== "undefined"){ //Stumbleupon 466 | } 467 | self.options.count[name] = count; 468 | self.options.total += count; 469 | self.renderer(); 470 | self.rendererPerso(); 471 | //console.log(json); //debug 472 | }) 473 | .error(function() { 474 | self.options.count[name] = 0; 475 | self.rendererPerso(); 476 | }); 477 | } 478 | else{ 479 | self.renderer(); 480 | self.options.count[name] = 0; 481 | self.rendererPerso(); 482 | } 483 | }; 484 | 485 | /* launch render methode 486 | ================================================== */ 487 | Plugin.prototype.rendererPerso = function () { 488 | //check if this is the last social website to launch render 489 | var shareCount = 0; 490 | for (e in this.options.count) { shareCount++; } 491 | if(shareCount === this.options.shareTotal){ 492 | this.options.render(this, this.options); 493 | } 494 | }; 495 | 496 | /* render methode 497 | ================================================== */ 498 | Plugin.prototype.renderer = function () { 499 | var total = this.options.total, 500 | template = this.options.template; 501 | if(this.options.shorterTotal === true){ //format number like 1.2k or 5M 502 | total = this.shorterTotal(total); 503 | } 504 | 505 | if(template !== ''){ //if there is a template 506 | template = template.replace('{total}', total); 507 | $(this.element).html(template); 508 | } 509 | else{ //template by defaults 510 | $(this.element).html( 511 | '
' + total + '' + 512 | (this.options.title !== '' ? '' : '') + 513 | '
' 514 | ); 515 | } 516 | }; 517 | 518 | /* format total numbers like 1.2k or 5M 519 | ================================================== */ 520 | Plugin.prototype.shorterTotal = function (num) { 521 | if (num >= 1e6){ 522 | num = (num / 1e6).toFixed(2) + "M" 523 | } else if (num >= 1e3){ 524 | num = (num / 1e3).toFixed(1) + "k" 525 | } 526 | return num; 527 | }; 528 | 529 | /* Methode for open popup 530 | ================================================== */ 531 | Plugin.prototype.openPopup = function (site) { 532 | popup[site](this.options); //open 533 | if(this.options.enableTracking === true){ //tracking! 534 | var tracking = { 535 | googlePlus: {site: 'Google', action: '+1'}, 536 | facebook: {site: 'facebook', action: 'like'}, 537 | twitter: {site: 'twitter', action: 'tweet'}, 538 | digg: {site: 'digg', action: 'add'}, 539 | delicious: {site: 'delicious', action: 'add'}, 540 | stumbleupon: {site: 'stumbleupon', action: 'add'}, 541 | linkedin: {site: 'linkedin', action: 'share'}, 542 | pinterest: {site: 'pinterest', action: 'pin'} 543 | }; 544 | _gaq.push(['_trackSocial', tracking[site].site, tracking[site].action]); 545 | } 546 | }; 547 | 548 | /* Methode for add +1 to a counter 549 | ================================================== */ 550 | Plugin.prototype.simulateClick = function () { 551 | var html = $(this.element).html(); 552 | $(this.element).html(html.replace(this.options.total, this.options.total+1)); 553 | }; 554 | 555 | /* Methode for add +1 to a counter 556 | ================================================== */ 557 | Plugin.prototype.update = function (url, text) { 558 | if(url !== ''){ 559 | this.options.url = url; 560 | } 561 | if(text !== ''){ 562 | this.options.text = text; 563 | } 564 | }; 565 | 566 | /* A really lightweight plugin wrapper around the constructor, preventing against multiple instantiations 567 | ================================================== */ 568 | $.fn[pluginName] = function ( options ) { 569 | var args = arguments; 570 | if (options === undefined || typeof options === 'object') { 571 | return this.each(function () { 572 | if (!$.data(this, 'plugin_' + pluginName)) { 573 | $.data(this, 'plugin_' + pluginName, new Plugin( this, options )); 574 | } 575 | }); 576 | } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') { 577 | return this.each(function () { 578 | var instance = $.data(this, 'plugin_' + pluginName); 579 | if (instance instanceof Plugin && typeof instance[options] === 'function') { 580 | instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) ); 581 | } 582 | }); 583 | } 584 | }; 585 | })(jQuery, window, document); 586 | -------------------------------------------------------------------------------- /cheatsheet/bootstrap4/assets/js/core/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) 3 | * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),+function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;nthis._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(m.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var o=e>i?p.NEXT:p.PREVIOUS;this._slide(o,this._items[e])}},h.prototype.dispose=function(){t(this._element).off(l),t.removeData(this._element,a),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},h.prototype._getConfig=function(n){return n=t.extend({},_,n),r.typeCheckConfig(e,n,g),n},h.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(m.KEYDOWN,function(t){return e._keydown(t)}),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(m.MOUSEENTER,function(t){return e.pause(t)}).on(m.MOUSELEAVE,function(t){return e.cycle(t)})},h.prototype._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case d:t.preventDefault(),this.prev();break;case f:t.preventDefault(),this.next();break;default:return}},h.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(v.ITEM)),this._items.indexOf(e)},h.prototype._getItemByDirection=function(t,e){var n=t===p.NEXT,i=t===p.PREVIOUS,o=this._getItemIndex(e),r=this._items.length-1,s=i&&0===o||n&&o===r;if(s&&!this._config.wrap)return e;var a=t===p.PREVIOUS?-1:1,l=(o+a)%this._items.length;return l===-1?this._items[this._items.length-1]:this._items[l]},h.prototype._triggerSlideEvent=function(e,n){var i=t.Event(m.SLIDE,{relatedTarget:e,direction:n});return t(this._element).trigger(i),i},h.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(v.ACTIVE).removeClass(E.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(E.ACTIVE)}},h.prototype._slide=function(e,n){var i=this,o=t(this._element).find(v.ACTIVE_ITEM)[0],s=n||o&&this._getItemByDirection(e,o),a=Boolean(this._interval),l=void 0,h=void 0,c=void 0;if(e===p.NEXT?(l=E.LEFT,h=E.NEXT,c=p.LEFT):(l=E.RIGHT,h=E.PREV,c=p.RIGHT),s&&t(s).hasClass(E.ACTIVE))return void(this._isSliding=!1);var d=this._triggerSlideEvent(s,c);if(!d.isDefaultPrevented()&&o&&s){this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s);var f=t.Event(m.SLID,{relatedTarget:s,direction:c});r.supportsTransitionEnd()&&t(this._element).hasClass(E.SLIDE)?(t(s).addClass(h),r.reflow(s),t(o).addClass(l),t(s).addClass(l),t(o).one(r.TRANSITION_END,function(){t(s).removeClass(l+" "+h).addClass(E.ACTIVE),t(o).removeClass(E.ACTIVE+" "+h+" "+l),i._isSliding=!1,setTimeout(function(){return t(i._element).trigger(f)},0)}).emulateTransitionEnd(u)):(t(o).removeClass(E.ACTIVE),t(s).addClass(E.ACTIVE),this._isSliding=!1,t(this._element).trigger(f)),a&&this.cycle()}},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o=t.extend({},_,t(this).data());"object"===("undefined"==typeof e?"undefined":i(e))&&t.extend(o,e);var r="string"==typeof e?e:o.slide;if(n||(n=new h(this,o),t(this).data(a,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if(void 0===n[r])throw new Error('No method named "'+r+'"');n[r]()}else o.interval&&(n.pause(),n.cycle())})},h._dataApiClickHandler=function(e){var n=r.getSelectorFromElement(this);if(n){var i=t(n)[0];if(i&&t(i).hasClass(E.CAROUSEL)){var o=t.extend({},t(i).data(),t(this).data()),s=this.getAttribute("data-slide-to");s&&(o.interval=!1),h._jQueryInterface.call(t(i),o),s&&t(i).data(a).to(s),e.preventDefault()}}},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return _}}]),h}();return t(document).on(m.CLICK_DATA_API,v.DATA_SLIDE,T._dataApiClickHandler),t(window).on(m.LOAD_DATA_API,function(){t(v.DATA_RIDE).each(function(){var e=t(this);T._jQueryInterface.call(e,e.data())})}),t.fn[e]=T._jQueryInterface,t.fn[e].Constructor=T,t.fn[e].noConflict=function(){return t.fn[e]=c,T._jQueryInterface},T}(jQuery),function(t){var e="collapse",s="4.0.0-alpha.6",a="bs.collapse",l="."+a,h=".data-api",c=t.fn[e],u=600,d={toggle:!0,parent:""},f={toggle:"boolean",parent:"string"},_={SHOW:"show"+l,SHOWN:"shown"+l,HIDE:"hide"+l,HIDDEN:"hidden"+l,CLICK_DATA_API:"click"+l+h},g={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".card > .show, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},E=function(){function l(e,i){n(this,l),this._isTransitioning=!1,this._element=e,this._config=this._getConfig(i),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],'+('[data-toggle="collapse"][data-target="#'+e.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return l.prototype.toggle=function(){t(this._element).hasClass(g.SHOW)?this.hide():this.show()},l.prototype.show=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!t(this._element).hasClass(g.SHOW)){var n=void 0,i=void 0;if(this._parent&&(n=t.makeArray(t(this._parent).find(m.ACTIVES)),n.length||(n=null)),!(n&&(i=t(n).data(a),i&&i._isTransitioning))){var o=t.Event(_.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){n&&(l._jQueryInterface.call(t(n),"hide"),i||t(n).data(a,null));var s=this._getDimension();t(this._element).removeClass(g.COLLAPSE).addClass(g.COLLAPSING),this._element.style[s]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(g.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function(){t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).addClass(g.SHOW),e._element.style[s]="",e.setTransitioning(!1),t(e._element).trigger(_.SHOWN)};if(!r.supportsTransitionEnd())return void h();var c=s[0].toUpperCase()+s.slice(1),d="scroll"+c;t(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(u),this._element.style[s]=this._element[d]+"px"}}}},l.prototype.hide=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(t(this._element).hasClass(g.SHOW)){var n=t.Event(_.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),o=i===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[o]+"px",r.reflow(this._element),t(this._element).addClass(g.COLLAPSING).removeClass(g.COLLAPSE).removeClass(g.SHOW),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(g.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var s=function(){e.setTransitioning(!1),t(e._element).removeClass(g.COLLAPSING).addClass(g.COLLAPSE).trigger(_.HIDDEN)};return this._element.style[i]="",r.supportsTransitionEnd()?void t(this._element).one(r.TRANSITION_END,s).emulateTransitionEnd(u):void s()}}},l.prototype.setTransitioning=function(t){this._isTransitioning=t},l.prototype.dispose=function(){t.removeData(this._element,a),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},l.prototype._getConfig=function(n){return n=t.extend({},d,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,f),n},l.prototype._getDimension=function(){var e=t(this._element).hasClass(p.WIDTH);return e?p.WIDTH:p.HEIGHT},l.prototype._getParent=function(){var e=this,n=t(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(l._getTargetFromElement(n),[n])}),n},l.prototype._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(g.SHOW);e.setAttribute("aria-expanded",i),n.length&&t(n).toggleClass(g.COLLAPSED,!i).attr("aria-expanded",i)}},l._getTargetFromElement=function(e){var n=r.getSelectorFromElement(e);return n?t(n)[0]:null},l._jQueryInterface=function(e){return this.each(function(){var n=t(this),o=n.data(a),r=t.extend({},d,n.data(),"object"===("undefined"==typeof e?"undefined":i(e))&&e);if(!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new l(this,r),n.data(a,o)),"string"==typeof e){if(void 0===o[e])throw new Error('No method named "'+e+'"');o[e]()}})},o(l,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return d}}]),l}();return t(document).on(_.CLICK_DATA_API,m.DATA_TOGGLE,function(e){e.preventDefault();var n=E._getTargetFromElement(this),i=t(n).data(a),o=i?"toggle":t(this).data();E._jQueryInterface.call(t(n),o)}),t.fn[e]=E._jQueryInterface,t.fn[e].Constructor=E,t.fn[e].noConflict=function(){return t.fn[e]=c,E._jQueryInterface},E}(jQuery),function(t){var e="dropdown",i="4.0.0-alpha.6",s="bs.dropdown",a="."+s,l=".data-api",h=t.fn[e],c=27,u=38,d=40,f=3,_={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK:"click"+a,CLICK_DATA_API:"click"+a+l,FOCUSIN_DATA_API:"focusin"+a+l,KEYDOWN_DATA_API:"keydown"+a+l},g={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",SHOW:"show"},p={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},m=function(){function e(t){n(this,e),this._element=t,this._addEventListeners()}return e.prototype.toggle=function(){if(this.disabled||t(this).hasClass(g.DISABLED))return!1;var n=e._getParentFromElement(this),i=t(n).hasClass(g.SHOW);if(e._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!t(n).closest(p.NAVBAR_NAV).length){var o=document.createElement("div");o.className=g.BACKDROP,t(o).insertBefore(this),t(o).on("click",e._clearMenus)}var r={relatedTarget:this},s=t.Event(_.SHOW,r);return t(n).trigger(s),!s.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),t(n).toggleClass(g.SHOW),t(n).trigger(t.Event(_.SHOWN,r)),!1)},e.prototype.dispose=function(){t.removeData(this._element,s),t(this._element).off(a),this._element=null},e.prototype._addEventListeners=function(){t(this._element).on(_.CLICK,this.toggle)},e._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(s);if(i||(i=new e(this),t(this).data(s,i)),"string"==typeof n){if(void 0===i[n])throw new Error('No method named "'+n+'"');i[n].call(this)}})},e._clearMenus=function(n){if(!n||n.which!==f){var i=t(p.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var o=t.makeArray(t(p.DATA_TOGGLE)),r=0;r0&&a--,n.which===d&&adocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},h.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},h.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth=n){var i=this._targets[this._targets.length-1];return void(this._activeTarget!==i&&this._activate(i))}if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){var r=this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t "+g.NAV_LINKS).addClass(_.ACTIVE),t(this._scrollElement).trigger(f.ACTIVATE,{relatedTarget:e})},h.prototype._clear=function(){t(this._selector).filter(g.ACTIVE).removeClass(_.ACTIVE)},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===("undefined"==typeof e?"undefined":i(e))&&e; 7 | if(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return u}}]),h}();return t(window).on(f.LOAD_DATA_API,function(){for(var e=t.makeArray(t(g.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);m._jQueryInterface.call(i,i.data())}}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=c,m._jQueryInterface},m}(jQuery),function(t){var e="tab",i="4.0.0-alpha.6",s="bs.tab",a="."+s,l=".data-api",h=t.fn[e],c=150,u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+l},d={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},f={A:"a",LI:"li",DROPDOWN:".dropdown",LIST:"ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},_=function(){function e(t){n(this,e),this._element=t}return e.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(d.ACTIVE)||t(this._element).hasClass(d.DISABLED))){var n=void 0,i=void 0,o=t(this._element).closest(f.LIST)[0],s=r.getSelectorFromElement(this._element);o&&(i=t.makeArray(t(o).find(f.ACTIVE)),i=i[i.length-1]);var a=t.Event(u.HIDE,{relatedTarget:this._element}),l=t.Event(u.SHOW,{relatedTarget:i});if(i&&t(i).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=t(s)[0]),this._activate(this._element,o);var h=function(){var n=t.Event(u.HIDDEN,{relatedTarget:e._element}),o=t.Event(u.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},e.prototype.dispose=function(){t.removeClass(this._element,s),this._element=null},e.prototype._activate=function(e,n,i){var o=this,s=t(n).find(f.ACTIVE_CHILD)[0],a=i&&r.supportsTransitionEnd()&&(s&&t(s).hasClass(d.FADE)||Boolean(t(n).find(f.FADE_CHILD)[0])),l=function(){return o._transitionComplete(e,s,a,i)};s&&a?t(s).one(r.TRANSITION_END,l).emulateTransitionEnd(c):l(),s&&t(s).removeClass(d.SHOW)},e.prototype._transitionComplete=function(e,n,i,o){if(n){t(n).removeClass(d.ACTIVE);var s=t(n.parentNode).find(f.DROPDOWN_ACTIVE_CHILD)[0];s&&t(s).removeClass(d.ACTIVE),n.setAttribute("aria-expanded",!1)}if(t(e).addClass(d.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),t(e).addClass(d.SHOW)):t(e).removeClass(d.FADE),e.parentNode&&t(e.parentNode).hasClass(d.DROPDOWN_MENU)){var a=t(e).closest(f.DROPDOWN)[0];a&&t(a).find(f.DROPDOWN_TOGGLE).addClass(d.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),o=i.data(s);if(o||(o=new e(this),i.data(s,o)),"string"==typeof n){if(void 0===o[n])throw new Error('No method named "'+n+'"');o[n]()}})},o(e,null,[{key:"VERSION",get:function(){return i}}]),e}();return t(document).on(u.CLICK_DATA_API,f.DATA_TOGGLE,function(e){e.preventDefault(),_._jQueryInterface.call(t(this),"show")}),t.fn[e]=_._jQueryInterface,t.fn[e].Constructor=_,t.fn[e].noConflict=function(){return t.fn[e]=h,_._jQueryInterface},_}(jQuery),function(t){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var e="tooltip",s="4.0.0-alpha.6",a="bs.tooltip",l="."+a,h=t.fn[e],c=150,u="bs-tether",d={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},f={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},_={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},g={SHOW:"show",OUT:"out"},p={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},m={FADE:"fade",SHOW:"show"},E={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},v={element:!1,enabled:!1},T={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},I=function(){function h(t,e){n(this,h),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._isTransitioning=!1,this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return h.prototype.enable=function(){this._isEnabled=!0},h.prototype.disable=function(){this._isEnabled=!1},h.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},h.prototype.toggle=function(e){if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(m.SHOW))return void this._leave(null,this);this._enter(null,this)}},h.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},h.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");t(this.element).trigger(n);var i=t.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(o).addClass(m.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,l=this._getAttachment(a),c=this.config.container===!1?document.body:t(this.config.container);t(o).data(this.constructor.DATA_KEY,this).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:l,element:o,target:this.element,classes:v,classPrefix:u,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),r.reflow(o),this._tether.position(),t(o).addClass(m.SHOW);var d=function(){var n=e._hoverState;e._hoverState=null,e._isTransitioning=!1,t(e.element).trigger(e.constructor.Event.SHOWN),n===g.OUT&&e._leave(null,e)};if(r.supportsTransitionEnd()&&t(this.tip).hasClass(m.FADE))return this._isTransitioning=!0,void t(this.tip).one(r.TRANSITION_END,d).emulateTransitionEnd(h._TRANSITION_DURATION);d()}},h.prototype.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE);if(this._isTransitioning)throw new Error("Tooltip is transitioning");var s=function(){n._hoverState!==g.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),n._isTransitioning=!1,n.cleanupTether(),e&&e()};t(this.element).trigger(o),o.isDefaultPrevented()||(t(i).removeClass(m.SHOW),this._activeTrigger[T.CLICK]=!1,this._activeTrigger[T.FOCUS]=!1,this._activeTrigger[T.HOVER]=!1,r.supportsTransitionEnd()&&t(this.tip).hasClass(m.FADE)?(this._isTransitioning=!0,t(i).one(r.TRANSITION_END,s).emulateTransitionEnd(c)):s(),this._hoverState="")},h.prototype.isWithContent=function(){return Boolean(this.getTitle())},h.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},h.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(E.TOOLTIP_INNER),this.getTitle()),e.removeClass(m.FADE+" "+m.SHOW),this.cleanupTether()},h.prototype.setElementContent=function(e,n){var o=this.config.html;"object"===("undefined"==typeof n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[o?"html":"text"](n)},h.prototype.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},h.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},h.prototype._getAttachment=function(t){return _[t.toUpperCase()]},h.prototype._setListeners=function(){var e=this,n=this.config.trigger.split(" ");n.forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==T.MANUAL){var i=n===T.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o=n===T.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(o,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},h.prototype._fixTitle=function(){var t=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},h.prototype._enter=function(e,n){var i=this.constructor.DATA_KEY;return n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T.FOCUS:T.HOVER]=!0),t(n.getTipElement()).hasClass(m.SHOW)||n._hoverState===g.SHOW?void(n._hoverState=g.SHOW):(clearTimeout(n._timeout),n._hoverState=g.SHOW,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===g.SHOW&&n.show()},n.config.delay.show)):void n.show())},h.prototype._leave=function(e,n){var i=this.constructor.DATA_KEY;if(n=n||t(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T.FOCUS:T.HOVER]=!1),!n._isWithActiveTrigger())return clearTimeout(n._timeout),n._hoverState=g.OUT,n.config.delay&&n.config.delay.hide?void(n._timeout=setTimeout(function(){n._hoverState===g.OUT&&n.hide()},n.config.delay.hide)):void n.hide()},h.prototype._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},h.prototype._getConfig=function(n){return n=t.extend({},this.constructor.Default,t(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),r.typeCheckConfig(e,n,this.constructor.DefaultType),n},h.prototype._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},h._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(a),o="object"===("undefined"==typeof e?"undefined":i(e))&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new h(this,o),t(this).data(a,n)),"string"==typeof e)){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(h,null,[{key:"VERSION",get:function(){return s}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return f}}]),h}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=h,I._jQueryInterface},I}(jQuery));(function(r){var a="popover",l="4.0.0-alpha.6",h="bs.popover",c="."+h,u=r.fn[a],d=r.extend({},s.Default,{placement:"right",trigger:"click",content:"",template:''}),f=r.extend({},s.DefaultType,{content:"(string|element|function)"}),_={FADE:"fade",SHOW:"show"},g={TITLE:".popover-title",CONTENT:".popover-content"},p={HIDE:"hide"+c,HIDDEN:"hidden"+c,SHOW:"show"+c,SHOWN:"shown"+c,INSERTED:"inserted"+c,CLICK:"click"+c,FOCUSIN:"focusin"+c,FOCUSOUT:"focusout"+c,MOUSEENTER:"mouseenter"+c,MOUSELEAVE:"mouseleave"+c},m=function(s){function u(){return n(this,u),t(this,s.apply(this,arguments))}return e(u,s),u.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},u.prototype.getTipElement=function(){return this.tip=this.tip||r(this.config.template)[0]},u.prototype.setContent=function(){var t=r(this.getTipElement());this.setElementContent(t.find(g.TITLE),this.getTitle()),this.setElementContent(t.find(g.CONTENT),this._getContent()),t.removeClass(_.FADE+" "+_.SHOW),this.cleanupTether()},u.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},u._jQueryInterface=function(t){return this.each(function(){var e=r(this).data(h),n="object"===("undefined"==typeof t?"undefined":i(t))?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new u(this,n),r(this).data(h,e)),"string"==typeof t)){if(void 0===e[t])throw new Error('No method named "'+t+'"');e[t]()}})},o(u,null,[{key:"VERSION",get:function(){return l}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return a}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return c}},{key:"DefaultType",get:function(){return f}}]),u}(s);return r.fn[a]=m._jQueryInterface,r.fn[a].Constructor=m,r.fn[a].noConflict=function(){return r.fn[a]=u,m._jQueryInterface},m})(jQuery)}(); --------------------------------------------------------------------------------