Download the PHP package webx-ui/themes without Composer

On this page you can find all versions of the php package webx-ui/themes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package themes

webx-ui/themes

Site themes as layers.

A site does not copy a theme, it stands on one: its own theme/ holds only what makes it different, the packaged theme below it holds everything else, and the modules below both hold the look of their own pages. An update of the packaged theme or a module reaches the site with composer update, because nothing was copied.

Part of WebX UI. No tables, no JavaScript.

Every command of the engine is here: webx:theme:show, check, sync, make (a local theme or a packaged one), extract and eject, and Testing\ThemeContract — the test every theme runs. The rules a theme keeps are in RULES.md.

Requirements

Install

Then name the top of the chain in .env or config/webx-themes.php:

theme is a directory of the site with a theme.json; a Composer package name (webx-ui/theme-default) works too. Empty — the default — means no theme, and the package does nothing at all.

A theme

A packaged theme is a Composer package of "type": "webx-theme" that describes itself under extra.webx.theme:

A local theme has no composer.json; it keeps the same keys under theme in theme/theme.json:

uses is what the theme stands on, first entry highest. A chain may be any length; a loop is an error at boot, and so is a theme that cannot be found — a site that silently lost a layer would render half-styled.

Views live in the theme's views/: views/components/layout.blade.php is what <x-layout> renders, views/vendor/webx-pages/show.blade.php overrides the pages module's show view.

Icons

Each layer's icons/<name>.svg — a lowercase, dashed name, a viewBox, currentColor for its paint — becomes a <symbol> of one sprite, the higher layer winning by name. webx:theme:sync publishes it to public/themes/icons/<hash>/icons.svg; a template points at it:

One em and the colour of the text; a stylesheet sizes it by class. With label it is role="img" with that name instead of aria-hidden. An unknown name, or a sprite sync has not published, is an empty <svg> — never an exception on a page — and webx:theme:check names it in the layers' views and block templates, along with an inline <svg> and an icon file that paints in a literal colour. A new icon in a local theme shows after webx:theme:sync.

Assets

A picture that belongs to a theme — a background, a decoration, a placeholder — lives in the assets/ folder of a layer, and a template asks for it by its path there:

The highest layer with the file answers, so a local theme replaces a picture of the theme below by putting a file at the same path. webx:theme:sync publishes the files of every layer — a package's under public/themes/<vendor>/<name>/<hash>/, a local theme's assets/ under public/themes/local-<directory>/<hash>/ — and the hash is of the content, so the server may cache /themes/ forever. A path no layer has, or one a layer got after the last sync, is an empty string — never an exception on a page — and in debug the log says which; webx:theme:check names a theme_asset('…') with a literal path no layer answers, in the layers' views and block templates.

Words of the layout

"Skip to content", the label of a contact block, the 404 page — the words a theme's templates print rather than take from a field — live in lang/<locale>/theme.php of a layer and are read as theme::theme.<key>:

A key is looked up through the chain: each layer's file bottom up, then the site's lang/vendor/theme/<locale>/theme.php, so a local theme renames one word by having that key alone. A layer lists the languages it covers in locales of its manifest, and webx:theme:check holds it to them: every listed language has the keys of the layer's en, no more and no fewer — a key added in English and forgotten in Polish would print theme.shell.skip on a Polish page. A language the layer does not list is not compared: it only overrides a word or two there.

How views are looked up

Kind Order
view('home') resources/views → each layer's views/, top first
view('ns::show') resources/views/vendor/ns → each layer's views/vendor/ns, top first → the module's own

The first file found wins. The chain is resolved once, after every package has booted, and never changes in the life of the process.

Tokens

A site's style is written in one vocabulary of tokens, the same for every theme, module and block: color-bg, color-accent, color-accent-2, font-heading, space-1…space-8, radius-md, container-width, duration and the rest — on the page --site-<name>. Each layer gives values in its tokens.json:

Values merge bottom up: the lowest layer's defaults, each layer above, then the preset the highest layer names in its manifest ("preset": "night"). The look is the theme's files, in git: nothing in the panel or the environment changes it. vocabulary adds names of the theme's own (color, length, font, shadow, number, time, easing); the engine's names cannot be redeclared. Every value is checked against its type — a name the vocabulary does not know or a value of the wrong shape in a tokens.json fails at boot, and so does a preset the chain does not declare.

In the layout's <head>:

prints one inline <style> with :root { --site-… }, then each layer's stylesheet bottom up: a packaged layer's dist/theme.css from public/themes/ (copied there by php artisan webx:theme:sync — run it after composer update), a local layer's src/css/theme.css and src/js/theme.js through the site's Vite. Without a theme it prints nothing.

Where a CSS variable does not reach — mail, an inline SVG:

A letter writes these values into style="…": mail clients read no CSS variable and often no <style>. webx:theme:check reads the views under mail/ of every layer and resources/views/mail/ of every installed module, and names a var( or a literal colour there.

PHP

What the chain gives and from where — php artisan webx:theme:show prints it, --json for a script — is ThemeReport:

The token rule for one stylesheet — what webx:theme:check runs on every file of the chain:

Modules in the theme

A module with public pages carries its base look in resources/theme/*.css — site tokens of the engine's vocabulary and its own classes, listed under «Classes» of its AGENTS.md. webx:theme:sync writes every installed module's stylesheets into one file, public/themes/modules/<hash>/modules.css (ModuleStyles), and @webxTheme links it under the theme layers, so a theme restyles a module by writing the same class later in the cascade. webx:theme:check reads the same files.

A module's own test checks the contract with a trait:

A theme adds to a module's page without overriding it at the module's extension points: @webxPart('recipe-card', …) prints views/parts/recipe-card.blade.php of the first layer that has it, before the module's partial (a point with dots is directories: parts/catalog/card/badges).

A theme under development that Composer does not know about can be pointed at directly:

A theme's test

Every theme — the site's theme/ and a packaged one — runs the engine's contract in its PHPUnit test; webx:theme:make writes it, green from the first run:

The chain builds with the theme on top, every token has a value, webx:theme:check finds nothing, text reads in every preset (WCAG AA), the layout keeps @webxTheme, @webxSeo, @webxBlocks and both regions, the theme's views compile, and a packaged dist/ is built from src/ (ThemeSources). The same checks as lists of what is wrong, for a script: Testing\ThemeProbe.

Making, extracting, ejecting

Extract and eject compare the look of the chain before and after and name every difference — ThemeLook::of($chain) and ThemeLook::differences($before, $after) — and print the Composer and npm commands to run instead of running them.

Read more

License

MIT


All versions of themes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
composer-runtime-api Version ^2.2
illuminate/console Version ^13.0
illuminate/filesystem Version ^13.0
illuminate/support Version ^13.0
illuminate/view Version ^13.0
webx-ui/cache Version ^0.101.1
webx-ui/compositions Version ^0.101.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webx-ui/themes contains the following files

Loading the files please wait ...