closes https://github.com/TryGhost/members.js/issues/68
Signup screen can have any combination of available plans out of 3 currently allowed - free, monthly, yearly. This fix
- Always sets a default plan on screen based on which plans are available
- Uses `Free` as default if all plans are available, falls back to first plan in list otherwise
no issue
- Site url might be added with trailing slash, which causes site apis to be called with double slash
- Removes trailing slash from siteUrl if present
no issue
- By default, we have guards to allow pages based on logged in state
- For preview mode, we switch off this guard to allow signin/signup pages to open
no issue
- Adds guard to open right page based on member logged in state from data attribute
- Updated data attribute name to `data-portal` and values same as link handling
no issue
- Handles new look feel settings for portal icon button
- Adds auto width calculation for portal button based on text
- Adds new link page for portal links and data attributes
- Added contrast color calculation for accent color complimentary text
- Added copy text utility for allowing copy to clipboard
no issue
- CSS was added as part of App initialization and not used in project
- Top-level css leaks through on the page when script is added unlike the frame's css/inline-style
no issue
- Previously, the settings used for customization were `show_beacon`, `show_signup_name` and `allowed_plans`
- These settings were renamed to `portal_button`, `portal_name` and `portal_plans` respectively
- Updates usage of settings to new names
no issue
- Uses `show_beacon` setting to show/hide the default beacon
- Uses `show_signup_name` setting to show/hide the signup name
- Uses `allowed_plans` to show/hide the plans
no issue
- So far, we had to specify fixed height to iframe based on content of page, but this was not dynamic
- Calculates height of popup dynamically with refs and assigns to iframe to allow dynamic updates as content changes
- Allows configuration and different case handling for popup without worrying about proper height
closes https://github.com/TryGhost/members.js/issues/39
- Script needs correct ghost site url to initialize correct API endpoints for fetching site/members data
- `window.location.origin` won't work as correct ghost site url in all cases, specially for sites using subdirectory setup
- New meta tag `ghost:site` is inserted on themes with correct `siteUrl`, which is used to initialize api