EN FR
← Packages

jdz/frontui

Framework-free front Twig helpers (assets, lazy images)

Overview

Framework-agnostic front UI helpers for simple Slim/Twig sites — the front-end counterpart to jdz/adminui. Small, dependency-light Twig helpers shared by sites that ship the jizy-front.js / jizy-front.css bundle without a framework runtime.

Features

  • asset(file, versionable = true) — root-absolute URL with an optional cache-busting ?v=… query
  • jizyImg(src, alt, zoom = false) — native-lazy <img> with width/height read from the source file; zoom adds the data-zoom attribute the bundled Modalizer.picviewer reads to open a gallery layer
  • Html\Helper — sanitises / normalises WYSIWYG content for front display (clean(), cleanDom()), with cleanBlocks() / cleanLinks() subclass hooks
  • Html\Attributes — parse / merge HTML tag attribute strings
  • Thumbnail generation intentionally out of scope — a simple front site serves the original asset with native lazy-loading

Installation

composer require jdz/frontui