Sommerregen/grav-plugin-smileys

Request: Add 'Pixel Emotes' to list of smiley packs

Opened this issue · 2 comments

I put together a (not quite complete) pack of emoticons compatible with Grav. Could it be added to the list of available smiley packs?

Link here: https://github.com/Phlum/Pixel-Emotes

I should mention that it requires editing smileys.css, because some of the emoticons are more than 15px in height.

Hi @Phlum those are nice smileys! I'll add your package asap to the list. Concerning the stylesheet, I see the only difference is the max-height: 2ex; option. I set it once to fix the maximum icon height to the line-height. Maybe there is a better workaround for this?

FYI I have reworked the plugin. Unfortunately, I don't have the time right now to finish it. But I'll let you know. Basically it'll be backward-compatible, but let's you attach your own stylesheets and comes with multi-language support. You can find a sneak preview of the syntax below

config:
  # Smileys location and allowed file types
  directory: "icons"                  # Relative path to smileys folder
  extensions: "@all"                  # Consider all image file types

  # Assets
  assets:                             # Add additional assets to page (relative to the smiley pack)
    - "assets/smileys.css"

  # Template (how to render smileys)
  template: '<img src="{{ base_url_simple ~ smiley.src }}" alt="{{ smiley.acronym|e("html_attr") }}" title="{{ ("PLUGINS.SMILEYS.PACKS." ~ package.name ~ "." ~ smiley.id)|upper|ts|default(smiley.name) }}{{ smiley.acronym ? " " ~ smiley.acronym|e("html_attr") : ""}}" class="{{ smiley.classes|default("smileys") }}" draggable="false" />'

Thanks! I made a colour pack as well - they're both in http://github.com/Phlum/Pixel-Emotes - easier to update that way.

Maybe there is a better workaround for this?

Yeah, sorry about that. I tend to be a bit liberal when it comes to the height of emoticons, and stuff like Angel and Rock On just ended up being a bit blurry. I think your solution of having custom stylesheets per pack is the best option.

Is there any way I can help, despite my lack of PHP knowledge? :S