npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apollos-web-embeds

v2.0.11

Published

Apollos React embed widgets

Downloads

677

Readme

Apollos Embeds

Apollos React Embeds are pre-built components designed for easy integration into third-party websites, such as Webflow. These components provide seamless functionality for features like authentication, content feeds, and banner widgets, ensuring a consistent user experience across all digital platforms.

Using Embeds in Webflow

1. Adding Script Tags

Copy the script tags below and paste them into the Custom Code section of your Webflow dashboard. Scroll down to the Footer Code block and insert the following:

<link href="https://apollos.site/sdk/index.css" rel="stylesheet" />
<script src="https://apollos.site/sdk/index.js" defer></script>

2. Adding the Embed Divs

Navigate to the design section of your Webflow site and add a div element for each embed. Currently, we support two main embeds: Auth and FeatureFeed. You will likely need both, so create two separate divs.

3. Adding the apollos-widget Class

Ensure that each embed div has the apollos-widget class. This class is essential for the embed functionality.

Webflow embed example

4. Adding Custom Attributes

To specify which embed appears in each div and control the displayed church content, use data-attributes (or Custom Attributes in Webflow).

  • Auth Embed: Add data-type="Auth" and data-church="[INSERT_CHURCH_SLUG_HERE]". Example for Bayside:
<div class="apollos-widget" data-type="Auth" data-church="bayside"></div>

Auth embed attributes

  • FeatureFeed Embed: Add data-type="FeatureFeed" and data-church="[INSERT_CHURCH_SLUG_HERE]". Example for Bayside:
<div class="apollos-widget" data-type="FeatureFeed" data-church="bayside"></div>

FeatureFeed embed attributes

5. Church Slugs

[!NOTE] Replace [INSERT_CHURCH_SLUG_HERE] with your church's unique identifier (or slug). Contact a developer if you need assistance obtaining a church slug.

For Developers

Background

This package was originally located in the apollos-embeds repository and involved significant duplication of frontend code, components, and GraphQL queries. To unify our web frontend development, we created canvas-ui-web as a component library. The apollos-embeds project has been moved into this repository to coexist with our other web platforms.

The original version of web-embeds was heavily dependent on modal presentation. This new package retains selective use of modals while encouraging users to navigate to Apollos microsites, which run on New Web.

How It Works

We bundle this package and its dependencies into the /widget folder, creating index.js and index.css files. These files are then served through the New Web sdk.$filename route. By including these in the <head> of a webpage, users can access these embeds. Placing an apollos-widget div on the page triggers the web embed functionality.

Local Development

To work on this package locally, ensure you have a valid Feature Feed ID. Use index.html for testing with examples. Keep in mind that embeds from different churches on the same page may cause conflicts, so ensure you only use one church per page. You should be running apollos-cluster as well as this entire repo by running yarn dev.

Sample Embed:

<div
  data-type="FeatureFeed"
  data-church="apollos_demo"
  data-feature-feed="FeatureFeed:caf294f0-cd0e-4486-95e7-fa11bd5fb1c5"
  data-modal="true"
  class="apollos-widget"
></div>

To test changes, open http://localhost:5174 in your browser.

Enabling Caching for Local Development

To test caching in local development, modify the Apollo client configuration by commenting out the x-cache-me-not header in:

../packages/web-shared/client/apollosApiLink.js

'x-cache-me-not': 1,

Available Options

| data-type | | ----------- | | Auth | | FeatureFeed |