Giter Site home page Giter Site logo

slider's Introduction

Slider

A small library for implementing simple presentations. It's very elastic (you can add your styles) and easy to use.

This is a draft. The idea came out, when I was implementing my CV and I couldn't find any library, which met my needs.

Technologies

  • ES6
  • jQuery
  • Webpack

Sections (slides)

  1. Default vertical section (with bottom -> top animation)
<section class='one'>
    <div class='content'>
      <div class='text'>
        Text (from bottom to top)
      </div>
    </div>
</section>
  1. Horizontal section (with left -> right animation)
<section class='two' left>
    <div class='content'>
      <div class='text'>
        Text (from left to right)
      </div>
    </div>
</section>

Example

Run the example app under examples/mix directory or create your own:

Run example app

  1. Install all dependencies

    yarn install
  2. Run

    npm start

The example application should appear under http://localhost:8080/examples/mix.

Make your own app

  1. Create index.html.
  2. Add some sections.
  3. Put at the end of the body the slider scripts from the /dist directory.

An exemplary HTML file can look like this:

<!DOCTYPE html>
<head>
  ...
    <!-- your styles -->
    <link href='./my-styles.css' rel='stylesheet'>
<body>
    <div class='scrollable-sections'>
      <section class='one'>
          <div class='text'>
              Text 1 (fixed)
          </div>
      </section>
      <section class='two'>
          <div class='content'>
              <div class='text'>
                  Text 2 (from bottom to top)
              </div>
          </div>
      </section>
      <section class='three' left>
          <div class='content'>
              <div class='text'>
                Text 3 (from left to right)
              </div>
          </div>
      </section>
      <section class='four'>
          <div class='content'>
              <div class='text'>
                  Text 6 (from bottom to top)
              </div>
          </div>
      </section>
    </div>

    <script src='./js.js'></script>
    <script src='./css.js'></script>
</body>
</html>

The above steps will change after publishing an npm package.

Roadmap

  • provide scrolling from different sides (top -> bottom and left -> right)
  • provide possibility to select more animations like zooming or opacity
  • rework slider.js
  • combine slider-mobile.js with slider.js
  • publish as a npm package

slider's People

Contributors

katarzyna-dusza avatar

Watchers

 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.