Unverified Commit f827bf0c authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

Update Redis example to use Tailwind. (#23131)

And an improved design 😄 

https://roadmap-redis.vercel.app/
parent 34e94097
......@@ -2,67 +2,31 @@
This example showcases how to use Redis as a data store in a Next.js project.
The example is a roadmap voting application where users can enter and vote for feature requests. It features the
following:
The example is a roadmap voting application where users can enter and vote for feature requests. It features the following:
- Users can add and upvote items (features in the roadmap), and enter their email addresses to be notified about the
released items.
- The API records the ip-addresses of the voters, so it does not allow multiple votes on the same item from the same IP
address.
- Users can add and upvote items (features in the roadmap)
- Users can enter their email addresses to be notified about the released items.
- The API records the ip-addresses of the voters, so it does not allow multiple votes on the same item from the same IP address.
## Demo
See
[https://roadmap.upstash.com](https://roadmap.upstash.com)
- [https://roadmap-redis.vercel.app/](https://roadmap-redis.vercel.app/)
## Deploy Your Own
You can deploy Roadmap Voting App for your project/company
using [Vercel and Upstash](https://vercel.com/integrations/upstash) clicking the below button:
This examples uses [Upstash](https://upstash.com) (Serverless Redis Database) as its data storage. During deployment,
you will be asked to connect with Upstash. The integration will help you create a free Redis database and link it to your Vercel project automatically.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fupstash%2Fserverless-tutorials%2Ftree%2Fmaster%2Froadmap-voting-app&env=LOGO&envDescription=Enter%20URL%20for%20your%20project%2Fcompany%20logo&envLink=https%3A%2F%2Fdocs.upstash.com%2Fdocs%2Ftutorials%2Froadmap_voting_app&project-name=roadmap-voting&repo-name=roadmap-voting&demo-title=Roadmap%20Voting&demo-description=Roadmap%20Voting%20Page%20for%20Your%20Project&demo-url=https%3A%2F%2Froadmap.upstash.com&integration-ids=oac_V3R1GIpkoJorr6fqyiwdhl17)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-redis&project-name=redis-roadmap&repository-name=redis-roadmap&demo-title=Redis%20Roadmap&demo-description=Create%20and%20upvote%20features%20for%20your%20product.&demo-url=https%3A%2F%2Froadmap-redis.vercel.app%2F&integration-ids=oac_V3R1GIpkoJorr6fqyiwdhl17)
## Configuration
## How to use
The application uses [Upstash](https://upstash.com) (Serverless Redis Database) as its data storage. During deployment,
you will be asked to integrate Upstash. The integration dialog will help you create an Upstash database for free and
link it to your Vercel project with the following steps:
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
### Deployment Steps
```bash
npx create-next-app --example with-redis roadmap
# or
yarn create next-app --example with-redis roadmap
```
After clicking the deploy button, enter a name for your project. Then you will be asked to install Upstash integration.
<br/>
<img src="./docs/s2.png" width="300" />
<br/>
You can sign up/sign in the following dialog:
<img src="./docs/s3.png" width="300" />
Create a free database:
<img src="./docs/s4.png" width="300" />
Select your database and the Vercel project:
<img src="./docs/s5.png" width="300" />
Click `COMPLETE ON VERCEL` button:
<img src="./docs/s6.png" width="300" />
Finish you deployment by choosing a repository to host the project. In the next step, set the URL of your project's
logo:
<img src="./docs/s7.png" width="300" />
Your Roadmap Voting Page should be ready:
<img src="./docs/s8.png" width="300" />
### Maintenance
The application uses a Redis database to store the feature requests and emails. The features requests are kept in a
sorted set with name `roadmap`. You can connect to it via Redis-cli and manage the data using the
command `zrange roadmap 0 1000 WITHSCORES`. The emails are stored in a set with name `emails`. So you can get the list
by the command `smembers emails`.
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
import Redis from 'ioredis'
const redis = new Redis(process.env.REDIS_URL)
export default redis
{
"name": "with-redis",
"version": "0.1.1",
"version": "0.1.0",
"license": "MIT",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"ioredis": "^4.22.0",
"autoprefixer": "^10.0.4",
"clsx": "^1.1.1",
"ioredis": "^4.23.0",
"next": "latest",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-toastify": "^6.0.8"
"postcss": "^8.1.10",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-hot-toast": "^1.0.2",
"swr": "^0.5.1",
"tailwindcss": "^2.0.2",
"uuid": "^8.3.2"
},
"devDependencies": {
"prettier": "^2.2.1"
"@tailwindcss/jit": "0.1.1"
}
}
import './index.css'
import 'react-toastify/dist/ReactToastify.css'
import '../styles/globals.css'
import { Toaster } from 'react-hot-toast'
// This default export is required in a new `pages/_app.js` file.
export default function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
function MyApp({ Component, pageProps }) {
return (
<>
<Component {...pageProps} />
<Toaster
position="bottom-right"
toastOptions={{
style: {
margin: '40px',
background: '#363636',
color: '#fff',
zIndex: 1,
},
duration: 5000,
}}
/>
</>
)
}
export default MyApp
import { getRedis } from './utils'
import { v4 as uuidv4 } from 'uuid'
import redis from '../../lib/redis'
export default async function upvote(req, res) {
const { title } = req.body
module.exports = async (req, res) => {
let redis = getRedis()
const body = req.body
const title = body['title']
if (!title) {
redis.quit()
res.json({
res.status(400).json({
error: 'Feature can not be empty',
})
} else if (title.length < 70) {
await redis.zadd('roadmap', 'NX', 1, title)
redis.quit()
res.json({
} else if (title.length < 150) {
const id = uuidv4()
const newEntry = {
id,
title,
created_at: Date.now(),
score: 1,
ip: 'NA',
}
await redis.hset('features', id, JSON.stringify(newEntry))
res.status(200).json({
body: 'success',
})
} else {
redis.quit()
res.json({
error: 'Max 70 characters please.',
res.status(400).json({
error: 'Max 150 characters please.',
})
}
}
import redis from '../../lib/redis'
export default async function upvote(req, res) {
const features = (await redis.hvals('features'))
.map((entry) => JSON.parse(entry))
.sort((a, b) => b.score - a.score)
res.status(200).json({ features })
}
import { getRedis } from './utils'
module.exports = async (req, res) => {
let redis = getRedis()
let n = await redis.zrevrange('roadmap', 0, 100, 'WITHSCORES')
let result = []
for (let i = 0; i < n.length - 1; i += 2) {
let item = {}
item['title'] = n[i]
item['score'] = n[i + 1]
result.push(item)
}
redis.quit()
res.json({
body: result,
})
}
import { getRedis } from './utils'
import redis from '../../lib/redis'
module.exports = async (req, res) => {
let redis = getRedis()
const body = req.body
const email = body['email']
redis.on('error', function (err) {
throw err
})
export default async function upvote(req, res) {
const { email } = req.body
if (email && validateEmail(email)) {
await redis.sadd('emails', email)
redis.quit()
res.json({
res.status(201).json({
body: 'success',
})
} else {
redis.quit()
res.json({
res.status(400).json({
error: 'Invalid email',
})
}
......
import Redis from 'ioredis'
function fixUrl(url) {
if (!url) {
return ''
}
if (url.startsWith('redis://') && !url.startsWith('redis://:')) {
return url.replace('redis://', 'redis://:')
}
if (url.startsWith('rediss://') && !url.startsWith('rediss://:')) {
return url.replace('rediss://', 'rediss://:')
}
return url
}
export function getRedis() {
return new Redis(fixUrl(process.env.REDIS_URL))
}
import { getRedis } from './utils'
import redis from '../../lib/redis'
module.exports = async (req, res) => {
let redis = getRedis()
const body = req.body
const title = body['title']
let ip = req.headers['x-forwarded-for'] || req.headers['Remote_Addr'] || 'NA'
let c = ip === 'NA' ? 1 : await redis.sadd('s:' + title, ip)
if (c === 0) {
redis.quit()
res.json({
export default async function upvote(req, res) {
const { title, id } = req.body
const ip =
req.headers['x-forwarded-for'] || req.headers['Remote_Addr'] || 'NA'
const count = ip === 'NA' ? 1 : await redis.sadd('s:' + title, ip)
if (count === 0) {
res.status(400).json({
error: 'You can not vote an item multiple times',
})
} else {
let v = await redis.zincrby('roadmap', 1, title)
redis.quit()
res.json({
body: v,
})
const entry = JSON.parse((await redis.hget('features', id)) || 'null')
const updated = {
...entry,
score: entry.score + 1,
ip,
}
await redis.hset('features', id, JSON.stringify(updated))
return res.status(201).json(updated)
}
}
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
* {
box-sizing: border-box;
}
.container {
min-height: 100vh;
padding: 0 0.5rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main {
padding: 3rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
footer {
width: 100%;
height: 100px;
border-top: 1px solid #eaeaea;
display: flex;
justify-content: center;
align-items: center;
}
footer img {
margin-left: 0.5rem;
margin-right: 0.5rem;
height: 1.5em;
}
footer a {
display: flex;
justify-content: center;
align-items: center;
}
a {
color: inherit;
text-decoration: none;
}
.title a {
color: #0070f3;
text-decoration: none;
}
.title a:hover,
.title a:focus,
.title a:active {
text-decoration: underline;
}
.title {
margin: 0;
line-height: 1.15;
font-size: 4rem;
}
.title,
.description {
text-align: center;
}
.description {
line-height: 1.5;
font-size: 1.5rem;
}
code {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}
.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
margin-top: 1rem;
}
.card {
margin: 0.2rem;
flex-basis: 85%;
padding: 1.1rem;
text-align: left;
color: inherit;
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
font-size: 1.25rem;
transition: color 0.15s ease, border-color 0.15s ease;
}
.logo {
width: 5em;
}
.upvotediv {
color: #0070f3;
float: right;
font-size: 1.9rem;
}
.blue {
color: #0070f3;
}
.upvotediv:hover,
.upvotediv:focus,
.upvotediv:active {
color: #e40d34;
}
.noborder {
border: none;
background: transparent;
font-size: 1.25rem;
width: 80%;
padding: 5px;
}
.button {
background: transparent;
font-size: 1.25rem;
float: right;
cursor: pointer;
}
@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
}
import { useState, useRef } from 'react'
import Head from 'next/head'
import { ToastContainer, toast } from 'react-toastify'
import React, { useState, useEffect, useRef } from 'react'
function Home() {
const inputNewFeature = useRef()
const inputEmail = useRef()
const logo = process.env.LOGO ? process.env.LOGO : '/logo.png'
const [loaded, setLoaded] = useState(false)
const [items, setItems] = useState([])
useEffect(() => {
refreshData()
}, [])
const refreshData = () => {
fetch('api/list')
.then((res) => res.json())
.then(
(result) => {
setItems(result.body)
setLoaded(true)
inputNewFeature.current.value = ''
},
(error) => {
console.log(error)
setLoaded(true)
}
)
}
import clsx from 'clsx'
import useSWR, { mutate } from 'swr'
import toast from 'react-hot-toast'
import redis from '../lib/redis'
const fetcher = (url) => fetch(url).then((res) => res.json())
function LoadingSpinner({ invert }) {
return (
<svg
className={clsx(
'animate-spin h-5 w-5 text-gray-900 dark:text-gray-100',
invert && 'text-gray-100 dark:text-gray-900'
)}
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
>
<circle
className="opacity-25"
cx="12"
cy="12"
r="10"
stroke="currentColor"
strokeWidth="4"
/>
<path
className="opacity-75"
fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
/>
</svg>
)
}
function Item({ isFirst, isLast, isReleased, hasVoted, feature }) {
const upvote = async (e) => {
e.preventDefault()
const vote = (event, title) => {
const requestOptions = {
const res = await fetch('/api/vote', {
body: JSON.stringify({
id: feature.id,
title: feature.title,
}),
headers: {
'Content-Type': 'application/json',
},
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ title: title }),
})
const { error } = await res.json()
if (error) {
return toast.error(error)
}
fetch('api/vote', requestOptions)
.then((response) => response.json())
.then((data) => {
if (data.error) {
toast.error(data.error, { hideProgressBar: true, autoClose: 3000 })
} else {
refreshData()
}
})
mutate('/api/features')
}
return (
<div
className={clsx(
'p-6 mx-8 flex items-center border-t border-l border-r',
isFirst && 'rounded-t-md',
isLast && 'border-b rounded-b-md'
)}
>
<button
className={clsx(
'ring-1 ring-gray-200 rounded-full w-8 min-w-[2rem] h-8 mr-4 focus:outline-none focus:ring focus:ring-blue-300',
(isReleased || hasVoted) &&
'bg-green-100 cursor-not-allowed ring-green-300'
)}
disabled={isReleased || hasVoted}
onClick={upvote}
>
{isReleased ? '✅' : '👍'}
</button>
<h3 className="text font-semibold w-full text-left">{feature.title}</h3>
<div className="bg-gray-200 text-gray-700 text-sm rounded-xl px-2 ml-2">
{feature.score}
</div>
</div>
)
}
export default function Roadmap({ features, ip }) {
const [isCreateLoading, setCreateLoading] = useState(false)
const [isEmailLoading, setEmailLoading] = useState(false)
const featureInputRef = useRef(null)
const subscribeInputRef = useRef(null)
const { data, error } = useSWR('/api/features', fetcher, {
initialData: { features },
})
if (error) {
toast.error(error)
}
const handleNewFeature = (event) => {
const requestOptions = {
const addFeature = async (e) => {
e.preventDefault()
setCreateLoading(true)
const res = await fetch('/api/create', {
body: JSON.stringify({
title: featureInputRef.current.value,
}),
headers: {
'Content-Type': 'application/json',
},
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ title: inputNewFeature.current.value }),
})
const { error } = await res.json()
setCreateLoading(false)
if (error) {
toast.error(error)
return
}
fetch('api/create', requestOptions)
.then((response) => response.json())
.then((data) => {
if (data.error) {
toast.error(data.error, { hideProgressBar: true, autoClose: 5000 })
} else {
toast.info('Your feature has been added to the list.', {
hideProgressBar: true,
autoClose: 3000,
})
refreshData()
}
})
event.preventDefault()
mutate('/api/features')
featureInputRef.current.value = ''
}
const handleNewEmail = (event) => {
const requestOptions = {
const subscribe = async (e) => {
e.preventDefault()
setEmailLoading(true)
const res = await fetch('/api/subscribe', {
body: JSON.stringify({
email: subscribeInputRef.current.value,
}),
headers: {
'Content-Type': 'application/json',
},
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email: inputEmail.current.value }),
})
const { error } = await res.json()
setEmailLoading(false)
if (error) {
return toast.error(error)
}
fetch('api/addemail', requestOptions)
.then((response) => response.json())
.then((data) => {
if (data.error) {
toast.error(data.error, { hideProgressBar: true, autoClose: 3000 })
} else {
toast.info('Your email has been added to the list.', {
hideProgressBar: true,
autoClose: 3000,
})
inputEmail.current.value = ''
refreshData()
}
})
event.preventDefault()
toast.success('You are now subscribed to feature updates!')
subscribeInputRef.current.value = ''
}
return (
<div className="container">
<div className="flex flex-col items-center justify-center min-h-screen py-2">
<Head>
<title>Roadmap Voting</title>
<title>Roadmap – Next.js and Redis Example</title>
<link rel="icon" href="/favicon.ico" />
</Head>
<main>
<h1 className="title">
<img src={logo} alt="Logo" className="logo" />
<main className="flex flex-col items-center justify-center flex-1 px-4 sm:px-20 text-center">
<div className="flex justify-center items-center bg-black rounded-full w-16 sm:w-24 h-16 sm:h-24 my-8">
<img src="/upstash.svg" alt="Upstash Logo" className="h-8 sm:h-16" />
</div>
<h1 className="text-lg sm:text-2xl font-bold mb-2">
Help us prioritize our roadmap
</h1>
<h2 className="text-md sm:text-xl mx-4">
Create or vote up features you want to see in the next release.
</h2>
<p className="description">
Help us by voting our roadmap.
<br />
<span className="blue">&#x25B2;</span>
Vote up the features you want to see in the next release.
</p>
<div className="grid">
{loaded ? (
items.map((item, ind) => (
<div className="card" key={ind}>
<span>{item.title}</span>
<div className="upvotediv">
<a
onClick={(e) => vote(e, item.title)}
href={'#' + item.title}
>
&#x25B2; {item.score}
</a>
</div>
</div>
))
) : (
<div className="card">
<img src="/loader.gif" />
</div>
)}
<div className="card">
<form onSubmit={handleNewFeature}>
<div className="flex flex-wrap items-center justify-around max-w-4xl my-8 sm:w-full bg-white rounded-md shadow-xl h-full border border-gray-100">
<div className="mx-8 w-full">
<form className="relative my-8" onSubmit={addFeature}>
<input
ref={featureInputRef}
aria-label="Suggest a feature for our roadmap"
placeholder="I want..."
type="text"
className="noborder"
ref={inputNewFeature}
placeholder="Enter a new feature request?"
maxLength={150}
required
className="pl-3 pr-28 py-3 mt-1 text-lg block w-full border border-gray-200 rounded-md text-gray-900 placeholder-gray-400 focus:outline-none focus:ring focus:ring-blue-300"
/>
<input type="submit" value="Save" className="button" />
<button
className="flex items-center justify-center absolute right-2 top-2 px-4 h-10 text-lg border bg-black text-white rounded-md w-24 focus:outline-none focus:ring focus:ring-blue-300 focus:bg-gray-800"
type="submit"
>
{isCreateLoading ? <LoadingSpinner invert /> : 'Request'}
</button>
</form>
</div>
<div className="card">
<form onSubmit={handleNewEmail}>
<div className="w-full">
{data.features.map((feature, index) => (
<Item
key={index}
isFirst={index === 0}
isLast={index === data.features.length - 1}
isReleased={false}
hasVoted={feature.ip === ip}
feature={feature}
/>
))}
</div>
<hr className="border-1 border-gray-200 my-8 mx-8 w-full" />
<div className="mx-8 w-full">
<p className="flex text-gray-500">
Leave your email address here to be notified when feature requests
are released.
</p>
<form className="relative my-4" onSubmit={subscribe}>
<input
type="text"
className="noborder"
ref={inputEmail}
placeholder="Enter your email to be notified on released items?"
ref={subscribeInputRef}
aria-label="Email for updates"
placeholder="Email Address"
type="email"
autoComplete="email"
maxLength={60}
required
className="px-3 py-3 mt-1 text-lg block w-full border border-gray-200 rounded-md text-gray-900 placeholder-gray-400 focus:outline-none focus:ring focus:ring-blue-300"
/>
<input type="submit" value="Save" className="button" />
<button
className="flex items-center justify-center absolute right-2 top-2 px-4 h-10 border border-gray-200 text-gray-900 rounded-md w-14 focus:outline-none focus:ring focus:ring-blue-300 focus:bg-gray-100"
type="submit"
>
{isEmailLoading ? <LoadingSpinner /> : 'OK'}
</button>
</form>
<div className="flex flex-col sm:flex-row justify-between items-center">
<p className="flex items-center my-8 w-full justify-center sm:justify-start">
Powered by
<img src="/vercel.svg" alt="Vercel Logo" className="h-5 mx-2" />
and
<img
src="/upstash.svg"
alt="Upstash Logo"
className="h-5 mx-2"
/>
</p>
<a
target="_blank"
rel="noopener noreferrer"
className="flex rounded focus:outline-none focus:ring focus:ring-blue-300 mb-4 sm:mb-0 min-w-max"
href="https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-redis&project-name=redis-roadmap&repository-name=redis-roadmap&demo-title=Redis%20Roadmap&demo-description=Create%20and%20upvote%20features%20for%20your%20product.&demo-url=https%3A%2F%2Froadmap-redis.vercel.app%2F&integration-ids=oac_V3R1GIpkoJorr6fqyiwdhl17"
>
<img
src="https://vercel.com/button"
alt="Vercel Deploy Button"
/>
</a>
</div>
</div>
</div>
</main>
<footer>
<a
href="https://vercel.com/integrations/upstash"
target="_blank"
rel="noopener noreferrer"
>
Powered by
<img src="/vercel.svg" alt="Vercel Logo" />
and
<img src="/upstash.png" alt="Upstash Logo" />
</a>
</footer>
<ToastContainer />
</div>
)
}
export default Home
export async function getServerSideProps({ req }) {
const ip =
req.headers['x-forwarded-for'] || req.headers['Remote_Addr'] || 'NA'
const features = (await redis.hvals('features'))
.map((entry) => JSON.parse(entry))
.sort((a, b) => {
// Primary sort is score
if (a.score > b.score) return -1
if (a.score < b.score) return 1
// Secondary sort is title
if (a.title > b.title) return 1
if (a.title < b.title) return -1
return 1
})
return { props: { features, ip } }
}
module.exports = {
plugins: {
'@tailwindcss/jit': {},
autoprefixer: {},
},
}
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 46 61"><g clip-path="url(#clip0)"><path fill="#00E9A3" d="M.098 53.118c10.045 9.946 26.33 9.946 36.375 0 10.045-9.945 10.045-26.07 0-36.017l-4.546 4.503a18.968 18.968 0 010 27.012c-7.534 7.46-19.749 7.46-27.282 0L.098 53.118z"/><path fill="#00E9A3" d="M9.192 44.114c5.022 4.973 13.165 4.973 18.188 0a12.645 12.645 0 000-18.008l-4.547 4.502a6.323 6.323 0 010 9.004c-2.512 2.487-6.583 2.487-9.094 0l-4.547 4.502zM45.567 8.097c-10.045-9.946-26.33-9.946-36.376 0-10.045 9.946-10.045 26.071 0 36.017l4.547-4.502a18.968 18.968 0 010-27.013c7.534-7.46 19.748-7.46 27.282 0l4.547-4.502z"/><path fill="#00E9A3" d="M36.473 17.101c-5.022-4.972-13.165-4.972-18.188 0a12.645 12.645 0 000 18.009l4.547-4.502a6.323 6.323 0 010-9.005c2.512-2.486 6.583-2.486 9.094 0l4.547-4.502z"/><path fill="#fff" fill-opacity=".8" d="M45.567 8.097c-10.045-9.946-26.33-9.946-36.376 0-10.045 9.946-10.045 26.071 0 36.017l4.547-4.502a18.968 18.968 0 010-27.013c7.534-7.46 19.748-7.46 27.282 0l4.547-4.502z"/><path fill="#fff" fill-opacity=".8" d="M36.473 17.101c-5.022-4.972-13.165-4.972-18.188 0a12.645 12.645 0 000 18.009l4.547-4.502a6.323 6.323 0 010-9.005c2.512-2.486 6.583-2.486 9.094 0l4.547-4.502z"/></g><defs><clipPath id="clip0"><path fill="#fff" d="M0 0h45.574v60.104H0z" transform="translate(.043 .53)"/></clipPath></defs></svg>
\ No newline at end of file
<svg width="283" height="64" viewBox="0 0 283 64" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z" fill="#000"/>
</svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 19"><path fill="#000" fill-rule="evenodd" stroke="#000" stroke-width="1.5" d="M12.04 2L2.082 18H22L12.04 2z" clip-rule="evenodd"/></svg>
\ No newline at end of file
@tailwind base;
@tailwind components;
@tailwind utilities;
body {
@apply bg-gray-50;
}
input {
/** Remove shadow on Safari iOS */
-webkit-appearance: none;
}
module.exports = {
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment