Module z_lib_include

Support for the {% lib filename ...

Copyright © (c) 2009-2020 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Support for the {% lib filename ... %} tag in the templates. Generates the <link /> or %lt;script /%gt; tag for css or js files. Also adds the greatest modification date so that updates are loaded by the browser.

Data Types

option()

option() = minify | {minify, boolean()} | async | {async, boolean()} | absolute_url | {absolute_url, boolean()} | {media, binary()} | {rel, binary()} | {title, binary()}

options()

options() = [option()]

Function Index

tag/2Generate the link and/or script tags for the given files.
tag/3Generate the link and/or script tags for the given files.
uncollapse/1Given the filepath of the request, return all files collapsed in the path.
url/2Generate urls for the given files, js and css files are separated.
url/3Generate urls for the given files, js and css files are separated.

Function Details

tag/2

tag(Files::[binary()], Context::z:context()) -> [[binary()]]

Generate the link and/or script tags for the given files.

tag/3

tag(Files::[binary()], Args::options(), Context::z:context()) -> [[binary()]]

Generate the link and/or script tags for the given files.

uncollapse/1

uncollapse(Path::string() | binary()) -> [binary()]

Given the filepath of the request, return all files collapsed in the path.

url/2

url(Files::[binary()], Context::z:context()) -> [binary()]

Generate urls for the given files, js and css files are separated.

url/3

url(Files::[binary()], Args::options(), Context::z:context()) -> [binary()]

Generate urls for the given files, js and css files are separated.


Generated by EDoc