Download the PHP package nolte/lean-styleguide without Composer

On this page you can find all versions of the php package nolte/lean-styleguide. 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 lean-styleguide

The LEAN Theme's styleguide

View in a single page all your coded UI components.

By default it reads the atoms, molecules, organisms and templates from the components folder of the Lean Theme.0

The styleguide can be accessed on [site-url]/styleguide

How to use

Component Autoload

The UI components will be loaded automatically.

If they don't show up then you may need to pass dummy data. (Read next section)

Passing dummy data to the components in the styleguide

To pass the arguments to the components in the styleguide, you will need to create a json file named exactly as the component and declare the data in the following format:

example:

Component filename: link.php

Component dummy data filename: link.json

Declaring component variants

Simply create another object in the variants array:

example:

Note: the style argument is a keyword convention in the styleguide. You can declare multiple styles for a component and they will be printed in the component's heading info section.

Current version supports to 4 styles per component:

style

style2

style3

style4

Setting a variable placeholder

Sometimes it's useful to have a variable placeholder as a component's argument value.

For example if the component uses the function wp_get_attachment_image(), you can set an image placeholder.

Use this hook to create placeholders:

Now you can use the placeholder in the json dummy files like so:

example:

Placeholder usage:

Configurations

Change the template file

Use this filter: lean_styleguide_template

example:

Adding your own template in the theme's folder.

Important: The custom template will need to have this 3 action calls:

do_action( 'lean_styleguide_header' );

do_action( 'lean_styleguide_content' );

do_action( 'lean_styleguide_footer' );

You can view the styleguide-template.php from this library for reference.

Add code to the Head tag

Use this action: lean_styleguide_header

example:

Add code to the Footer tag

Use this action: lean_styleguide_footer

example:

Change the component's folder path

Use this filter: lean_styleguide_component_dir_path

example:

Change the styleguide's CSS stylesheet

Use this filter: lean_styleguide_css

example:


All versions of lean-styleguide with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2 || >=8.0
moxie-lean/loader Version ^1.3
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 nolte/lean-styleguide contains the following files

Loading the files please wait ....