Download the PHP package imsky/holder without Composer

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

Holder

Holder renders image placeholders in browser using SVG.

Used by thousands of open source projects (including Bootstrap v3) and many other sites.

No extra requests, small bundle size, highly customizable.

npm Travis Build Status Package Quality NerdyData Popularity jsDelivr Hits

Installing

Usage

Include holder.js in your HTML:

Holder will then process all images with a specific src attribute, like this one:

The above tag will render as a placeholder 300 pixels wide and 200 pixels tall.

To avoid console 404 errors, you can use data-src instead of src.

Programmatic usage

To programmatically insert a placeholder use the run() API:

Placeholder options

Placeholder options are set through URL properties, e.g. holder.js/300x200?x=y&a=b. Multiple options are separated by the & character.

Themes

Holder includes support for themes, to help placeholders blend in with your layout.

There are 6 default themes: sky, vine, lava, gray, industrial, and social.

Customizing themes

Themes have 5 properties: fg, bg, size, font and fontweight. The size property specifies the minimum font size for the theme. The fontweight default value is bold. You can create a sample theme like this:

If you have a group of placeholders where you'd like to use particular text, you can do so by adding a text property to the theme:

Using custom themes

There are two ways to use custom themes with Holder:

The first approach is the easiest. After you include holder.js, add a script tag that adds the theme you want:

The second approach requires that you call run after you add the theme, like this:

Using custom themes and domain on specific images

You can use Holder in different areas on different images with custom themes:

Inserting an image with custom theme

You can add a placeholder programmatically by chaining Holder calls:

The first argument in addImage is the src attribute, and the second is a CSS selector of the parent element.

Text

Holder automatically adds line breaks to text that goes outside of the image boundaries. If the text is so long it goes out of both horizontal and vertical boundaries, the text is moved to the top. If you prefer to control the line breaks, you can add \n to the text property:

html

html

html

html html js var img = $('#placeholder').get(0); Holder.setResizeUpdate(img, false); js Holder.setResizeUpdate(img, true); css #sample {background:url(?holder.js/200x200?theme=social) no-repeat} html
html
js plugins: [ new webpack.ProvidePlugin({ 'Holder': 'holderjs', 'holder': 'holderjs', 'window.Holder': 'holderjs' }) ] ``` ## Browser support * Chrome * Firefox 3+ * Safari 4+ * Internet Explorer 9+ (with partial support for 6-8) * Opera 12+ * Android (with fallback) ## Source * GitHub: * GitLab: ## License Holder is provided under the [MIT License](http://opensource.org/licenses/MIT). ## Credits Holder is a project by [Ivan Malopinsky](http://imsky.co).

All versions of holder with dependencies

PHP Build Version
Package Version
Requires robloach/component-installer Version *
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 imsky/holder contains the following files

Loading the files please wait ....