Skip to content

Commit

Permalink
Merge branch 'develop' into spilit-config
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulmathur16 committed Sep 28, 2024
2 parents 47a21e9 + de780fd commit dc34f4b
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 27 deletions.
3 changes: 0 additions & 3 deletions docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import Version from "../src/components/Version"
import InstallCommand from "../src/components/install"
import Tabs from "@theme/Tabs"
import TabItem from "@theme/TabItem"
import Video from "../src/components/video"

<Video />

## Installing the Tailcall CLI

Expand Down
9 changes: 9 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ export default {
trailingSlash: true,
tagline: "GraphQL platform engineered for scale",
headTags: [
{
tagName: "script",
attributes: {
id: "chatbotscript",
"data-accountid": "CZPG9aVdtk59Tjz4SMTu8w==",
"data-websiteid": "75VGI0NlBqessD4BQn2pFg==",
src: "https://app.robofy.ai/bot/js/common.js?v=" + new Date().getTime(),
},
},
{
tagName: "script",
attributes: {
Expand Down
24 changes: 24 additions & 0 deletions src/components/home/IntroductionVideo/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React, {useRef} from "react"
import "./style.css"

const IntroductionVideo: React.FC = () => {
const videoId = "1011521201"
const videoRef = useRef<HTMLDivElement>(null)

return (
<div className="video-wrapper" ref={videoRef}>
<div className="video-container">
<iframe
src={`https://player.vimeo.com/video/${videoId}?autoplay=0&badge=0&autopause=0&player_id=0&app_id=58479`}
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
className="absolute top-0 left-0 w-full h-full"
title="Tailcall Introduction Video"
loading="lazy"
/>
</div>
</div>
)
}

export default IntroductionVideo
72 changes: 72 additions & 0 deletions src/components/home/IntroductionVideo/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.video-wrapper {
padding: 1.75rem;
background-color: #fff;
position: relative;
overflow: hidden;
}

.video-wrapper::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: linear-gradient(90deg, #c5c5c5 1px, transparent 1px), linear-gradient(#c5c5c5 1px, transparent 1px);
background-size: 100px 50px;
background-position: -1px -1px;
opacity: 0.5;
max-width: 1595px;
margin-left: auto;
margin-right: auto;
}

.video-container {
position: relative;
width: 100%;
overflow: hidden;
padding-bottom: 56.25%;
border-radius: 0.375rem;
z-index: 10;
box-shadow: 0px 4px 32px 0px #ffe933;
background-image: url("/static/images/video-thumbnail.webp");
background-size: 100%;
}

.video-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
}

@media (min-width: 768px) {
.video-wrapper {
padding: 7rem /* 112px */;
}
.video-container {
border-radius: 1.5rem /* 24px */;
}
}

@media (min-width: 1536px) {
.video-container {
max-width: 80rem;
margin-left: auto;
margin-right: auto;
aspect-ratio: 16/9;
padding-bottom: 0;
}
.video-wrapper::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(ellipse at center, transparent 50%, white 85%);
}
}
2 changes: 2 additions & 0 deletions src/components/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import Discover from "../shared/Discover"
import Configuration from "./Configuration"
import Testimonials from "./Testimonials"
import Announcement from "../shared/Announcement"
import IntroductionVideo from "./IntroductionVideo"
const HomePage = (): JSX.Element => {
return (
<div className="">
<Banner />
<Configuration />
<IntroductionVideo />
<Testimonials />
<Benefits />
<Graph />
Expand Down
16 changes: 0 additions & 16 deletions src/components/video.tsx

This file was deleted.

8 changes: 6 additions & 2 deletions src/theme/Navbar/Content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ const NavbarContent = (): JSX.Element => {

const items = useNavbarItems()
const [leftItems, rightItems] = splitNavbarItems(items)

const pageHasSearch = () => {
let location = window.location.pathname.split("/")[1]
let allowedPaths = ["docs", "graphql"]
return allowedPaths.includes(location)
}
const searchBarItem = items.find((item) => item.type === "search")

return (
Expand All @@ -187,7 +191,7 @@ const NavbarContent = (): JSX.Element => {
// TODO stop hardcoding items? (added by docusaurus)
// Render left navbar items
<>
{mobileSidebar.shouldRender && <Search />}
{mobileSidebar.shouldRender && pageHasSearch() && <Search />}
{!mobileSidebar.disabled && <NavbarMobileSidebarToggle />}
<NavbarLogo />
<NavbarItems items={leftItems} />
Expand Down
37 changes: 31 additions & 6 deletions src/theme/SearchBar/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@
display: none;
}

.DocSearch-Container > div {
width: 100vw;
border-radius: 0;
height: 100vh;
}

.DocSearch-Dropdown {
max-height: unset;
height: 80vh;
}

.DocSearch-Modal {
width: 100vw;
height: 100vh;
border-radius: 0px;
}

.DocSearch-Container {
z-index: 201;
position: fixed;
Expand All @@ -140,6 +140,31 @@
border-radius: 10px;
border: 1px solid var(--ifm-color-brand-light-600);
}

.DocSearch-Button-Keys,
.DocSearch-Button-Placeholder {
display: none;
}

.DocSearch-Cancel {
appearance: none;
background: none;
border: 0;
color: var(--docsearch-highlight-color);
cursor: pointer;
display: inline-block;
flex: none;
font: inherit;
font-size: 1em;
font-weight: 500;
margin-left: var(--docsearch-spacing);
outline: none;
overflow: hidden;
padding: 0;
-webkit-user-select: none;
user-select: none;
white-space: nowrap;
}
}

.DocSearch-Button-Key {
Expand Down
Binary file added static/images/video-thumbnail.webp
Binary file not shown.
3 changes: 3 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ module.exports = {
SPACE_20: "80px",
SPACE_21: "160px",
},
screens: {
"3xl": "2200px",
},
},
fontFamily: {
"space-grotesk": ["Space Grotesk", "sans-serif"],
Expand Down

0 comments on commit dc34f4b

Please sign in to comment.