This file contains hidden or 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
| const postmark = require("postmark"); // require mail service, postmark in this case | |
| const client = new postmark.Client("XXXXXXXXXXXXXXXXXXXXXXXXXXXX"); // your postmark api key | |
| const headers = { | |
| "Access-Control-Allow-Origin" : "*", // better change this for production | |
| "Access-Control-Allow-Methods": "POST", | |
| "Access-Control-Allow-Headers": "Content-Type" | |
| }; |
This file contains hidden or 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
| <template lang="html"> | |
| <div> | |
| <form @submit="handleSubmit"> | |
| <input | |
| v-model="contactForm.name" | |
| name="name" | |
| type="text" | |
| > | |
| <input | |
| v-model="contactForm.email" |
This file contains hidden or 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 React from "react" | |
| import styled, { css } from "styled-components" | |
| import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd" | |
| import { AddIcon, DragIcon, ReorderIcon, TrashIcon } from "@tinacms/icons" | |
| import { | |
| padding, | |
| color, | |
| radius, | |
| font, | |
| IconButton, |
This file contains hidden or 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 React from 'react'; | |
| import styled from 'styled-components' | |
| import { FieldsBuilder } from '@tinacms/form-builder' | |
| const Condition = ({ input, field, form }) => { | |
| const nestedFields = field.fields(input.value); | |
| const conditionalFields = nestedFields.map(f => { | |
| const fieldPath = field.name.split('.').slice(0, -1) | |
| const name = fieldPath.concat(f.name).join('.') |
This file contains hidden or 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
| export interface HttpService { | |
| get<T = any>(url: string, options?: HttpOptions): Promise<T>; | |
| post<T = any>(url: string, data?: {}, options?: HttpOptions): Promise<T>; | |
| patch<T = any>(url: string, data?: {}, options?: HttpOptions): Promise<T>; | |
| put<T = any>(url: string, data?: {}, options?: HttpOptions): Promise<T>; | |
| delete<T = any>(url: string, options?: HttpOptions): Promise<T>; | |
| } | |
| export interface HttpOptions { | |
| params?: HttpParams; |
This file contains hidden or 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 { motion, useInView, useScroll, useTransform } from "framer-motion"; | |
| import { useElementViewportPosition } from "hooks/use-element-viewport-position"; | |
| import { useRef, useEffect, useState } from "react"; | |
| export const ScrollReveal = ({ offset = 0, once = true, children }) => { | |
| const [initiallyVisible, setInitiallyVisible] = useState(false); | |
| const [ended, setEnded] = useState(false); | |
| const ref = useRef(null); | |
| const isInView = useInView(ref); | |
| const { position } = useElementViewportPosition(ref, offset); |
OlderNewer