Coder Social home page Coder Social logo

photosheet's Introduction

⚠️ Experimental, contains CSS tricks

Originally made to generate an HTML/CSS-only document, but I could not find a way to reliably use :focus-within to show and hide the lightbox container. I might revisit it if/when :target-within gets implemented in browsers, or if I find another idea. Please check v0.1 for a more minimal JS-free solution.

The idea behind the images slideshow is explained here: https://codepen.io/cadars/pen/PoJGMNP


Requirements: PHP

  1. Put your images in the img folder
  2. Open http://example.com/photosheet.php in your browser
  3. Save as index.html or else

Or from the command-line:

php photosheet.php > index.html

  • Images should be a reasonable size and compressed beforehand, as no thumbnails are generated
  • figure.landscape and figure.portrait are available for styling
  • Navigate within the lightbox on tap/click, swipe/scroll, on focus with Tab, or with the keys

Default variables in photosheet.php:

$site_title = "Photographs of Roadside America";
$site_desc = "by John Margolies";
$site_style = "style.css";
$img_folder = "img/john-margolies";
$allowed_types = ["gif","jpg","jpeg","png","webp"];

Default variables in style.css:

--textsize: 16px;
--textcolor: #eee;
--backcolor: #0e0e0f;
--margin: calc(0.8em + 1vw);
--thumbsize: 156px;
--slide-transition: auto;

photosheet's People

Contributors

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