diff --git a/app/web/config/tailwind.config.js b/app/web/config/tailwind.config.js
index ea1ef82..90382d8 100644
--- a/app/web/config/tailwind.config.js
+++ b/app/web/config/tailwind.config.js
@@ -22,6 +22,7 @@ module.exports = {
800: '#1A1A1D',
750: '#222222',
760: '#232532',
+ 710: '#2B303C', // TODO: Use HSL so I stop adding grays to fix the warm/cool problem
700: '#2A3038',
600: '#3B3E4B',
550: '#63636A',
@@ -66,6 +67,9 @@ module.exports = {
gridAutoColumns: {
'preview-layout': 'minmax(30rem, 1fr) minmax(auto, 2fr)',
},
+ gridTemplateColumns: {
+ 'profile-layout': 'minmax(32rem, 1fr) 2fr',
+ },
keyframes: {
'bounce-sm': {
'0%, 100%': {
diff --git a/app/web/src/components/Hero/AssetWithGooey.tsx b/app/web/src/components/Hero/AssetWithGooey.tsx
index 8a45ce7..dc8f83f 100644
--- a/app/web/src/components/Hero/AssetWithGooey.tsx
+++ b/app/web/src/components/Hero/AssetWithGooey.tsx
@@ -43,8 +43,7 @@ export default function AssetWithGooey({
+
)
}
@@ -73,22 +73,22 @@ function Gooey() {
const dist = Math.random() * 3 + 2.5
const x = randomSign(Math.random() * dist)
const y = randomSign(Math.sqrt(dist * dist - x * x))
- const z = randomSign(Math.random() * 3)
+ const z = randomSign(Math.random() * 2)
const position: [number, number, number] = [x, z, y]
const size = Math.random() * 0.8 + 0.1
- const distort = Math.random() * 0.8 + 0.1
- const speed = (Math.random() * 0.8) / size / size + 0.1
+ const distort = (size > .1) ? Math.random() * .6 * size + 0.2 : 0
+ const speed = (size > .1) ? (Math.random() * 0.8) / size / size + 0.1 : 0
return { position, size, distort, speed }
})
const secondSet = Array.from({ length: 5 }).map((_, index) => {
const dist = Math.random() * 3 + 1.5
const x = randomSign(Math.random() * dist)
const y = randomSign(Math.sqrt(dist * dist - x * x))
- const z = randomSign(Math.random() * 3)
+ const z = randomSign(Math.random() * 2)
const position: [number, number, number] = [x, z, y]
const size = Math.random() * 0.2 + 0.05
- const distort = Math.random() * 0.8 + 0.1
- const speed = (Math.random() * 0.5) / size / size + 0.1
+ const distort = (size > .1) ? Math.random() * .8 * size + 0.2 : 0
+ const speed = (size > .1) ? (Math.random() * 0.5) / size / size + 0.1 : 0
return { position, size, distort, speed }
})
return [...firstSet, ...secondSet]
diff --git a/app/web/src/components/IdeHeader/IdeHeader.tsx b/app/web/src/components/IdeHeader/IdeHeader.tsx
index f2199c5..7ca76a6 100644
--- a/app/web/src/components/IdeHeader/IdeHeader.tsx
+++ b/app/web/src/components/IdeHeader/IdeHeader.tsx
@@ -11,6 +11,7 @@ import ProfileSlashLogin from 'src/components/ProfileSlashLogin'
import Gravatar from 'src/components/Gravatar/Gravatar'
import EditableProjectTitle from 'src/components/EditableProjecTitle/EditableProjecTitle'
import CaptureButton from 'src/components/CaptureButton/CaptureButton'
+import { ReactNode } from 'react'
const TopButton = ({
onClick,
@@ -44,6 +45,7 @@ interface IdeHeaderProps {
projectOwnerId?: string
projectOwnerImage?: string
projectId?: string
+ children?: ReactNode
}
const IdeHeader = ({
@@ -53,6 +55,7 @@ const IdeHeader = ({
projectOwnerImage,
projectId,
projectOwnerId,
+ children,
}: IdeHeaderProps) => {
const { currentUser } = useAuth()
const { project } = useIdeContext()
@@ -97,89 +100,19 @@ const IdeHeader = ({
)}
- {canEdit && !projectTitle && (
-
(
-
-
-
- )}
/>
+ ) : (
+ children
)}
- {!projectTitle && (
-
-
-
- )}
- {projectTitle && (
-
- navigate(routes.ide({ userName: _projectOwner, projectTitle }))
- }
- name="Editor"
- >
-
-
- )}
-
-
- {({ open }) => {
- return (
- <>
-
-
-
-
-
- {open && (
-
-
-
-
-
-
-
-
-
-
- encoded script
- external script
-
-
-
- )}
- >
- )
- }}
-
{/* Fork */}
-
+
@@ -189,3 +122,96 @@ const IdeHeader = ({
}
export default IdeHeader
+
+function DefaultTopButtons({
+ project,
+ projectTitle,
+ _projectOwner,
+ handleRender,
+ canEdit,
+}) {
+ return (
+ <>
+ {canEdit && !projectTitle && (
+
(
+
+
+
+ )}
+ />
+ )}
+ {!projectTitle && (
+
+
+
+ )}
+ {projectTitle && (
+
+ navigate(routes.ide({ userName: _projectOwner, projectTitle }))
+ }
+ name="Editor"
+ >
+
+
+ )}
+
+ {({ open }) => {
+ return (
+ <>
+
+
+
+
+
+ {open && (
+
+
+
+
+
+
+
+
+
+
+ encoded script
+ external script
+
+
+
+ )}
+ >
+ )
+ }}
+
+ >
+ )
+}
diff --git a/app/web/src/components/ImageUploader/ImageUploader.js b/app/web/src/components/ImageUploader/ImageUploader.js
index d61f67a..ce96622 100644
--- a/app/web/src/components/ImageUploader/ImageUploader.js
+++ b/app/web/src/components/ImageUploader/ImageUploader.js
@@ -11,6 +11,26 @@ import Svg from 'src/components/Svg'
const CLOUDINARY_UPLOAD_PRESET = 'CadHub_project_images'
const CLOUDINARY_UPLOAD_URL = 'https://api.cloudinary.com/v1_1/irevdev/upload'
+export function ImageFallback({
+ width = 100,
+ imageId = 'CadHub/eia1kwru54g2kf02s2xx',
+ className = '',
+}) {
+ return (
+
+
+
+ )
+}
+
export default function ImageUploader({
onImageUpload = () => {},
imageUrl,
@@ -65,36 +85,24 @@ export default function ImageUploader({
}
style={{ paddingBottom: `${(1 / aspectRatio) * 100}%` }}
>
-
+
{cloudinaryId && isEditable && (
-