Giter VIP home page Giter VIP logo

merlin04 / crest-branding Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apigovau/crest-branding

2.0 2.0 0.0 935 KB

TypeScript port of the Australian Government's logo generator API

Home Page: https://aus-crest.vercel.app/stacked.png?agency=Department%20of%20Porting%20Things%20to%20TypeScript&height=600

License: MIT License

TypeScript 100.00%
typescript branding australia logo crest canvas express

crest-branding's Introduction

Australian Government - Department of Porting Things to TypeScript

Australian Government Crest Branding API - in TypeScript!

Port information

This is a TypeScript/Express port of the Australian Government's branding API to generate logos with text (originally written in Kotlin and Spring Boot). The logos it generates are almost identical to the original ones (just some small font rendering differences), and from some unscientific tests it appears to be substantially faster. The actual API/query parameter usage is backwards compatible with the original implementation, but there are additional features.

API docs

This api generates Government logos using the coat of arms that follow the guidelines

Although this api is live, it's not monitored or setup to horizontally scale.

Use it in production at your risk.

You're better off using it to generate images and then serve them yourself

Examples

Inline

https://aus-crest.vercel.app/inline.png?agency=Department%20Of%20Finance&height=200

Inline

Stacked

https://aus-crest.vercel.app/stacked.png?agency=Department%20Of%20Finance&height=200

Inline

Inline with multiple agencies

https://aus-crest.vercel.app/inline.png?agency=Department%20Of%20Health&agency=Department%20of%20Foreign%20Affairs%20and%20Trade&agency=Attorney-General%27s%20Department&height=200

Inline with multiple agencies

Stacked with multiple agencies

https://aus-crest.vercel.app/stacked.png?agency=Department%20Of%20Health&agency=Department%20of%20Foreign%20Affairs%20and%20Trade&agency=Attorney-General%27s%20Department&height=200

Inline with multiple agencies

Inline and tertiary (also with forced new line)

https://aus-crest.vercel.app/inline.png?agency=Department%20of%20the%0APrime%20Minister%20and%20Cabinet&agency=%7CGovernment%20Branding%20Unit&height=200

Inline and tertiary

Basic usage

There are two endpoints:

Inline usage

https://aus-crest.vercel.app/inline.png

Stacked usage

https://aus-crest.vercel.app/stacked.png

Params

Both endpoints take the same parameters:

'agency'

The name of the agecny to display.

You can add as many '&agency' paramaters as you like, they will be added in order.

The guidelines cater for sub-headings, for things such as function names.

These use a non-bold font.

If you prepend an 'agency' param with a pipe char (|, or %7C), that text will be a sub-heading

Lines won't wrap.

If you want to break up a line, add a newline (\n, or %0A).

'height'

Sets the total height of the image.

The width is derrived based on the longest 'agency' parameter

'square'

Overrides the natural aspect-ratio of the images and pads it out to be a square

'custom_govt'

Overrides the "Australian Government" text with the parameter value

crest-branding's People

Contributors

colugo avatar merlin04 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.