Giter Site home page Giter Site logo

imo-tikuwa / yellow-blob-picker Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 872 KB

Android5および7で採用されていた黄色スライムくんをアイコンピッカーとして使用するjqueryプラグインです

License: MIT License

SCSS 97.23% JavaScript 2.77%

yellow-blob-picker's Introduction

yellow-blob-picker

This is a jquery plugin that uses Yellow blob, which was used in Android 5 and 7, as an icon picker.

yellowBlobPicker

A list of available icons and a demo of the icon picker.

Usage

  1. Load jquery.yellow-blob-picker.css in the head.
<link rel="stylesheet" href="css/jquery.yellow-blob-picker.css">
  1. Load jquery.yellow-blob-picker.js after loading jquery.
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="js/jquery.yellow-blob-picker.js"></script>
  1. Call yellowBlobPicker().
<input type="text" id="icon-picker" name="picker1" />
<script type="text/javascript">
  $('#icon-picker').yellowBlobPicker();
</script>

About icon display outside the icon picker.

You can display the yellow-blob icon outside the icon picker by using the $.createYellowBlobIcon function.

<script type="text/javascript">
  let icon = 'android5-u1f60a';
  $('.display-icon').html($.createYellowBlobIcon(icon));
</script>

Example.

Display the icon picker. And show the selected icon in the .display-icon element when the "change" event fires.

<input type="text" id="icon-picker" name="picker1" />
<div class="display-icon" style="font-size:64px"></div>
<div class="display-icon" style="font-size:32px"></div>
<div class="display-icon" style="font-size:16px"></div>
<script type="text/javascript">
  $(() => {
    let $picker = $('#icon-picker').yellowBlobPicker({
      iconsPerPage: 30,
      emptyIcon: false,
    });
    $picker.on('change', e => {
      $('.display-icon').html($.createYellowBlobIcon(e.target.value));
    });
    $('.display-icon').html($.createYellowBlobIcon($picker.val()));
  });
</script>

Options

The icon picker itself uses the fontIconPicker plugin.
Therefore, among the options of the fontIconPicker plugin, options other than "source" and "iconGenerator" can be used as they are.

Credits

  • The emoji embedded within the plugin is licensed under the Apache License 2.0.
    • Of the svg files used as the source of the web font, the icon using linearGradient was replaced with a single color (#fcc21b) before use.
  • The fontIconPicker embedded within the plugin is licensed by MIT.

yellow-blob-picker's People

Contributors

imo-tikuwa avatar

Watchers

 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.