Download the PHP package contao-themes-net/font-awesome-inserttag-bundle without Composer

On this page you can find all versions of the php package contao-themes-net/font-awesome-inserttag-bundle. 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 font-awesome-inserttag-bundle

Font Awesome Inserttag Bundle

Dieses Bundle installiert einen InsertTag, mit dessen Hilfe Font Awesome Icons als Font oder via SVG in Contao genutzt werden können.

About Font Awesome

The full suite of pictographic icons, examples, and documentation can be found at: https://fontawesome.com/

License

Allgemeine Form des Tags

Das Tag beginnt mit dem Prefix und ihm folgen drei weitere Parameter. Parameter 1 und 2 sind erforderlich, Parameter 3 und 4 sind optional und können auch weggelassen werden. Das Tag besteht also insgesamt aus 4 Parametern. Die allgemeine Form sieht so aus:

{{fa::name::classes::styles}}
{{fa-brands::name::classes::styles}}
{{fa-regular::name::classes::styles}}
{{fa-solid::name::classes::styles}}

Der erste Parameter »fa«

...ist konstant und kennzeichnet das Tag.

Der zweite Parameter »name«

...muss durch den Namen des Icons ersetzt werden. Dabei sollte der Name des Icons verwendet werden, wie er auf der Seite Font Awesome Icons angegeben ist: https://fontawesome.com/search?m=free&o=r - also ohne Prefix !

Beispiel:

{{fa-solid::check}}

Der dritte Parameter »classes«

...kann (ist optional) eine oder mehrere CSS-Klassen-Namen enthalten. Für das Bereitstellen der Klasse müssen die Administratorinnen und Administratoren selbst Sorge tragen. Mehrere Klassen-Namen können wie im class-Attribute eines HTML-Tags notiert werden - also auch durch Leerzeichen getrennt.

Beispiel:

{{fa-solid::check::class1 class2 class3}}
Achtung! Die Vordergrundfarbe (color) kann für ein SVG-Element als Bild nicht durch das style-Attribute gesetzt werden!

Der vierte Parameter »styles«

...kann (ist optional) eine oder mehrere Style-Angaben enthalten.

Beispiel:

// for svg (svg: true)
{{fa-solid::check::fa-spin fa-3x fa-fw::width:50px;background-color:orangered;border-radius: 50px;}}

// for icon font
{{fa-solid::check::fa-spin fa-3x fa-fw::font-size:3em;background-color:orangered;border-radius: 50px;}}

Konfiguration

Das Font Awesome Inserttag Bundle kann mit der parameters.yml konfiguriert werden. Diese wird wie folgt mitgeliefert:

Die Konfiguration befindet sich unterhalb des Schlüssels font_awesome_config.

Zurzeit werden dort zwei Schlüssel ausgewertet. Der Schlüssel use und local_source.

use

Mit dem Schlüssel use können die Darstellungsmethoden der Icons festgelegt werden. Fallback ist icon_font: true.

Soll statt der Icon-Font die Methode SVG als Bild zum Einsatz kommen, so muss icon_font: false und svg: true gesetzt sein. Es werden nun img-Tags ausgegeben.

Mittels svg_sprites: true und svg: false werden die Icons als SVG-Sprites eingebunden.

Soll die Generierung der SVG Tags per Javascript erfolgen, kannst du zu svg: true zusätzlich js: true nutzen.

Über css: false lässt sich das automatische Laden der Font Awesome CSS-Datei deaktivieren. Wenn ausschließlich SVG-Icons genutzt werden, ist das CSS in der Regel nicht erforderlich (standardmäßig aktiviert).

Beispiele:

Icon Font

SVG als Bild

SVG-Sprites

SVG + JavaScript

local_source

Über local_source: 'files/dein-pfad-zum-fontawesome-ordner' kannst du den Pfad zu Font Awesome anpassen, um zum Beispiel die Pro-Variante oder eine andere Font Awesome Version einzubinden. Gib dazu den kompletten Pfad ab files zum Font Awesome Ordner, wo die Ordner css, js, svgs usw. enthalten sind, an.


Font Awesome Inserttag

This bundle installs an InsertTag that allows Font Awesome icons to be used as a font or via SVG in Contao.

General form of the tag

The tag starts with the prefix fa and it is followed by three more parameters. Parameters 1 and 2 are required, parameters 3 and 4 are optional and can be omitted. So the tag consists of a total of 4 parameters. The general form looks like this:

{{fa::name::classes::styles}}
{{fa-brands::name::classes::styles}}
{{fa-regular::name::classes::styles}}
{{fa-solid::name::classes::styles}}

The first parameter »fa«

...is constant and identifies the tag.

The second parameter »name«

...must be replaced by the name of the icon. The name of the icon should be used as shown on the Bootstrap Icons page: https://icons.getbootstrap.com - that is, without the fa- prefix!

Example:

{{fa-solid::check}}

The third parameter »classes«

...may (is optional) contain one or more CSS class names. The administrators must take care of providing the class themselves. Multiple class names can be noted as in the class attribute of an HTML tag - i.e. also separated by spaces.

Example:

{{fa-solid::check::class1 class2 class3}}

The fourth parameter »styles«

...may (is optional) contain one or more style statements.

Example:

// for svg (svg: true)
{{fa-solid::check::fa-spin fa-3x fa-fw::width:50px;background-color:orangered;border-radius: 50px;}}

// for icon font
{{fa-solid::check::fa-spin fa-3x fa-fw::font-size:3em;background-color:orangered;border-radius: 50px;}}

Configuration

The Font Awesome Inserttag Bundle can be configured using parameters.yml. This is supplied as follows:

The configuration is located below the font_awesome_config key.

Currently, two other keys are evaluated there. The local_source key and the use key.

use

The use key can be used to define the four display methods of the icons. Fallback is icon_font: true.

If the SVG as image method is to be used instead of the icon font, icon_font: false and svg: true must be set. Now img tags will be output.

Using svg_sprites: true and svg: false you can use icons included as svg sprites.

If you want the SVG tags to be generated by Javascript, you can use svg: true and js: true. in addition.

Using css: false, the automatic loading of the Font Awesome CSS file can be disabled. If only SVG icons are used, the CSS is usually not required (enabled by default).

Examples:

Icon Font

SVG as image

SVG Sprites

SVG + JavaScript


All versions of font-awesome-inserttag-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
contao/core-bundle Version ^4.13 || ^5.0
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 contao-themes-net/font-awesome-inserttag-bundle contains the following files

Loading the files please wait ...