Merge pull request #1417 from yashsinghcodes/2.0.0

fix for the video markdown and workflow top bar.
This commit is contained in:
Frikky
2024-05-31 08:53:53 +02:00
committed by GitHub
2 changed files with 34 additions and 6 deletions
-2
View File
@@ -14936,7 +14936,6 @@ const AngularWorkflow = (defaultprops) => {
right: 0, right: 0,
left: isMobile ? 20 : leftBarSize + 20, left: isMobile ? 20 : leftBarSize + 20,
top: isMobile ? 30 : appBarSize + 20, top: isMobile ? 30 : appBarSize + 20,
pointerEvents: "none",
} }
@@ -14957,7 +14956,6 @@ const AngularWorkflow = (defaultprops) => {
<div style={topBarStyle}> <div style={topBarStyle}>
<div style={{ <div style={{
margin: "0px 10px 0px 10px", margin: "0px 10px 0px 10px",
pointerEvents: "none",
}}> }}>
<Breadcrumbs <Breadcrumbs
aria-label="breadcrumb" aria-label="breadcrumb"
+33 -3
View File
@@ -102,6 +102,35 @@ export const CopyToClipboard = (props) => {
) )
} }
export const Paragrah = (props) => {
const element = React.createElement(
`p`,
{},
props.children,
)
if (props.children[0] != undefined) {
if(typeof props.children[0] === "string") {
if (props.children[0].includes('.mp4')) {
return (
<div>
<video width="640" height="480" controls>
<source src={`${props.children[0]}`} type="video/mp4" />
</video>
</div>
)
}
}
}
return (
<div class="sdf">
{element}
</div>
)
}
export const OuterLink = (props) => { export const OuterLink = (props) => {
if (props.href.includes("http") || props.href.includes("mailto")) { if (props.href.includes("http") || props.href.includes("mailto")) {
return ( return (
@@ -581,8 +610,8 @@ const Docs = (defaultprops) => {
position: "sticky", position: "sticky",
top: 50, top: 50,
paddingTop: "0.25em", paddingTop: "0.25em",
minHeight: "93vh", minHeight: "95vh",
maxHeight: "93vh", maxHeight: "95vh",
overflowX: "hidden", overflowX: "hidden",
overflowY: "auto", overflowY: "auto",
zIndex: 1000, zIndex: 1000,
@@ -941,6 +970,7 @@ const Docs = (defaultprops) => {
h5: Heading, h5: Heading,
h6: Heading, h6: Heading,
a: OuterLink, a: OuterLink,
p: Paragrah,
} }
@@ -1188,7 +1218,7 @@ const Docs = (defaultprops) => {
// Padding and zIndex etc set because of footer in cloud. // Padding and zIndex etc set because of footer in cloud.
const loadedCheck = ( const loadedCheck = (
<div style={{ minHeight: 1000, paddingTop: "60px", zIndex: 50000, maxWidth: 1920, minWidth: isMobile ? null : 1366, margin: "auto", }}> <div style={{ minHeight: 1000, zIndex: 50000, maxWidth: 1920, minWidth: isMobile ? null : 1366, margin: "auto", }}>
<BrowserView>{postDataBrowser}</BrowserView> <BrowserView>{postDataBrowser}</BrowserView>
<MobileView>{postDataMobile}</MobileView> <MobileView>{postDataMobile}</MobileView>
</div> </div>