Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LunarLoony opened this issue Mar 18, 2016 · 2 comments
Open

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

LunarLoony opened this issue Mar 18, 2016 · 2 comments

Comments

@LunarLoony
Copy link

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.

@Sommerregen
Copy link
Owner

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" />'

@LunarLoony
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants