# @triggator/public-nav-embed

Builds `NavBar` (isLoggedIn=false) as a UMD bundle for use in WordPress/Thrive Themes.

## Build

```bash
npm run build:public-nav
```

Output: `dist/public-nav.umd.js`

## WordPress Integration

**1. Deploy the bundle**

Copy or symlink `dist/public-nav.umd.js` into the WordPress theme's assets directory or serve it from the existing nginx static path.

**2. Enqueue in functions.php**

```php
wp_enqueue_script(
  'triggator-public-nav',
  get_template_directory_uri() . '/assets/js/public-nav.umd.js',
  [],
  '1.0.0',
  true
);
```

**3. Register shortcode in functions.php**

```php
add_shortcode('triggator_nav', function() {
  return '<div id="triggator-public-nav"></div>';
});
```

**4. Place in Thrive**

Drop `[triggator_nav]` into the Thrive header template or `header.php`.
