Coder Social home page Coder Social logo

sharepoint-bootstrap's Introduction

sharepoint-bootstrap

Twitter Bootstrap 3.2 adapted to work in SharePoint 2013/ Office 365

Table of contents

Quick start

  • Download the latest release of Twitter Bootstrap.
  • Add Bootstrap to your masterpage.
  • Download this project and add bootstrap-custom.css and bootstrap-custom.js to your masterpage.
  • Use Bootstrap's grid system in your masterpage and layouts.
  • Use Bootstrap components anywhere you like in your pages.

Features

Carousel - Supports animation in IE9. Bootstrap has dropped support for animation in older browsers like IE9.

Example: Coming soon

Affix - Bootstraps version does not work in SharePoint. We fixed it.

Example:

var $affixNav = $('[data-spy=affix]'),
    $msDesignerRibbon = $('#ms-designer-ribbon');

if ($affixNav.length) {
    $affixNav.affix({
        offset: {
            top: function () {
                return (this.top = $('[role=heading]').outerHeight(true) + $('[role=menubar]').outerHeight(true));
            },
            bottom: function () {
                return (this.bottom = $('footer').outerHeight() - parseInt($('footer').css('margin-top'), 10));
            }
        }
    });

    $affixNav.on('affix.bs.affix', function (e) {
        $affixNav.addClass('col-md-2')
            .css({
                'top': 17 + ($msDesignerRibbon.height() + parseInt($msDesignerRibbon.css('margin-top'), 10)),
                'position': ''
            });
    });
    $affixNav.on('affix-top.bs.affix', function (e) {
        $affixNav.removeClass('col-md-2')
            .css({
                'top': 0,
                'position': ''
            });
    });
    $affixNav.on('affix-bottom.bs.affix', function (e) {
        $affixNav.removeClass('col-md-2');
    });

    $(document).on('FixRibbonAndWorkspaceDimensions', function (e) {
        if ($affixNav.hasClass('col-md-2')) {
            $affixNav.css({
                'top': 17 + ($msDesignerRibbon.height() + parseInt($msDesignerRibbon.css('margin-top'), 10))
            });
        }
    });
}

Acknowledgement

Inspired by and based on the wonderful work by Eric Overfield and all the contributors at the Responsive SharePoint Codeplex project.

sharepoint-bootstrap's People

Contributors

ricardo-cantu avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.