Giter Site home page Giter Site logo

polymer-slideshow's Introduction

polymer-slideshow

A simple slideshow element.

Example

<link rel="import" href="../components/polymer-slideshow/polymer-slideshow.html">
<link rel="import" href="../components/polymer-slideshow/polymer-slide.html">
<!--snip-->
<polymer-slideshow height=600>
  <polymer-slide>
    <img src="http://placekitten.com/g/350/250">
    <h1>Cat</h1>
    <p>Cat ipsum dolor sit amet, quo. Quasi. Amet si irure illo or ab. Vitae. Sint numquam magni but quam cupidatat and deserunt. Sit magna yet velit. Commodi perspiciatis aliquam or ea yet magnam so laboriosam for fugiat. Voluptas ullam or odit yet aspernatur so aut. Eius in minima aliquam. Nostrud. Deserunt. Proident velitesse yet consequat. Quae officia est qui or corporis nequeporro. Aliquam tempor natus yet dolores so eiusmod. Consequat reprehenderit explicabo or officia aperiam. In. Quasi dolor but esse minim. Consectetur do. Perspiciatis occaecat and quis so magna deserunt error yet beatae. Unde culpa so proident for suscipit fugit, and exercitationem. Eius quo, reprehenderit but eos, ab. Incididunt incidunt.
</p>
  </polymer-slide>
  <polymer-slide>
    <img src="http://placehold.it/350x250">
    <h1>Not Cat</h1>
    <p>Quasi. Amet si irure illo or ab. Vitae. Sint numquam magni but quam cupidatat and deserunt. Sit magna yet velit. Commodi perspiciatis aliquam or ea yet magnam so laboriosam for fugiat. Voluptas ullam or odit yet aspernatur so aut. Eius in minima aliquam. Nostrud. Deserunt. Proident velitesse yet consequat. Quae officia est qui or corporis nequeporro. Aliquam tempor natus yet dolores so eiusmod. Consequat reprehenderit explicabo or officia aperiam. In. Quasi dolor but esse minim. Consectetur do. Perspiciatis occaecat and quis so magna deserunt error yet beatae. Unde culpa so proident for suscipit fugit, and exercitationem. Eius quo, reprehenderit but eos, ab. Incididunt incidunt.
</p>
  </polymer-slide>
</polymer-slideshow>

The polymer-slide element can contain any content you desire. The example uses text and images, but you could do just images or just text.

<polymer-slide>
    <img src="http://placekitten.com/g/500/500">
</polymer-slide>

Get the code

The easiest way to get the code is from bower.

bower install polymer-slideshow

polymer-slideshow's People

Contributors

iverum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

polymer-slideshow's Issues

<polymer-slide> are not binding inside <template is="dom-repeat">

Following code does not render slideshow:

<polymer-slideshow height="200">
     <template is="dom-repeat" items="{{imageGallery}}">
          <polymer-slide>
               <iron-image style="width:100%; height:200px;" sizing="cover" src="{{_getImage(item.path, item.name)}}"></iron-image>
          </polymer-slide>    
     </template>
</polymer-slideshow>

I put detailed question at http://stackoverflow.com/questions/34082760/polymer-1-0-polymer-slide-is-not-rendering-inside-template-is-dom-repeat

I could not figure out why images are not at all rendering.

Resizing the slideshow

Hello,

I set up polymer-slideshow in a webpage I'm currently building. However I haven't found any proper way to resize the slider. I was detaching and attaching to get the new width and height to apply, but that makes the setIntervals to stack.

The workaround has been setting a listener to the height and width properties, but this has some downsides as well.

If you want I would like to work on a solution and then, send a PR.

Thank you.

Can't make it work on my site

No matter what I do, I get no content and invisible sliders on each site that only become somewhat visible on mouse over. Is there a styling trick?

Demo fails

Tried to clone the repo, bower install then polyserve

Renders alright, but under each other, so not really a slideshow...

Can't find a way to use it

Hi @Iverum , I can't find a way to use your element. When I hover on both sides I see some arrows and cursor changes but no images show on the slideshow. Here is my code:

<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title> </title>
    <script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
    <link rel="import" href="/bower_components/polymer/polymer.html">
    <link rel="import" href="/bower_components/paper-toolbar/paper-toolbar.html">
    <link rel="import" href="/bower_components/paper-material/paper-material.html">
    <link rel="import" href="/polymer-slideshow.html">

</head>
    <body>

<paper-toolbar>
</paper-toolbar>



   <paper-material style="background-color: rgba(255, 213, 78, 0.7); font-family: 'Inconsolata';">
       <!--snip--><h1>hola</h1>
<polymer-slideshow>
   <img src="http://lorempixel.com/350/200">
   <img src="http://lorempixel.com/350/200">
</polymer-slideshow>

        </paper-material> 

    </body> 

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.