cambios adicionales
This commit is contained in:
21
public/plugins/theia-sticky-sidebar/LICENSE.txt
Normal file
21
public/plugins/theia-sticky-sidebar/LICENSE.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Liviu Cristian Mirea Ghiban
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
123
public/plugins/theia-sticky-sidebar/README.md
Normal file
123
public/plugins/theia-sticky-sidebar/README.md
Normal file
@@ -0,0 +1,123 @@
|
||||
# Theia Sticky Sidebar
|
||||
|
||||
A JavaScript library that glues your website's sidebars (or any vertical column for that matter), making them permanently visible when scrolling up and down. Useful when a sidebar is too tall or too short compared to the rest of the content. Works with virtually any design and supports multiple sidebars.
|
||||
|
||||
## WordPress
|
||||
|
||||
[](https://wecodepixels.com/shop/theia-sticky-sidebar-for-wordpress/)
|
||||
|
||||
Also available as a [premium WordPress plugin](https://wecodepixels.com/shop/theia-sticky-sidebar-for-wordpress/) that comes with a user-friendly admin panel and supports a plethora of themes out-of-the-box.
|
||||
|
||||
## Examples
|
||||
|
||||
[3 columns example](http://theia-sticky-sidebar.wecodepixels.com/examples/3-columns.html)
|
||||
|
||||
[4 columns example](http://theia-sticky-sidebar.wecodepixels.com/examples/4-columns.html)
|
||||
|
||||
[Bootstrap 4 example](http://theia-sticky-sidebar.wecodepixels.com/examples/bootstrap-v4.html)
|
||||
|
||||
[Foundation example](http://theia-sticky-sidebar.wecodepixels.com/examples/foundation.html)
|
||||
|
||||
## Install
|
||||
|
||||
### Bower
|
||||
|
||||
If you are using Bower as your package manager:
|
||||
|
||||
```bash
|
||||
bower install theia-sticky-sidebar
|
||||
```
|
||||
|
||||
### NPM
|
||||
|
||||
If you are using NPM as your package manager:
|
||||
|
||||
```bash
|
||||
npm install theia-sticky-sidebar
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Your website's HTML structure has to be similar to this in order to work:
|
||||
|
||||
```html
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="theiaStickySidebar">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar">
|
||||
<div class="theiaStickySidebar">
|
||||
...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
Note that the inner "theiaStickySidebar" divs are optional, but highly recommended.
|
||||
If you don't supply them yourself, the script will create them for you, but this can be problematic
|
||||
if you're using ads or iframes, since they will be moved around in the DOM and as a result will get reloaded.
|
||||
|
||||
**Note:** Make sure to use `<!DOCTYPE html>` in your page, otherwise you might run into weird issues.
|
||||
|
||||
For the above example, you can use the following JavaScript:
|
||||
|
||||
```html
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="dist/ResizeSensor.min.js"></script>
|
||||
<script type="text/javascript" src="dist/theia-sticky-sidebar.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('.content, .sidebar').theiaStickySidebar({
|
||||
// Settings
|
||||
additionalMarginTop: 30
|
||||
});
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
### ResizeSensor
|
||||
|
||||
Theia Sticky Sidebar uses the [CSS Element Queries](https://github.com/marcj/css-element-queries) library to detect when your sidebars change height, so that it can recalculate their positions. This can happen if you are using an [accordion](http://v4-alpha.getbootstrap.com/components/collapse/#accordion-example), for example.
|
||||
|
||||
You can choose **not** to include the `ResizeSensor.min.js` script in your page, in which case Theia Sticky Sidebar will continue to function (possibly even a bit smoother) but will not automatically detect height changes.
|
||||
|
||||
## Settings
|
||||
|
||||
### containerSelector
|
||||
|
||||
The sidebar's container element. If not specified, it defaults to the sidebar's parent.
|
||||
|
||||
### additionalMarginTop
|
||||
|
||||
An additional top margin in pixels. Defaults to **0**.
|
||||
|
||||
### additionalMarginBottom
|
||||
|
||||
An additional bottom margin in pixels. Defaults to **0**.
|
||||
|
||||
### updateSidebarHeight
|
||||
|
||||
Updates the sidebar's height. Use this if the background isn't showing properly, for example. Defaults to **true**.
|
||||
|
||||
### minWidth
|
||||
|
||||
The sidebar returns to normal if its width is below this value. Useful for responsive designs. Defaults to **0**.
|
||||
|
||||
### disableOnResponsiveLayouts
|
||||
|
||||
Try to detect responsive layouts automatically and disable the sticky functionality on smaller screens. More exactly, it detects when the container and the sidebar are moved one on top of the other, instead of showing up side-by-side. Defaults to **true**.
|
||||
|
||||
### defaultPosition
|
||||
|
||||
The sidebar must have a non-static `position`, as the inner sticky-sidebar uses `position: absolute`. Defaults to **relative**.
|
||||
|
||||
### namespace
|
||||
|
||||
Events are binded using a namespace, so that you may unbind them later on without affecting others. Defaults to **TSS**.
|
||||
|
||||
## Credits
|
||||
|
||||
Stock photos courtesy of [Unsplash.com](https://unsplash.com/)
|
||||
2
public/plugins/theia-sticky-sidebar/ResizeSensor.min.js
vendored
Normal file
2
public/plugins/theia-sticky-sidebar/ResizeSensor.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(){var e=function(t,i){function s(){this.q=[],this.add=function(e){this.q.push(e)};var e,t;this.call=function(){for(e=0,t=this.q.length;e<t;e++)this.q[e].call()}}function o(e,t){return e.currentStyle?e.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(e,null).getPropertyValue(t):e.style[t]}function n(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new s,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var i="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",n="position: absolute; left: 0; top: 0; transition: 0s;";e.resizeSensor.style.cssText=i,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+i+'"><div style="'+n+'"></div></div><div class="resize-sensor-shrink" style="'+i+'"><div style="'+n+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[o(e,"position")]||(e.style.position="relative");var d,r,l=e.resizeSensor.childNodes[0],c=l.childNodes[0],h=e.resizeSensor.childNodes[1],a=(h.childNodes[0],function(){c.style.width=l.offsetWidth+10+"px",c.style.height=l.offsetHeight+10+"px",l.scrollLeft=l.scrollWidth,l.scrollTop=l.scrollHeight,h.scrollLeft=h.scrollWidth,h.scrollTop=h.scrollHeight,d=e.offsetWidth,r=e.offsetHeight});a();var f=function(){e.resizedAttached&&e.resizedAttached.call()},u=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)},p=function(){e.offsetWidth==d&&e.offsetHeight==r||f(),a()};u(l,"scroll",p),u(h,"scroll",p)}var d=Object.prototype.toString.call(t),r="[object Array]"===d||"[object NodeList]"===d||"[object HTMLCollection]"===d||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements;if(r)for(var l=0,c=t.length;l<c;l++)n(t[l],i);else n(t,i);this.detach=function(){if(r)for(var i=0,s=t.length;i<s;i++)e.detach(t[i]);else e.detach(t)}};e.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=e:window.ResizeSensor=e}();
|
||||
//# sourceMappingURL=maps/ResizeSensor.min.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/plugins/theia-sticky-sidebar/theia-sticky-sidebar.min.js
vendored
Normal file
2
public/plugins/theia-sticky-sidebar/theia-sticky-sidebar.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user