npm package: @glimpse-of-life/hugo-font-emoticons
Description: Font-based emoticons for Hugo - automatic text emoticon to icon conversion
Author: Carsten Nichte
Latest version: 1.0.5

# Hugo Font Emoticons

A Hugo module for automatically converting text emoticons into graphical icons.

[![npm version](https://img.shields.io/npm/v/@glimpse-of-life/hugo-font-emoticons.svg)](https://www.npmjs.com/package/@glimpse-of-life/hugo-font-emoticons)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Installation

### Via npm (recommended for Thulite/Doks)

```bash
npm install @glimpse-of-life/hugo-font-emoticons
```

Then in `config/_default/module.toml`:

```toml
## Font Emoticons
[[mounts]]
  source = "node_modules/@glimpse-of-life/hugo-font-emoticons/assets"
  target = "assets"

[[mounts]]
  source = "node_modules/@glimpse-of-life/hugo-font-emoticons/static"
  target = "static"
```

### Via Hugo-Modul

```bash
hugo mod init github.com/your-username/your-site
```

In `config/_default/module.toml`:

```toml
[[imports]]
  path = "github.com/cnichte/hugo-font-emoticons"
```

### Local development

```toml
[[mounts]]
  source = "../hugo-font-emoticons/assets"
  target = "assets"

[[mounts]]
  source = "../hugo-font-emoticons/static"
  target = "static"
```

## integration

### SCSS

In your `_custom.scss` or main SCSS file:

```scss
@import "components/emoticons";
```

### JavaScript

In your footer partial or script inclusion:

```html
{{ partial "footer/esbuild" (dict "src" "js/emoticons.js" "load" "defer" "transpile" false) }}
```

Or manually:

```html
{{ $emoticons := resources.Get "js/emoticons.js" | minify | fingerprint }}
<script defer src="{{ $emoticons.RelPermalink }}"></script>
```

## Usage

Simply write emoticons in your Markdown text:

```markdown
That's great. :D

Would you like some coffee? :coffee:

I love that. <3
```

## Unterstützte Emoticons

### Smileys

| Icon | Patterns |
|------|----------|
| 😊 Happy | `:)` `:-)`  `(:` `(-:` `:smile:` |
| 😞 Sad | `:(` `:-(` `:sad:` |
| 😉 Wink | `;)` `;-)` `:wink:` |
| 😛 Tongue | `:P` `:-P` `:p` `:-p` `:razz:` |
| 😁 Grin | `:D` `:-D` `:grin:` |
| 😎 Cool | `8)` `8-)` `B)` `B-)` `:cool:` |
| 😮 Surprised | `:o` `:-o` `:O` `:-O` `:eek:` `:shock:` |
| 😴 Sleep | `-.-` `-_-` `:sleep:` |
| 😢 Cry | `:'(` `:'-(` `:cry:` |
| 😆 Laugh | `^^` `^_^` `:lol:` |
| 😠 Angry | `X(` `X-(` `:angry:` `:mad:` |
| 😕 Displeased | `:/` `:-/` |
| 👼 Saint | `O:)` `O:-)` `:saint:` |
| 😈 Devil | `>:)` `>:-)` `:devil:` `:twisted:` |
| 😑 Squint | `\|)` `:squint:` |

### Symbole

| Icon | Patterns |
|------|----------|
| ❤️ Heart | `<3` `:heart:` |
| ☕ Coffee | `:coffee:` |
| 🍺 Beer | `:beer:` |
| ⭐ Star | `:star:` |
| ❓ Help | `:?:` |
| ℹ️ Info | `:!:` `:idea:` |

### Gesten

| Icon | Patterns |
|------|----------|
| 👍 Thumbs Up | `:thumbsup:` `:thumbs:` |
| 👎 Thumbs Down | `:thumbsdown:` |
| ✅ OK | `(ok)` `(/)` |
| ❌ Cancel | `(x)` |
| ➕ Plus | `(+)` |
| ➖ Minus | `(-)` |
| 🔫 Shoot | `:shoot:` |

## Adjustments

### Content selectors

By default, JavaScript searches in:

- `article p, li, td, blockquote, dd`
- `.content p, li, td, blockquote, dd`
- `main p, li, td, blockquote, dd`

## Lizenz

- Font-Emoticons: GPLv2 or later
- Dieses Modul: MIT

## Credits

Basierend auf dem [WordPress Plugin font-emoticons](https://wordpress.org/plugins/font-emoticons/)