Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-alpha.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Feb 9, 2024
2 parents c817c4a + 8d32470 commit 9a676d3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Install pnpm package manager.
- name: Install pnpm package manager
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v3.0.0
with:
version: ^8
run_install: false
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [1.0.0-alpha.10] - 2024-02-09

### Features

- Add new farcaster image aspect ratio property

## [1.0.0-alpha.9] - 2024-02-08

### Documentation
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "farcaster-frames-template",
"version": "1.0.0-alpha.9",
"version": "1.0.0-alpha.10",
"keywords": [
"farcaster",
"frames",
Expand All @@ -16,7 +16,7 @@
},
"dependencies": {
"@hono/node-server": "1.7.0",
"hono": "3.12.11"
"hono": "3.12.12"
},
"devDependencies": {
"@types/eslint": "8.56.2",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { FrameSignaturePacket } from './types'
const app = new Hono()

app.get('/', (c) => {
const frameImage = `https://placehold.co/600x400?text=Hello+World`
const frameImage = `https://placehold.co/1080x608?text=Hello+World`
const framePostUrl = c.req.url

return c.html(html`
Expand All @@ -15,6 +15,7 @@ app.get('/', (c) => {
<meta property="og:image" content="${frameImage}" />
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:image" content="${frameImage}" />
<meta property="fc:frame:image:aspect_ratio" content="1.91:1" />
<meta property="fc:frame:post_url" content="${framePostUrl}" />
<meta property="fc:frame:button:1" content="Green" />
<meta property="fc:frame:button:2" content="Purple" />
Expand All @@ -39,14 +40,15 @@ app.post('/', async (c) => {
const imageText = encodeURIComponent(inputText || 'Hello World')
const imageColor = backgroundColors[buttonIndex - 1] || 'white'

const frameImage = `https://placehold.co/600x400/${imageColor}/white?text=${imageText}`
const frameImage = `https://placehold.co/1080x608/${imageColor}/white?text=${imageText}`
const framePostUrl = c.req.url

return c.html(html`
<html lang="en">
<head>
<meta property="fc:frame" content="vNext" />
<meta property="fc:frame:image" content="${frameImage}" />
<meta property="fc:frame:image:aspect_ratio" content="1.91:1" />
<meta property="fc:frame:post_url" content="${framePostUrl}" />
<meta property="fc:frame:input:text" content="Enter a message" />
<meta property="fc:frame:button:1" content="Green" />
Expand Down

0 comments on commit 9a676d3

Please sign in to comment.