Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed cairo-lang page #181

Merged
merged 4 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions components/Editor/EditorFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function EditorFooter({ withoutContent = false }) {
: ' '}
</span>

{isFullScreen && !withoutContent && (
{isFullScreen && (
<div className="flex items-center justify-end divide-x divide-gray-200 dark:divide-black-500">
<span className="pr-4">
Made with ❤️ by{' '}
Expand All @@ -38,10 +38,15 @@ function EditorFooter({ withoutContent = false }) {
</a>
</span>
<div className="items-center flex">
<KBarButton />
<ToggleFullScreen />
{!withoutContent && (
<>
<KBarButton />
<ToggleFullScreen />
</>
)}

<ToggleThreeColumnLayout />
<ThemeSelector />
{!withoutContent && <ThemeSelector />}
</div>
</div>
)}
Expand Down
47 changes: 19 additions & 28 deletions components/Editor/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import Image from 'next/image'
import cairoLogo from 'public/cairo_logo.png'
import Select, { OnChangeValue } from 'react-select'

import ToggleThreeColumnLayout from 'components/ToggleThreeColumnLayout'

import { CodeType } from '../../context/appUiContext'

type Props = {
Expand Down Expand Up @@ -35,37 +33,30 @@ const EditorHeader = ({
}),
[codeType],
)

return (
<>
<div className={'flex justify-between items-center w-full'}>
<div className="flex items-center">
{!onlyDropDown &&
(withLogo && !anotherTitle ? (
<div className="flex items-center text-lg font-semibold tracking-tight text-gray-900 dark:text-white">
<span className="pr-2">cairovm</span>
<Image src={cairoLogo} width={20} height={20} alt="cairo" />
<span className="pl-2">codes</span>
</div>
) : (
<div>
<h3
className={`${
!anotherTitle && 'font-semibold'
} text-md hidden xl:inline-flex items-center`}
>
<span>{!anotherTitle && 'Cairo VM'}Playground</span>
</h3>
{anotherTitle && (
<div className="text-xs text-[#BDBDBDEE]">
Cairo compiler v2.6.3
</div>
)}
</div>
))}
</div>
{!onlyDropDown &&
(withLogo && !anotherTitle ? (
<div className="flex items-center text-lg font-semibold tracking-tight text-gray-900 dark:text-white">
<span className="pr-2">cairovm</span>
<Image src={cairoLogo} width={20} height={20} alt="cairo" />
<span className="pl-2">codes</span>
</div>
) : (
<>
<h3
className={`${
!anotherTitle && 'font-semibold hidden xl:inline-flex'
} text-md items-center`}
>
<span>{!anotherTitle && 'Cairo VM'}Playground</span>
</h3>
</>
))}

<div className="flex items-center ">
{anotherTitle && <ToggleThreeColumnLayout />}
<Select
className="z-40"
onChange={onCodeTypeChange}
Expand Down
Loading