This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Open graph --> | |
@php | |
$form = $page['props']['form']; | |
$backgroundColor = urlencode($form->branding->primary_color); // $form->branding->primary_color is a hex string e.g '#333333' | |
$title = urlencode($form->name); | |
if (!is_null($form->branding->logo)) { | |
$image = urlencode($form->branding->logo); | |
$ogImage = "https://api.placid.app/u/xcqiqw9tj?Background[background_color]={$backgroundColor}&FormName[text]={$title}&Logo[image]={$image}"; | |
} else { | |
$ogImage = "https://api.placid.app/u/3uugfu8j8?Background[background_color]={$backgroundColor}&FormName[text]={$title}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from 'react' | |
import Script from 'next/script' | |
export default function Home() { | |
useEffect(() => { | |
window.Reform=window.Reform||function(){(Reform.q=Reform.q||[]).push(arguments)}; | |
window.Reform('init', { | |
url: '', // Form URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from 'next/head' | |
export default function Home() { | |
return ( | |
<div> | |
<Head> | |
<script type="text/javascript"> | |
{` | |
window.Reform=window.Reform||function(){(Reform.q=Reform.q||[]).push(arguments)} | |
`} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install and setup gatsby-plugin-react-helmet plugin (https://www.gatsbyjs.com/plugins/gatsby-plugin-react-helmet/) | |
import * as React from 'react' | |
import { Helmet } from 'react-helmet' | |
const IndexPage = () => { | |
return ( | |
<main> | |
<Helmet> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://twitter.com/calebporzio/status/1151876736931549185 | |
<div class="flex"> | |
<aside class="h-screen sticky top-0"> | |
// Fixed Sidebar | |
</aside> | |
<main> | |
// Content | |
</main> |