Giter VIP home page Giter VIP logo

gallery.maximeborg.es's Introduction

๐Ÿ“ท Static photos gallery made with Preact. Each albums is generated using a script to index the photos and generating the thumbnails.


Run !

1. Clone this repo:

git clone https://github.com/maximeborges/gallery.maximeborg.es.git gallery.maximeborg.es
cd gallery.maximeborg.es

2. Install dependencies:

yarn

or (slower)

npm install

3. Add albums:

cp -r ~/Images/My-Album/ ./to_process/

4. Build !:

yarn build

You're done! Now serve the build folder from wherever you want!

Serving

Since this application use preact-router, you can access any page with a simple rewrite rule from your reverse-proxy. There is an example using Caddy:

gallery.maximeborg.es {
    header / server "AN AMAZING UNICORN"
    tls contact@maximeborg.es
    root /var/www/gallery.maximeborg.es
    gzip
    rewrite / {
        ext !jpg !jpeg !png
        to {path} /
    }
}

The extensions line (ext !jpg !jpeg !png) in the rewrite section allows to have direct access to images via their URL, and not to be redirected to the html content

Development

The web part of this application is based on preact-boilerplate, you can check out the developement workflow section to get how to work on this project.

The processing of the albums is done with the process.js file. It's a little bit messy in there but I got it working perfectly for me. If anyone want to imporve it, pull request are welcomed!


License

MIT

gallery.maximeborg.es's People

Contributors

maximeborges avatar

Watchers

 avatar  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.