Giter VIP home page Giter VIP logo

home-photos-site's Introduction

Basic Photo Site

This page is a very simple usage of a bootstrap carousel that loads photos dynamically from a list of urls. As the user navigates the carousel a pointer keeps track of the location in the list. If the user clicks on the right arrow, the pointer will increment. Otherwise, the pointer will decrement. A button is also available to random update the photo and location in the list where the pointer is pointing.

Setup

  1. Create a vendor directory and but two subdirs in it, One for Bootstrap and the other for jquery.

    $ mkdir -p vendor/bootstrap vendor/jquery
  2. Populate those vendor directory from npm's dist directory or however you perfer. Just be aware of path changes if you use something else and update them in index.html.

  3. Make a directory to store photos or links to photos locally on the webserver

    $ ln -s ~/Photos photos
  4. Populate a file called purls.js which contains an array of urls referring to the files in the photos/ directory you just made.

    var purls = [
        "/photos/img1.jpg",
        ...
    ];
  5. Push to a webserver or start one locally. I use one I wrote that include SSL and basic auth:

    $ sfs -u -d . &
  6. Visit the page in your browser and see something like this:

    Screenshot

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.