Wednesday, November 26, 2014

PaymentFont for Seaside

Project info

The “PaymentFont for Seaside” project is a small Seaside wrapper for the PaymentFont project. FontPayment is a “sleek SVG webfont containing 74 icons of all main payment operators and methods”.

Project location

The project is located on STHub at http://smalltalkhub.com/#!/~UdoSchneider/PaymentFont/

Screenshot

PaymentFont for Seaside Examples Browser

License

PaymentFont is licensed under SIL OFL 1.1. The CSS files are licensed under the MIT License. The Pharo Smalltalk wrapper code is under MIT License.

Installation

Gofer new
    url: 'http://smalltalkhub.com/mc/UdoSchneider/PaymentFont/main';
    package: 'ConfigurationOfPaymentFont';
    load.
((Smalltalk at: #ConfigurationOfPaymentFont) project stableVersion) load.

Run the Demo locally

Start the web server for Seaside - for instance with Zinc evaluate:

ZnZincServerAdaptor startOn: 8080

Now point your browser to http://127.0.0.1:8080/paymentfont

Use in your own application

Necessary Seaside libraries

To add PaymentFont to your Seaside application you just have to add the appropriate seaside file libraries containing the CSS and fonts to your Seaside application.

Depending on the scenario there is a PFDeploymentLibrary and a PFDevelopmentLibrary that you will find in the package PaymentFont-Core in the category PaymentFont-Core-Libraries.

Have a look at the #register method in the PFExamplesHome class for an example.

Use in your code

If the PaymentFont library is registered with your Seaside application you can use the #pfPaymentIcon selectors in your usual rendering methods (like #renderContentOn:):

renderContentOn: html
    html pfPaymentIcon amazon

Packages

  • PaymentFont-Core - package with the core, contains anything you need in an own app
  • PaymentFont-Tests - package with the SUnit tests
  • PaymentFont-Examples - example package for the demo

Testing

The package comes with 74 tests in the package PaymentFont-Tests. Just use the SUnit TestRunner to run them.

No comments: