Fixed small issues with docs and search.

This commit is contained in:
frikky
2022-07-24 21:00:53 +02:00
parent f5fb18ed2a
commit d3e02de38f
7 changed files with 66 additions and 49 deletions
+10 -6
View File
@@ -25,8 +25,10 @@ import {
} from "@material-ui/icons";
const Body = {
maxWidth: 1000,
minWidth: 768,
//maxWidth: 1000,
//minWidth: 768,
maxWidth: "100%",
minWidth: "100%",
margin: "auto",
display: "flex",
height: "100%",
@@ -108,8 +110,8 @@ const Docs = (defaultprops) => {
};
const SideBar = {
maxWidth: 250,
flex: 1,
minWidth: 250,
maxWidth: 300,
position: "sticky",
top: 100,
maxHeight: "83vh",
@@ -346,11 +348,12 @@ const Docs = (defaultprops) => {
const markdownStyle = {
color: "rgba(255, 255, 255, 0.65)",
flex: "1",
maxWidth: mobile ? "100%" : 750,
overflow: "hidden",
paddingBottom: 100,
marginLeft: mobile ? 0 : 50,
maxWidth: 750,
minWidth: 750,
margin: "auto",
};
function OuterLink(props) {
@@ -768,6 +771,7 @@ const Docs = (defaultprops) => {
id="markdown_wrapper"
escapeHtml={false}
source={data}
style={{marginRight: 150}}
renderers={{
link: OuterLink,
image: Img,
+24 -22
View File
@@ -30,29 +30,29 @@ const bodyDivStyle = {
overflowX: "hidden",
}
const boxStyle = {
color: "white",
flex: "1",
marginLeft: 10,
marginRight: 10,
paddingLeft: 30,
paddingRight: 30,
paddingBottom: 30,
paddingTop: 30,
display: "flex",
flexDirection: "column",
overflowX: "hidden",
minHeight: 400,
}
// Should be different if logged in :|
const Search = (props) => {
const { globalUrl, isLoaded, serverside, userdata } = props;
const { globalUrl, isLoaded, serverside, userdata, hidemargins, } = props;
let navigate = useNavigate();
const [curTab, setCurTab] = useState(0);
const iconStyle = { marginRight: 10 };
const boxStyle = {
color: "white",
flex: "1",
marginLeft: 10,
marginRight: 10,
paddingLeft: 30,
paddingRight: 30,
paddingBottom: 30,
paddingTop: hidemargins === true ? 0 : 30,
display: "flex",
flexDirection: "column",
overflowX: "hidden",
minHeight: 400,
}
const views = {
0: "apps",
1: "workflows",
@@ -62,7 +62,6 @@ const Search = (props) => {
const setConfig = (event, inputValue) => {
const newValue = parseInt(inputValue)
console.log("NEW: ", newValue)
setCurTab(newValue)
if (newValue === 0) {
@@ -86,7 +85,10 @@ const Search = (props) => {
extraQ = "&q="+foundQuery
}
navigate(`/search?tab=${views[newValue]}`+extraQ)
if ((serverside === false || serverside === undefined) && window.location.pathname.includes("/search")) {
navigate(`/search?tab=${views[newValue]}`+extraQ)
}
}
useEffect(() => {
@@ -114,10 +116,10 @@ const Search = (props) => {
// Random names for type & autoComplete. Didn't research :^)
const landingpageDataBrowser =
<div style={{paddingBottom: 100, color: "white", backgroundColor: theme.palette.surfacColor}}>
<div style={{paddingBottom: hidemargins === true ? 0 : 100, color: "white", backgroundColor: theme.palette.surfacColor}}>
<div style={boxStyle}>
<Tabs
style={{width: 610, margin: "auto", marginTop: 25, }}
style={{width: 610, margin: "auto", marginTop: hidemargins === true ? 0 : 25, }}
value={curTab}
indicatorColor="primary"
textColor="secondary"
@@ -152,10 +154,10 @@ const Search = (props) => {
<WorkflowGrid maxRows={3} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
:
curTab === 2 ?
<DocsGrid maxRows={3} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
<DocsGrid maxRows={6} parsedXs={12} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
:
curTab === 3 ?
<CreatorGrid maxRows={3} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
<CreatorGrid maxRows={3} parsedXs={4} showSuggestion={true} globalUrl={globalUrl} isMobile={isMobile} userdata={userdata} />
:
null}
</div>