MercadoPago Payment Methods Logos, Sprites and CSS sorted by countries and sizes. View the demo
For default size logos, just copy the css file for each country (1) from the dist
folder into your project and add them to your css bundles (2).
In case you need a bigger size, or both sizes, you need to generate the custom files following the Development setup and File generation instructions.
-
Open your terminal and clone
mercadolibre/payment-methods-component
by running:$ git clone [email protected]:mercadolibre/payment-methods-component.git
-
Now go to the project's folder:
$ cd payment-methods-component
-
Install its dependencies:
$ npm install
-
Install
grunt-cli
:$ npm install grunt-cli -g
You can generate all together files:
sh creator.sh
You'll find the generated files in the build
folder.
- ar (Argentina)
- br (Brazil)
- cl (Chile)
- co (Colombia)
- mx (Mexico)
- pe (Perú)
- ve (Venezuela)
- uy (Uruguay)
- default
- large
-
Each logo as its own class with the prefix
paymentmethod-
. Por example:paymentmethod-visa
-
You can use them in any element.
<!-- Unordered List --> <ul> <li class="paymentmethod-visa">Visa</li> <li class="paymentmethod-master">Mastercard</li> <li class="paymentmethod-amex">American Express</li> </ul>
<!-- Span --> <span class="paymentmethod-visa">Visa</span>
<!-- With Inline Text --> <p> <span class="paymentmethod-visa">Visa</span> terminada en 1234 </p>
-
Extend the size for large logos using the
paymentmethod-large
class:<!-- This is a large logo --> <span class="paymentmethod-visa paymentmethod-large">Visa</span>
-
Each payment method class uses the id field from the MercadoPago Payment Methods API, so you can use variables to be able to use this service and load the logos dinamically.
<li class="paymentmethod-${id}">${name}</li>
-
Use one file per country. Only load the component for that country.
-
Add it to your own bundles, don't make an extra request for it.
Please follow the corresponding ennumeration for the version. You will generate a new version if:
-
Change anything of the images
-
Change the images references in the css
-
Change or agregate new css rules
For generate a new version:
- Make a new branch cloning
master
or useRelease
for the changes. - Make your changes in the css or images.
- Upload via FTP the assets for the new version to this url
http://secure.mlstatic.com/org-img/ui/payment-methods
- Make a Replace All in all the project, replacing the old version (ex.
1.3.0
) for the new version (ex.1.3.2
)
- Make you shure that you change the version in all the css sheets, the
package.json
and theindex.html
.
- Run
creator.sh
for generate the build and dist for the new version of component. - Test the componet whit the index.html.
- Merge the new branch into
master
- Merge
master
intogh-pages
branch - Generate a tag whit the corresponding ennumeration
git tag 1.3.x
- Push all the branches changed:
master
,Release
,gh-pages
and the tag for the version.
You can generate a file by country and by size using Grunt commands:
Ex: payment methods for Argentina with the default size:
grunt build --country=ar
Ex: Payment methods for Argentina and large size:
grunt build --country=ar --size=large
Ex: Payment methods for Argentina with both default and large size:
grunt build --country=ar --size=defaul,large
You'll find the generated files in the build
folder.
Stuff that are coming on future versions:
- Gulp task runner
- A better demo
- Style guide for logo grouping on some countries
- Generic payment type logos
## Maintained by
- Gastón André ([email protected])
- Ivan Pianciola ([email protected])
- Adolfo Ramos ([email protected])
- Santiago Barchetta ([email protected])
- Samuel Bustamante ([email protected])
## Thanks to
- Nati Devalle (@taly)
- Guille Paz (@pazguille)
## Credits
## License Licensed under the MIT license.
Copyright (c) 2016 MercadoLibre.