diff --git a/app/(navigation)/(code)/assets/tinybird.svg b/app/(navigation)/(code)/assets/tinybird.svg new file mode 100644 index 00000000..cc35d9e2 --- /dev/null +++ b/app/(navigation)/(code)/assets/tinybird.svg @@ -0,0 +1,10 @@ + + \ No newline at end of file diff --git a/app/(navigation)/(code)/components/Editor.module.css b/app/(navigation)/(code)/components/Editor.module.css index 26333734..0e2b7fd7 100644 --- a/app/(navigation)/(code)/components/Editor.module.css +++ b/app/(navigation)/(code)/components/Editor.module.css @@ -158,3 +158,8 @@ font-family: var(--font-soehne-mono), "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", monospace; font-weight: 400; } + +.iaWriterMono { + font-family: var(--font-ia-writer-mono), "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", monospace; + font-weight: 400; +} diff --git a/app/(navigation)/(code)/components/Editor.tsx b/app/(navigation)/(code)/components/Editor.tsx index 6e8560e9..61e73a42 100644 --- a/app/(navigation)/(code)/components/Editor.tsx +++ b/app/(navigation)/(code)/components/Editor.tsx @@ -250,7 +250,9 @@ function Editor() { ? styles.firaCode : themeFont === "soehne-mono" ? styles.soehneMono - : styles.jetBrainsMono, + : themeFont === "ia-writer-mono" + ? styles.iaWriterMono + : styles.jetBrainsMono, isHighlightingLines && styles.isHighlightingLines, showLineNumbers && selectedLanguage !== LANGUAGES.plaintext && [ diff --git a/app/(navigation)/(code)/components/Frame.module.css b/app/(navigation)/(code)/components/Frame.module.css index 9304ee9e..c8b125f2 100644 --- a/app/(navigation)/(code)/components/Frame.module.css +++ b/app/(navigation)/(code)/components/Frame.module.css @@ -913,3 +913,129 @@ display: none; } } + +.tinybirdFrame { + position: relative; + overflow: hidden; + background: #151515; + font-family: var(--font-ia-writer-mono); +} + +.tinybirdWindow { + position: relative; + z-index: 1; + border: 1px solid #c2c2c2; + border-bottom: none; + background: #151515; + clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%); +} + +.tinybirdWindow { + mask-image: linear-gradient(to bottom, #151515 70%, transparent 100%); +} + +.tinybirdWindow::after { + position: absolute; + z-index: 100; + top: -4px; + right: -28px; + width: 59px; + height: 5px; + background: #c2c2c2; + content: ""; + transform: rotate(45deg); + transform-origin: left; +} + +.tinybirdHeader { + position: relative; + display: flex; + height: 32px; + align-items: center; + justify-content: flex-start; + padding: 0 12px; + background: #151515; + gap: 8px; +} + +.tinybirdHeader::before { + position: absolute; + right: -2px; + bottom: 0px; + left: 0px; + height: 1px; + background-image: linear-gradient(to right, transparent 0%, #27f795 10%, #27f795 100%); + content: ""; + mask-image: linear-gradient(to left, transparent 50%, #151515 99%, #151515 100%); +} + +.tinybirdCircle { + width: 12px; + height: 12px; + border: 2px solid #c2c2c2; + border-radius: 50%; + margin-right: 0px; + background-position: center; + background-repeat: no-repeat; + background-size: contain; +} + +.tinybirdCircleText { + color: #27f795; + font-size: 12px; + font-weight: 700; +} + +.tinybirdFileName { + position: relative; + display: grid; + align-items: center; + color: #ffffff; + font-size: 12px; + font-weight: 700; + + > input { + color: rgba(0, 0, 0, 0); + } + + > input:focus + span { + display: block; + } +} + +.tinybirdFrameLightMode { + background: #ffffff; + + .tinybirdWindow { + background: #ffffff; + } + + .tinybirdHeader { + background: #ffffff; + } + + .tinybirdCircleText { + color: #151515; + } + + .tinybirdFileName { + color: #151515; + } + + .tinybirdHeader::before { + background-image: none; + } + + .tinybirdWindow { + border: 1px solid #151515; + } + + .tinybirdWindow::after { + background: #151515; + } + + .tinybirdHeader::before { + background-image: linear-gradient(to right, transparent 0%, #151515 10%, #151515 100%); + mask-image: linear-gradient(to left, transparent 50%, #151515 99%, #151515 100%); + } +} diff --git a/app/(navigation)/(code)/components/Frame.tsx b/app/(navigation)/(code)/components/Frame.tsx index 8a4b44ac..472fe480 100644 --- a/app/(navigation)/(code)/components/Frame.tsx +++ b/app/(navigation)/(code)/components/Frame.tsx @@ -254,6 +254,45 @@ const OpenAIFrame = () => { ); }; +const TinybirdFrame = () => { + const [darkMode] = useAtom(darkModeAtom); + const [padding] = useAtom(paddingAtom); + const [showBackground] = useAtom(showBackgroundAtom); + const [fileName, setFileName] = useAtom(fileNameAtom); + + return ( +