GooglePlayIcon
GooglePlayIcon
Installation
If available in Hex, the package can be installed
by adding google_play_icon
to your list of dependencies in mix.exs
:
def deps do
[
{:google_play_icon, "~> 0.1.0"}
]
end
usage
in your layout template place the following in the footer block
google_play_id = "122223232"
main_image = "path/to/image"
images = [
{"path/to/image", "700px", "min-width", "image/jpeg"},
{"path/to/image", "1400px", "max-width", "image/jpeg"}
]
text = "this is the alt text"
## render the defaults
GooglePlayIcon.render(google_play_id, main_image)
## render the defaults with srcsets
GooglePlayIcon.render(google_play_id, main_image, images)
## render the defaults with custom alt image
GooglePlayIcon.render(google_play_id, main_image, images, text)
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/google_play_icon.