• Stars
    star
    185
  • Rank 207,637 (Top 5 %)
  • Language
    PHP
  • License
    Mozilla Public Li...
  • Created over 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is an identification tag based on SVG, It can quickly generate various labels and status identifiers

Badge

This is an identification tag based on SVG, It can quickly generate various labels and status identifiers.

v5.0.0 New version testing

The new border mode can also customize the border color, redesign and adjust the fillet of the badge to make it look more stereoscopic, and add new functions to optimize the program code.

Sponsor

test example:

    https://org.vercel.app

Sponsors Example

Heart Sponsor

    $Badge->Icon = file_get_contents({LOGO}); //<path d="M23....." fill="#FFF"></path>
    array(
     array({MESSAGE},{COLOR})
    );

Hits Example

Hits

    //https://example.com/Hits/{USERNAME}/{PROJECT}/image.svg
    
    ++$count;
    array(
     array('hits','555555'),
     array($count,'4C1')
    );

Server Example

Server

    //https://example.com/Server/{USERNAME}/{PROJECT}/image.svg
    
    array(
     array('{OS}','555555'),
     array('CPU: {CPU}','A0ABFC'),
     array('RAM: {RAM}','F0A010')
    );    

State Example

error Active PAGES thumb passed

    //https://example.com/Label/{LOGO}/{MESSAGE}/{COLOR}.svg
    
    //get logo file
    $Badge->Icon = file_get_contents({LOGO}); //<path d="M23....." fill="#FFF"></path>
    $Badge->viewBox = '-120 -85 1200 1200'; //Svg Icon x, y, Width, Height
    $Badge->opacity = 0.7; //transparency (0 - 1)
    
    array(
     array({MESSAGE},{COLOR})
    );

Label Example

tag license size download

languages watch star fork

    //https://example.com/Label/{LABEL}/{MESSAGE}/{COLOR}.svg
    
    $Badge->Icon = file_get_contents({LOGO}); //<path d="M23....." fill="#FFF"></path>
    array(
     array({LABEL},'555555'),
     array({MESSAGE},{COLOR})
    );

Travis CI badge

Travis-ci

codecov badge

codecov

Packagist badge

Version Downloads

Github badge

Downloads Size

Installation

Use Composer to install the library. Of course, You can go to Packagist to view.

    $ composer require yakeing/php_badge

Initialization parameter

  • Sample:
    $arr = array(
        array('build', '555'), //#555555
        array('passing', '4c1'), //#44CC11
        ..........
    );

    $Badge = new Badge();
    $Badge->svg($arr);

Sponsor

If you've got value from any of the content which I have created, then I would very much appreciate your support by payment donate.

Sponsor

Author

weibo: yakeing

twitter: yakeing

More Repositories

1

QRCode

This is a class of php QR Code, This library helps you generate QR codes in a jiffy.
PHP
59
star
2

php_fsockopen

fsockopen is socket package function, in addition to the basic commonly used TCP:// communication function, it also has other powerful communication function, UDP://, unix:// / udg:// and so on various protocols
PHP
51
star
3

php_session

This is a SESSION class function package, use more easily, just a few simple functions can use it.
PHP
51
star
4

php_curl

Curl is an open source file transfer tool that uses URL syntax to work on the command line, where the basic functions of curl are encapsulated, such as COOKIES / encrypted transport / HTTP authentication / analog forms / upload files, etc.
PHP
36
star
5

php_jwsign

This is a function wrapping through the Openssl to sign and validate the data, which ensures the integrity and security of the original data.
PHP
34
star
6

str_increment

This is string increment class that can be used extensively for uppercase or lowercase letters as well as for various hexadecimal characters
PHP
33
star
7

get_header

This function is similar to the get_headers function
PHP
33
star
8

php_template

PHP TEMPLATE ANALYSIS, It can quickly compile the original template and generate HTML display pages.
PHP
32
star
9

https.js

JavaScript Http
JavaScript
20
star
10

dnspod_api

The DNSPod User API is restricted to individual users, making it easier and more flexible for users to manage their own domain names and records.
PHP
6
star
11

php_letsencrypt

PHP SSL for letsencrypt.com acme v02
PHP
3
star
12

php_saekv

imitate sina cloud SaeKV class
PHP
1
star