GithubHelp home page GithubHelp logo

magazine's Introduction

Quick overview for configuring the magazine code package:

After downloading the code you can initially preview the demo by opening index.html in a browser.

To customize the catalog with your own assets you'll need to make the following changes to index.html:

Add your own pages: Modify the divs inside of the catalogue element <div id="catalogue"> with your own images:

<div page="6" imageurl="path/to/your/image"></div>

You can add or remove as many pages as you want, just be sure the page attribute is accurate and that the images are all the same aspect ratio. Note that some pages in the demo already have the background-image style set - this is required only for the first two pages, beyond that the images are loaded when they're about to appear. You should also replace the thumbnail in the grid wrapper:

  <li>
     <a href="#page-2">    <!-- this hash tag format is required -->
       <div class="item">
         <div class="thumb">
           <div class="thumb-shadow"></div>
           <img class="thumb-img" src="page/to/your/page2thumbnail">
           <img class="thumb-img" src="page/to/your/page3thumbnail">
         </div>
         <span class="grid-index">2 - 3</span>
       </div>
     </a>
   </li>

Add your own products/hotspots: This part is optional and you can delete the products or product list container element if you want. In the <div class="product-list"> container you'll find a list of product items. The data attributes for each item control the following:

  • data-x/data-y/data-width/data-height - these control the location (top left) and size of the spotlight that appears on the magazine when you hover over the item in the list. Since the magazine size is flexible these should all be values relative to the size of each page (e.g. data-x="0.2" means the left-most part of the spotlight is at 20% of that page's width).

  • data-targetx and data-targety are similar values that contain the location of the hotspot icon that appears over the magazine.

  • data-page assigns the product to specific page.

  • data-id, data-uid, and ddkey are probably only relevant if you're working with an existing database of products. ddkey isn't required, but id and uid are needed. If you don't have a database to reference the product then data-id can be anything, but data-uid needs to be unique for that particular hotspot. If you're not sure just number them sequentially.

  • Once that's done then you should enter your product name/price/thumbnail (40x40 works best).

#####Turn.js:

magazine's People

Contributors

fi-admin avatar fi-blake-carroll avatar fi-chase-campos 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.