Skip to content

Commit

Permalink
move example project
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn authored Feb 13, 2022
1 parent 2da0031 commit 4e34508
Show file tree
Hide file tree
Showing 40 changed files with 40 additions and 148 deletions.
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/quick_request.md

This file was deleted.

24 changes: 0 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/conventional-pr.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/npm-release.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
{
resolve: '@jaenjs/jaen',
options: {
jaenProjectId: 1
jaenProjectId: 2
}
},
'@chakra-ui/gatsby-plugin',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,29 @@
"organization": {
"name": "Example, Inc.",
"url": "https://example.com",
"logo": "https://lengstorf.com/android-chrome-512x512.png"
"logo": "https://osg.snek.at/storage/BQACAgQAAxkDAAIGEGIHjCjfdFFSe3Y7teMnwoRmtHm5AAI9DAACH4xBUE1uwhSrbVRpIwQ"
},
"social": {
"twitter": "@jlengstorf",
"fbAppID": ""
},
"categories": [
{
"slug": "test",
"name": "Test Category"
},
{
"slug": "test",
"name": "Test Category"
},
{
"slug": "test",
"name": "Test Category"
},
{
"slug": "test",
"name": "Test Category"
},
{
"slug": "test",
"name": "Test Category"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions packages/jaen/src/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ program
.description('run build steps for jaen-pages')
.option(
'-m, --migration <url>',
'jaen-pages migration (default: process.env.JAEN_PAGES_MIGRATION_URL)',
process.env.JAEN_PAGES_MIGRATION_URL
'jaen-pages migration (default: process.env.JAEN_MIGRATION_URL)',
process.env.JAEN_MIGRATION_URL
)
.action(async options => {
const JAEN_PAGES_MIGRATION_URL = options.migration
const JAEN_MIGRATION_URL = options.migration

if (!JAEN_PAGES_MIGRATION_URL) {
if (!JAEN_MIGRATION_URL) {
console.error(
'[jaen-pages] Failed to run migration -> Please specify a migration URL'
)
process.exit(1)
}

try {
await runMigration(JAEN_PAGES_MIGRATION_URL)
await runMigration(JAEN_MIGRATION_URL)
} catch (err) {
console.error(
'[jaen-pages] Failed to run migration -> You must run this command inside your gatsby app!',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {HiCloudUpload} from '@react-icons/all-files/hi/HiCloudUpload'
export type ContentValues = {
title: string
slug: string
imageUrl?: string
image?: string
description?: string
excludedFromIndex?: boolean
}
Expand Down Expand Up @@ -77,9 +77,9 @@ export const PageContent = (props: PageContentProps) => {
onAction: action => {
if (action.type === 'SELECTOR_SELECT') {
console.log(action.payload.item)
const imageUrl = action.payload.item.src
const image = action.payload.item.src

setValue('imageUrl', imageUrl, {
setValue('image', image, {
shouldDirty: true
})
}
Expand All @@ -92,6 +92,8 @@ export const PageContent = (props: PageContentProps) => {
...values
}

alert(JSON.stringify(vs, null, 2))

props.onSubmit(vs)

setDefaultValues(vs)
Expand All @@ -114,7 +116,7 @@ export const PageContent = (props: PageContentProps) => {
}

const handleImageRemove = () => {
setValue('imageUrl', undefined, {
setValue('image', '', {
shouldDirty: true
})
}
Expand Down Expand Up @@ -213,7 +215,7 @@ export const PageContent = (props: PageContentProps) => {

<Controller
control={control}
name="imageUrl"
name="image"
render={({field: {value}}) => (
<Stack
direction="row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ const PagesTab = (props: PagesTabProps) => {
}

const handlePageUpdate = React.useCallback(
(values: ContentValues) =>
selection && props.onPageUpdate(selection.id, values),
(values: ContentValues) => {
alert(`Page updated: ${JSON.stringify(values)}`)
selection && props.onPageUpdate(selection.id, values)
},
[selection]
)

Expand Down Expand Up @@ -89,7 +91,7 @@ const PagesTab = (props: PagesTabProps) => {
title: selection.jaenPageMetadata.title,
slug: selection.slug,
description: selection.jaenPageMetadata.description,
imageUrl: selection.jaenPageMetadata.image,
image: selection.jaenPageMetadata.image,
excludedFromIndex: selection.excludedFromIndex
}}
onSubmit={handlePageUpdate}
Expand Down
3 changes: 2 additions & 1 deletion packages/jaen/src/internal-plugins/pages/ui/tabs/Pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export const PagesContainer = withRedux(() => {
slug: values.slug,
jaenPageMetadata: {
title: values.title,
description: values.description
description: values.description,
image: values.image
},
excludedFromIndex: values.excludedFromIndex
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import {Button} from '@chakra-ui/react'
import {useSite} from '@jaen/services/site'
import {FiHome} from '@react-icons/all-files/fi/FiHome'
import {Link} from 'gatsby'

export const HomeButton = () => {
const siteTitle = 'Ballons & Balloons' // useStaticQuery site meta data
const site = useSite()

return (
<Button size="xs" variant={'darkghost'} leftIcon={<FiHome />}>
<Link to="/">Ballons & Ballons</Link>
<Link to="/">{site.siteMetadata.title || 'Home'}</Link>
</Button>
)
}

0 comments on commit 4e34508

Please sign in to comment.